# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
36398 | 2017-12-08T16:15:40 Z | mohammad_kilani | Carnival (CEOI14_carnival) | C++14 | 63 ms | 3188 KB |
#include <bits/stdc++.h> using namespace std; #define mod 1000000007 #define oo 2000000000 const int N = 300010; int num[N]; int main() { //freopen("in.txt","r",stdin); int n , cnt = 1; scanf("%d",&n); for(int i=1;i<=n;i++){ if(num[i]) continue; num[i] = cnt; for(int j=i+1;j<=n;j++){ if(num[j]) continue; printf("2 %d %d\n",i,j); fflush(stdout); int a; scanf("%d",&a); if(a == 1) num[j] = cnt; } cnt++; } putchar('0'); for(int i=1;i<=n;i++) printf(" %d",num[i]); puts(""); return 0; }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 6 ms | 3188 KB | Output is correct |
2 | Correct | 9 ms | 3188 KB | Output is correct |
3 | Partially correct | 9 ms | 3188 KB | Partially correct |
4 | Partially correct | 9 ms | 3188 KB | Partially correct |
5 | Correct | 0 ms | 3188 KB | Output is correct |
6 | Correct | 0 ms | 3188 KB | Output is correct |
7 | Correct | 6 ms | 3188 KB | Output is correct |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 3 ms | 3188 KB | Output is correct |
2 | Correct | 0 ms | 3188 KB | Output is correct |
3 | Partially correct | 9 ms | 3188 KB | Partially correct |
4 | Partially correct | 63 ms | 3188 KB | Partially correct |
5 | Correct | 0 ms | 3188 KB | Output is correct |
6 | Correct | 0 ms | 3188 KB | Output is correct |
7 | Correct | 9 ms | 3188 KB | Output is correct |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 0 ms | 3188 KB | Output is correct |
2 | Correct | 0 ms | 3188 KB | Output is correct |
3 | Partially correct | 13 ms | 3188 KB | Partially correct |
4 | Partially correct | 26 ms | 3188 KB | Partially correct |
5 | Correct | 6 ms | 3188 KB | Output is correct |
6 | Correct | 9 ms | 3188 KB | Output is correct |
7 | Correct | 0 ms | 3188 KB | Output is correct |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 3 ms | 3188 KB | Output is correct |
2 | Correct | 0 ms | 3188 KB | Output is correct |
3 | Partially correct | 13 ms | 3188 KB | Partially correct |
4 | Partially correct | 33 ms | 3188 KB | Partially correct |
5 | Correct | 3 ms | 3188 KB | Output is correct |
6 | Correct | 16 ms | 3188 KB | Output is correct |
7 | Correct | 6 ms | 3188 KB | Output is correct |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 0 ms | 3188 KB | Output is correct |
2 | Correct | 6 ms | 3188 KB | Output is correct |
3 | Partially correct | 26 ms | 3188 KB | Partially correct |
4 | Partially correct | 33 ms | 3188 KB | Partially correct |
5 | Correct | 9 ms | 3188 KB | Output is correct |
6 | Partially correct | 16 ms | 3188 KB | Partially correct |
7 | Partially correct | 49 ms | 3188 KB | Partially correct |