| Task: | Hamilton |
| Sender: | RJuknevicius |
| Submission time: | 2026-04-17 13:43:37 +0300 |
| Language: | C++ (C++20) |
| Status: | READY |
| Result: | 0 |
| subtask | verdict | score |
|---|---|---|
| #1 | WRONG ANSWER | 0 |
| #2 | WRONG ANSWER | 0 |
| #3 | WRONG ANSWER | 0 |
| #4 | WRONG ANSWER | 0 |
| test | verdict | time | score | subtask | |
|---|---|---|---|---|---|
| #1 | WRONG ANSWER | 0.01 s | 0 | details | |
| #2 | WRONG ANSWER | 0.01 s | 0 | 1 | details |
| #3 | WRONG ANSWER | 0.01 s | 0 | 2, 3 | details |
| #4 | WRONG ANSWER | 0.17 s | 0 | 4 | details |
Compiler report
input/code.cpp: In function 'int main()':
input/code.cpp:51:23: warning: 'void std::random_shuffle(_RAIter, _RAIter) [with _RAIter = __gnu_cxx::__normal_iterator<int*, vector<int> >]' is deprecated: use 'std::shuffle' instead [-Wdeprecated-declarations]
51 | random_shuffle(a.begin(), a.end());
| ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/13/algorithm:61,
from /usr/include/x86_64-linux-gnu/c++/13/bits/stdc++.h:51,
from input/code.cpp:1:
/usr/include/c++/13/bits/stl_algo.h:4581:5: note: declared here
4581 | random_shuffle(_RandomAccessIterator __first, _RandomAccessIterator __last)
| ^~~~~~~~~~~~~~Code
#include <bits/stdc++.h>
using namespace std;
int krypt[501][501];
bool compare(int a, int b)
{
cout << "? " << a << " " << b << endl;
char x;cin>>x;
if(x=='>')
{
krypt[a][b]=1;
krypt[b][a]=-1;
}
else{
krypt[a][b]=-1;
krypt[b][a]=1;
}
return (x=='>');
}
int main()
{
int n,t;cin>>n>>t;
for(int i =0;i<n;i++)
{
for(int j=0;j<n;j++)
{
if(i==n-1 && j==0) cout << 1;
else if(j-i>0 && j-i<n-1) cout << 1;
else cout << 0;
cout << " ";
}
cout <<endl;
}
for(int k = 0; k < t; k++)
{
for(int i =0;i<n;i++)
{
for(int j=0;j<n;j++)
{
krypt[i+1][j+1]=0;
}
}
vector<int> a;
for(int i = 0; i<n;i++)
{
a.push_back(i+1);
}
random_shuffle(a.begin(), a.end());
stable_sort(a.begin(), a.end(), compare);
cout << "! ";
for(int i = 0; i<n;i++)
{
cout << a[(3*i)%n] << " ";
}
cout << endl;
}
}
Test details
Test 1
Subtask:
Verdict: WRONG ANSWER
| input |
|---|
| 0 5 2 fixed 1 2 3 4 5 2 4 1 5 ... |
| correct output |
|---|
| (empty) |
| user output |
|---|
| Activating encoder mode 5 2 0 1 1 1 0 0 0 1 1 1 0 0 0 1 1 ... |
Feedback: Case #1: Wrong edge in answer, 4 to 2
Test 2
Subtask: 1
Verdict: WRONG ANSWER
| input |
|---|
| 01 4 200 rnd |
| correct output |
|---|
| (empty) |
| user output |
|---|
| Activating encoder mode 4 200 0 1 1 0 0 0 1 1 0 0 0 1 ... |
Feedback: Case #1: Wrong edge in answer, 3 to 1
Test 3
Subtask: 2, 3
Verdict: WRONG ANSWER
| input |
|---|
| 02 50 200 rnd |
| correct output |
|---|
| (empty) |
| user output |
|---|
| Activating encoder mode 50 200 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ... |
Feedback: Case #1: Wrong edge in answer, 27 to 8
Test 4
Subtask: 4
Verdict: WRONG ANSWER
| input |
|---|
| 03 500 200 rnd |
| correct output |
|---|
| (empty) |
| user output |
|---|
| Activating encoder mode 500 200 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ... |
Feedback: Case #1: Wrong edge in answer, 101 to 141
