# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
438158 |
2021-06-27T16:56:20 Z |
shahriarkhan |
ICC (CEOI16_icc) |
C++14 |
|
365 ms |
512 KB |
#include<bits/stdc++.h>
#include "icc.h"
using namespace std ;
void run(int N)
{
int vis[N+1][N+1] ;
for(int i = 0 ; i <= N ; ++i)
{
for(int j = 0 ; j <= N ; ++j)
{
vis[i][j] = 0 ;
}
vis[i][i] = 1 ;
}
for(int T = 1 ; T < N ; ++T)
{
for(int i = 1 ; i <= N ; ++i)
{
int a[1] , siz_a = 1 , siz_b = 0 ;
a[0] = i ;
vector<int> B ;
for(int j = 1 ; j <= N ; ++j)
{
if(vis[i][j]) continue ;
B.push_back(j) , ++siz_b ;
}
int b[siz_b] ;
for(int j = 0 ; j < siz_b ; ++j) b[j] = B[j] ;
if(!query(siz_a,siz_b,a,b)) continue ;
int low = 0 , high = siz_b - 1 ;
while(low<high)
{
int mid = (low+high)/2 , siz_c = 0 ;
vector<int> C ;
for(int k = low ; k <= mid ; ++k)
{
C.push_back(b[k]) , ++siz_c ;
}
int c[siz_c] ;
for(int k = 0 ; k < siz_c ; ++k) c[k] = C[k] ;
if(query(siz_a,siz_c,a,c)) high = mid ;
else low = mid + 1 ;
}
int node = b[low] ;
vis[i][node] = 1 , vis[node][i] = 1 ;
setRoad(i,node) ;
break ;
}
}
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
9 ms |
484 KB |
Wrong road! |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
23 ms |
488 KB |
Wrong road! |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
91 ms |
504 KB |
Wrong road! |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
39 ms |
460 KB |
Wrong road! |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
365 ms |
512 KB |
Number of queries more than 3550 out of 1775 |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
308 ms |
512 KB |
Number of queries more than 3250 out of 1625 |
2 |
Halted |
0 ms |
0 KB |
- |