| Task: | Hamilton |
| Sender: | RJuknevicius |
| Submission time: | 2026-04-17 12:18:39 +0300 |
| Language: | C++ (C++20) |
| Status: | READY |
| Result: | 0 |
| subtask | verdict | score |
|---|---|---|
| #1 | RUNTIME ERROR | 0 |
| #2 | RUNTIME ERROR | 0 |
| #3 | RUNTIME ERROR | 0 |
| #4 | RUNTIME ERROR | 0 |
| test | verdict | time | score | subtask | |
|---|---|---|---|---|---|
| #1 | RUNTIME ERROR | 0.01 s | 0 | details | |
| #2 | RUNTIME ERROR | 0.01 s | 0 | 1 | details |
| #3 | RUNTIME ERROR | 0.01 s | 0 | 2, 3 | details |
| #4 | RUNTIME ERROR | 0.06 s | 0 | 4 | details |
Code
#include <bits/stdc++.h>
using namespace std;
bool compare(int a, int b)
{
cout << "? " << a << " " << b << endl;
char x;cin>>x;
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 i = 0; i < t; i++)
{
vector<int> a;
for(int i = 0; i<n;i++)
{
a[i]=i+1;
}
stable_sort(a.begin(), a.end(), compare);
cout << "! ";
for(int i = 0; i<n;i++)
{
cout << a[i] << " ";
}
cout << endl;
}
}
Test details
Test 1
Subtask:
Verdict: RUNTIME ERROR
| 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 ... |
Test 2
Subtask: 1
Verdict: RUNTIME ERROR
| 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 ... |
Test 3
Subtask: 2, 3
Verdict: RUNTIME ERROR
| 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 ... |
Test 4
Subtask: 4
Verdict: RUNTIME ERROR
| 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 ... |
