#include <bits/stdc++.h>
using namespace std;
int main()
{
int n;
cin >> n;
int kostim[n+1]={0};
int c=1;
for (int i=1;i<=n;i++) {
if (kostim[i]) continue;
kostim[i]=c;
for (int j=i+1;j<=n;j++) {
if (kostim[j]) continue;
cout << 2 << " " << i << " " << j << endl;
int razl;
cin >> razl;
if (razl==1) kostim[j]=c;
}
c++;
}
cout << 0 << " ";
for (int i=1;i<=n;i++)
cout << kostim[i] << " ";
cout << endl;
return 0;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
4 ms |
344 KB |
Output is correct |
2 |
Correct |
12 ms |
344 KB |
Output is correct |
3 |
Partially correct |
26 ms |
344 KB |
Partially correct |
4 |
Partially correct |
39 ms |
344 KB |
Partially correct |
5 |
Correct |
1 ms |
344 KB |
Output is correct |
6 |
Correct |
1 ms |
344 KB |
Output is correct |
7 |
Correct |
8 ms |
344 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
2 ms |
344 KB |
Output is correct |
2 |
Correct |
9 ms |
344 KB |
Output is correct |
3 |
Partially correct |
16 ms |
344 KB |
Partially correct |
4 |
Partially correct |
36 ms |
344 KB |
Partially correct |
5 |
Correct |
1 ms |
344 KB |
Output is correct |
6 |
Correct |
2 ms |
344 KB |
Output is correct |
7 |
Correct |
5 ms |
344 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
344 KB |
Output is correct |
2 |
Correct |
3 ms |
344 KB |
Output is correct |
3 |
Partially correct |
20 ms |
344 KB |
Partially correct |
4 |
Partially correct |
50 ms |
512 KB |
Partially correct |
5 |
Correct |
3 ms |
344 KB |
Output is correct |
6 |
Correct |
4 ms |
344 KB |
Output is correct |
7 |
Correct |
7 ms |
344 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
344 KB |
Output is correct |
2 |
Correct |
2 ms |
344 KB |
Output is correct |
3 |
Partially correct |
45 ms |
344 KB |
Partially correct |
4 |
Partially correct |
39 ms |
344 KB |
Partially correct |
5 |
Correct |
5 ms |
344 KB |
Output is correct |
6 |
Correct |
15 ms |
344 KB |
Output is correct |
7 |
Correct |
10 ms |
344 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
344 KB |
Output is correct |
2 |
Correct |
8 ms |
344 KB |
Output is correct |
3 |
Partially correct |
26 ms |
344 KB |
Partially correct |
4 |
Partially correct |
27 ms |
344 KB |
Partially correct |
5 |
Correct |
15 ms |
344 KB |
Output is correct |
6 |
Partially correct |
31 ms |
344 KB |
Partially correct |
7 |
Partially correct |
61 ms |
344 KB |
Partially correct |