# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
438153 |
2021-06-27T16:43:40 Z |
shahriarkhan |
ICC (CEOI16_icc) |
C++14 |
|
11 ms |
524 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] , b[N+1] , siz_a = 1 , siz_b = 0 ;
a[0] = i ;
for(int j = 1 ; j <= N ; ++j)
{
if(vis[i][j]) continue ;
b[siz_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 , c[N+1] , siz_c = 0 ;
for(int k = low ; k <= mid ; ++k)
{
c[siz_c++] = b[i] ;
}
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 |
2 ms |
460 KB |
Wrong road! |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
5 ms |
460 KB |
Query cities not in range [1, n] |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
11 ms |
524 KB |
Wrong road! |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
11 ms |
524 KB |
Query cities not in range [1, n] |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
10 ms |
480 KB |
Query cities not in range [1, n] |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
10 ms |
520 KB |
Wrong road! |
2 |
Halted |
0 ms |
0 KB |
- |