| Task: | Hamilton |
| Sender: | jsesok |
| Submission time: | 2026-08-24 18:32:45 +0300 |
| Language: | C++ (C++23) |
| 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.01 s | 0 | 4 | details |
Code
#include <iostream>
#include <numeric>
#include <vector>
#include <set>
#include <map>
#include <unordered_map>
#include <algorithm>
#include <queue>
using namespace std;
int main() {
/* ios_base::sync_with_stdio(false);
cin.tie(nullptr);
cout.tie(0);*/
int n, t, zn;
char c;
cin>>n>>t;
cout<<"0110\n"<<"0011\n"<<"0001\n"<<"1000"<<endl;
for (int i=0; i<t; ++i)
{
vector<int> next={0, 1, 2, 3};
vector<vector<int>> g(n, vector<int> (n, 0));
for (int i=0; i<n; ++i)
{
for (int j=i+1; j<n; ++j)
{
cout<<i+1<<" "<<j+1<<endl;
cin>>c;
if (c=='>')
{
g[i][j]=1;
}
else
{
g[j][i]=1;
}
}
}
do
{
zn=1;
for (int i=0; i<n; ++i)
{
if (g[next[i]][next[(i+1)%n]]==0)
{
zn=0;
break;
}
}
if (zn==1)
{
cout<<"!";
for (int i : next)
cout<<" "<<i;
cout<<endl;
break;
}
}while (next_permutation(next.begin(), next.end()));
}
return 0;
}
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 0110 0011 0001 ... |
Feedback: Self-loop
Test 2
Subtask: 1
Verdict: WRONG ANSWER
| input |
|---|
| 01 4 200 rnd |
| correct output |
|---|
| (empty) |
| user output |
|---|
| Activating encoder mode 4 200 0110 0011 0001 ... |
Feedback: Case #1: Unexpected operation
Test 3
Subtask: 2, 3
Verdict: WRONG ANSWER
| input |
|---|
| 02 50 200 rnd |
| correct output |
|---|
| (empty) |
| user output |
|---|
| Activating encoder mode 50 200 0110 0011 0001 ... |
Feedback: Invalid character in graph description50.
Test 4
Subtask: 4
Verdict: WRONG ANSWER
| input |
|---|
| 03 500 200 rnd |
| correct output |
|---|
| (empty) |
| user output |
|---|
| Activating encoder mode 500 200 0110 0011 0001 ... |
Feedback: Invalid character in graph description50.
