# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
101256 |
2019-03-18T04:57:27 Z |
cheeheng |
ICC (CEOI16_icc) |
C++14 |
|
407 ms |
636 KB |
#include "icc.h"
#include <bits/stdc++.h>
using namespace std;
//int query(int a,int b,int* A,int *B);
//void setRoad(int a,int b);
int a[105];
int b[105];
int P[105];
bool hasEdge[105][105];
void run(int n) {
memset(hasEdge, false, sizeof(hasEdge));
for(int k = 1; k < n; k ++){
for(int i = 1; i <= n; i ++){
int cnt = 0;
/*for(int j = i+1; j <= n; j ++){
if(!hasEdge[j][i]){
b[cnt++] = j;
}
}*/
a[0] = i;
//printf("%d ", i);
//if(query(1, cnt, a, b)){
for(int j = i+1; j <= n; j ++){
b[0] = j;
//printf("%d %d %d\n", i, j, hasEdge[i][j]);
if(!hasEdge[j][i]){
if(query(1, 1, a, b)){
hasEdge[j][i] = true;
hasEdge[i][j] = true;
//printf("%d %d\n", i, j);
setRoad(i, j);
}
}
}
//break;
//}
//assert(i != n);
}
}
}
Compilation message
icc.cpp: In function 'void run(int)':
icc.cpp:18:17: warning: unused variable 'cnt' [-Wunused-variable]
int cnt = 0;
^~~
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
75 ms |
512 KB |
Ok! 1301 queries used. |
2 |
Incorrect |
13 ms |
512 KB |
Wrong road! |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
220 ms |
636 KB |
Wrong road! |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
407 ms |
512 KB |
Number of queries more than 4500 out of 2250 |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
297 ms |
560 KB |
Number of queries more than 4000 out of 2000 |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
268 ms |
568 KB |
Number of queries more than 3550 out of 1775 |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
242 ms |
632 KB |
Number of queries more than 3250 out of 1625 |
2 |
Halted |
0 ms |
0 KB |
- |