| Task: | Hamilton |
| Sender: | AKurlavicius |
| Submission time: | 2026-04-17 14:44:14 +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.04 s | 0 | 4 | details |
Compiler report
input/code.cpp: In function 'void slv()':
input/code.cpp:14:22: warning: comparison of integer expressions of different signedness: 'std::vector<int>::size_type' {aka 'long unsigned int'} and 'int' [-Wsign-compare]
14 | while (ans.size()<n)
| ~~~~~~~~~~^~Code
#include <bits/stdc++.h>
using namespace std;
int n, t;
int arr[501][501];
void slv()
{
vector<bool> lank(501);
vector<int> ans;
ans.push_back(1);
lank[1]=1;
while (ans.size()<n)
{
for (int i=1; i<=n; i++)
if (!lank[i])
{
cout<<"? "<<ans.back()<<' '<<i<<endl;
char in;
cin>>in;
if (in=='>')
{
ans.push_back(i);
lank[i]=1;
break;
}
}
}
cout<<'!';
for (int i:ans)
cout<<' '<<i;
}
int main()
{
cin>>n>>t;
for (int i=1; i<=n; i++)
arr[i][i%n+1]=1;
for (int i=1; i<=n; i++)
{
for (int j=1; j<=n; j++)
cout<<arr[i][j];
cout<<endl;
}
while (t--)
slv();
}
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 01000 00100 00010 ... |
Feedback: Duplicate or missing edge in given graph
Test 2
Subtask: 1
Verdict: WRONG ANSWER
| input |
|---|
| 01 4 200 rnd |
| correct output |
|---|
| (empty) |
| user output |
|---|
| Activating encoder mode 4 200 0100 0010 0001 ... |
Feedback: Duplicate or missing edge in given graph
Test 3
Subtask: 2, 3
Verdict: WRONG ANSWER
| input |
|---|
| 02 50 200 rnd |
| correct output |
|---|
| (empty) |
| user output |
|---|
| Activating encoder mode 50 200 010000000000000000000000000000... |
Feedback: Duplicate or missing edge in given graph
Test 4
Subtask: 4
Verdict: WRONG ANSWER
| input |
|---|
| 03 500 200 rnd |
| correct output |
|---|
| (empty) |
| user output |
|---|
| Activating encoder mode 500 200 010000000000000000000000000000... |
Feedback: Duplicate or missing edge in given graph
