# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
300401 |
2020-09-17T06:45:00 Z |
bacegen4o |
Joker (BOI20_joker) |
C |
|
2000 ms |
14684 KB |
#pragma GCC optimize "-O3"
#include<stdio.h>
#include<stdlib.h>
#include<string.h>
#include<math.h>
#include<assert.h>
#include<stdbool.h>
#include<limits.h>
#define swap(a,b) do{ __typeof(a) tp; tp=a; a=b; b=tp; }while(0)
typedef struct{
int first, second;
}pair;
pair newpair(int a, int b){
return(pair){a,b};
}
int cmpP(const void*pa, const void*pb){
pair*a = (pair*)pa;
pair*b = (pair*)pb;
if(a->first != b->first) return(a->first < b->first )?-1:1;
if(a->second != b->second)return(a->second < b->second)?-1:1;
return 0;
}
#ifndef STB_STRETCHY_BUFFER_H_INCLUDED
#define STB_STRETCHY_BUFFER_H_INCLUDED
#ifndef NO_STRETCHY_BUFFER_SHORT_NAMES
#define sb_free stb_sb_free
#define sb_push stb_sb_push
#define sb_count stb_sb_count
#define sb_add stb_sb_add
#define sb_last stb_sb_last
#endif
#define stb_sb_free(a) ((a) ? free(stb__sbraw(a)),0 : 0)
#define stb_sb_push(a,v) (stb__sbmaybegrow(a,1), (a)[stb__sbn(a)++] = (v))
#define stb_sb_count(a) ((a) ? stb__sbn(a) : 0)
#define stb_sb_add(a,n) (stb__sbmaybegrow(a,n), stb__sbn(a)+=(n), &(a)[stb__sbn(a)-(n)])
#define stb_sb_last(a) ((a)[stb__sbn(a)-1])
#define stb__sbraw(a) ((int *) (a) - 2)
#define stb__sbm(a) stb__sbraw(a)[0]
#define stb__sbn(a) stb__sbraw(a)[1]
#define stb__sbneedgrow(a,n) ((a)==0 || stb__sbn(a)+(n) >= stb__sbm(a))
#define stb__sbmaybegrow(a,n) (stb__sbneedgrow(a,(n)) ? stb__sbgrow(a,n) : 0)
#define stb__sbgrow(a,n) (*((void **)&(a)) = stb__sbgrowf((a), (n), sizeof(*(a))))
static void*stb__sbgrowf(void*arr, int increment, int itemsize){
int dbl_cur = arr ? 2*stb__sbm(arr) : 0;
int min_needed = stb_sb_count(arr) + increment;
int m = dbl_cur > min_needed ? dbl_cur : min_needed;
int*p = (int *) realloc(arr ? stb__sbraw(arr) : 0, itemsize * m + sizeof(int)*2);
if(p){
if(!arr)
p[1] = 0;
p[0] = m;
return p+2;
}
else {
#ifdef STRETCHY_BUFFER_OUT_OF_MEMORY
STRETCHY_BUFFER_OUT_OF_MEMORY;
#endif
return(void*)(2*sizeof(int));
}
}
#endif
inline double sqrt(double x){
__asm__ ("fsqrt" : "+t" (x));
return x;
}
inline int max(int a,int b){return a>b?a:b;}
///////////////////////////////////
enum{MAXN = 200005};
enum{MAXM = 200005};
enum{MAXQ = 200005};
int comp[MAXN], h[MAXN];
bool col_switch[MAXN];
int n_mem, mem_cv[MAXM], mem_cu[MAXM], mem_hcu[MAXM];
bool mem_swcv[MAXM];
int N, M, Q;
int E[2][MAXM], queries[2][MAXQ], res[MAXQ];
int*inds;
void init_dsu(int n){
for(int i=0; i<n; i++){
comp[i] = i;
h[i] = 0;
col_switch[i] = 0;
}
n_mem = 0;
}
pair find(int v){
bool col = col_switch[v];
while(comp[v] != v){
v = comp[v];
col ^= 1;
col ^= col_switch[v];
}
return newpair(v, col);
}
void merge(int v, int u){
pair ansv = find(v),
ansu = find(u);
int cv = ansv.first,
cu = ansu.first;
bool colv = ansv.second,
colu = ansu.second;
if(cv != cu){
if(h[cv] > h[cu]){
swap(cv, cu);
swap(v, u);
}
mem_cv [n_mem] = cv;
mem_cu [n_mem] = cu;
mem_hcu [n_mem] = h[cu];
mem_swcv[n_mem] = col_switch[cv];
n_mem++;
comp[cv] = cu;
if(h[cv] == h[cu])
h[cu]++;
col_switch[cv] = (colv != colu);
}
else{
mem_cv[n_mem] = -1;
n_mem++;
}
}
int check(int v, int u){
pair ansv = find(v),
ansu = find(u);
int cv = ansv.first,
cu = ansu.first;
bool colv = ansv.second,
colu = ansu.second;
if(cv != cu)
return 2;
if(colv == colu)
return -1;
return 1;
}
void rollback(int k){
while(k--){
n_mem--;
int cv = mem_cv[n_mem],
cu = mem_cu[n_mem];
bool swcv = mem_swcv[n_mem];
if(cv == -1)
continue;
comp[cv] = cv;
h[cu] = cu;
col_switch[cv] = swcv;
}
}
void solve_for_inds(int e_left_next){
int k = sb_count(inds);
pair v[k];
for(int i=0; i<k; i++){
int ind = inds[i];
v[i] = newpair(-queries[1][ind], ind);
}
qsort(v, k, sizeof(pair), cmpP);
int e_right_next = M-1, steps = 0;
bool got_cycle = false;
for(int i = 0; i < k; i++){
int ind = v[i].second;
int L = queries[0][ind], R = queries[1][ind];
if(!got_cycle){
while(e_right_next > R){
int status = check(E[0][e_right_next], E[1][e_right_next]);
if(status == -1){
got_cycle = true;
break;
}
merge(E[0][e_right_next], E[1][e_right_next]);
e_right_next--;
steps++;
}
}
bool got_cycle_inner = got_cycle;
int steps_inner = 0;
if(!got_cycle_inner){
for (int e = e_left_next; e < L; e++) {
int status = check(E[0][e], E[1][e]);
if(status == -1){
got_cycle_inner = true;
break;
}
merge(E[0][e], E[1][e]);
steps_inner++;
}
}
res[ind] = (int)(got_cycle || got_cycle_inner);
rollback(steps_inner);
}
rollback(steps);
}
void solve(){
int B = max((int)(M / sqrt(Q)), 1);
pair v[Q];
for(int i = 0; i < Q; i++){
v[i] = newpair(queries[0][i] / B, i);
}
qsort(v, Q, sizeof(pair), cmpP);
init_dsu(N);
int e_left_next = 0;
bool got_cycle = false;
if(inds)
sb_free(inds);
inds = NULL;
for(int i=0; i<Q; i++){
sb_push(inds, v[i].second);
if(i + 1 == Q || v[i].first != v[i+1].first){
while(!got_cycle && e_left_next < v[i].first * B){
int status = check(E[0][e_left_next], E[1][e_left_next]);
if(status == -1){
got_cycle = true;
break;
}
merge(E[0][e_left_next], E[1][e_left_next]);
e_left_next++;
}
if(got_cycle){
for(int j = 0; j<sb_count(inds); j++){
int ind = inds[j];
res[ind] = 1;
}
}
else{
solve_for_inds(e_left_next);
}
if(inds)
sb_free(inds);
inds = NULL;
}
}
}
int main(){
while(scanf("%d%d%d", &N, &M, &Q)==3){
for(int i = 0; i < M; i++){
scanf("%d %d", &E[0][i], &E[1][i]);
E[0][i]--;
E[1][i]--;
}
for(int i = 0; i < Q; i++){
scanf("%d %d", &queries[0][i], &queries[1][i]);
queries[0][i]--;
queries[1][i]--;
}
solve();
for(int i = 0; i < Q; i++){
if (res[i])
puts("YES");
else
puts("NO");
}
}
return 0;
}
Compilation message
Joker.c: In function 'main':
Joker.c:239:13: warning: ignoring return value of 'scanf', declared with attribute warn_unused_result [-Wunused-result]
239 | scanf("%d %d", &E[0][i], &E[1][i]);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Joker.c:244:13: warning: ignoring return value of 'scanf', declared with attribute warn_unused_result [-Wunused-result]
244 | scanf("%d %d", &queries[0][i], &queries[1][i]);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
384 KB |
Output is correct |
2 |
Correct |
1 ms |
384 KB |
Output is correct |
3 |
Correct |
0 ms |
384 KB |
Output is correct |
4 |
Correct |
0 ms |
384 KB |
Output is correct |
5 |
Correct |
0 ms |
384 KB |
Output is correct |
6 |
Correct |
0 ms |
384 KB |
Output is correct |
7 |
Correct |
0 ms |
384 KB |
Output is correct |
8 |
Correct |
0 ms |
384 KB |
Output is correct |
9 |
Correct |
1 ms |
384 KB |
Output is correct |
10 |
Correct |
1 ms |
384 KB |
Output is correct |
11 |
Correct |
1 ms |
384 KB |
Output is correct |
12 |
Correct |
0 ms |
384 KB |
Output is correct |
13 |
Correct |
1 ms |
384 KB |
Output is correct |
14 |
Correct |
1 ms |
384 KB |
Output is correct |
15 |
Correct |
1 ms |
384 KB |
Output is correct |
16 |
Correct |
1 ms |
384 KB |
Output is correct |
17 |
Correct |
1 ms |
384 KB |
Output is correct |
18 |
Correct |
1 ms |
384 KB |
Output is correct |
19 |
Correct |
1 ms |
384 KB |
Output is correct |
20 |
Correct |
0 ms |
384 KB |
Output is correct |
21 |
Correct |
1 ms |
384 KB |
Output is correct |
22 |
Correct |
1 ms |
384 KB |
Output is correct |
23 |
Correct |
1 ms |
384 KB |
Output is correct |
24 |
Correct |
1 ms |
384 KB |
Output is correct |
25 |
Correct |
1 ms |
384 KB |
Output is correct |
26 |
Correct |
0 ms |
384 KB |
Output is correct |
27 |
Correct |
1 ms |
384 KB |
Output is correct |
28 |
Correct |
1 ms |
384 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
384 KB |
Output is correct |
2 |
Correct |
1 ms |
384 KB |
Output is correct |
3 |
Correct |
0 ms |
384 KB |
Output is correct |
4 |
Correct |
0 ms |
384 KB |
Output is correct |
5 |
Correct |
0 ms |
384 KB |
Output is correct |
6 |
Correct |
0 ms |
384 KB |
Output is correct |
7 |
Correct |
0 ms |
384 KB |
Output is correct |
8 |
Correct |
0 ms |
384 KB |
Output is correct |
9 |
Correct |
1 ms |
384 KB |
Output is correct |
10 |
Correct |
1 ms |
384 KB |
Output is correct |
11 |
Correct |
1 ms |
384 KB |
Output is correct |
12 |
Correct |
0 ms |
384 KB |
Output is correct |
13 |
Correct |
1 ms |
384 KB |
Output is correct |
14 |
Correct |
1 ms |
384 KB |
Output is correct |
15 |
Correct |
1 ms |
384 KB |
Output is correct |
16 |
Correct |
1 ms |
384 KB |
Output is correct |
17 |
Correct |
1 ms |
384 KB |
Output is correct |
18 |
Correct |
1 ms |
384 KB |
Output is correct |
19 |
Correct |
1 ms |
384 KB |
Output is correct |
20 |
Correct |
0 ms |
384 KB |
Output is correct |
21 |
Correct |
1 ms |
384 KB |
Output is correct |
22 |
Correct |
1 ms |
384 KB |
Output is correct |
23 |
Correct |
1 ms |
384 KB |
Output is correct |
24 |
Correct |
1 ms |
384 KB |
Output is correct |
25 |
Correct |
1 ms |
384 KB |
Output is correct |
26 |
Correct |
0 ms |
384 KB |
Output is correct |
27 |
Correct |
1 ms |
384 KB |
Output is correct |
28 |
Correct |
1 ms |
384 KB |
Output is correct |
29 |
Correct |
3 ms |
512 KB |
Output is correct |
30 |
Correct |
3 ms |
512 KB |
Output is correct |
31 |
Correct |
3 ms |
512 KB |
Output is correct |
32 |
Correct |
3 ms |
384 KB |
Output is correct |
33 |
Correct |
2 ms |
384 KB |
Output is correct |
34 |
Correct |
2 ms |
512 KB |
Output is correct |
35 |
Correct |
3 ms |
512 KB |
Output is correct |
36 |
Correct |
2 ms |
512 KB |
Output is correct |
37 |
Correct |
3 ms |
512 KB |
Output is correct |
38 |
Correct |
4 ms |
512 KB |
Output is correct |
39 |
Correct |
2 ms |
512 KB |
Output is correct |
40 |
Correct |
2 ms |
512 KB |
Output is correct |
41 |
Correct |
2 ms |
512 KB |
Output is correct |
42 |
Correct |
2 ms |
512 KB |
Output is correct |
43 |
Correct |
2 ms |
384 KB |
Output is correct |
44 |
Correct |
2 ms |
512 KB |
Output is correct |
45 |
Correct |
2 ms |
384 KB |
Output is correct |
46 |
Correct |
2 ms |
512 KB |
Output is correct |
47 |
Correct |
2 ms |
384 KB |
Output is correct |
48 |
Correct |
2 ms |
512 KB |
Output is correct |
49 |
Correct |
3 ms |
512 KB |
Output is correct |
50 |
Correct |
2 ms |
512 KB |
Output is correct |
51 |
Correct |
2 ms |
384 KB |
Output is correct |
52 |
Correct |
2 ms |
512 KB |
Output is correct |
53 |
Correct |
2 ms |
512 KB |
Output is correct |
54 |
Correct |
3 ms |
512 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
384 KB |
Output is correct |
2 |
Correct |
1 ms |
384 KB |
Output is correct |
3 |
Correct |
150 ms |
12632 KB |
Output is correct |
4 |
Correct |
161 ms |
14596 KB |
Output is correct |
5 |
Correct |
157 ms |
12252 KB |
Output is correct |
6 |
Correct |
158 ms |
12508 KB |
Output is correct |
7 |
Correct |
157 ms |
12508 KB |
Output is correct |
8 |
Correct |
151 ms |
12252 KB |
Output is correct |
9 |
Correct |
158 ms |
12632 KB |
Output is correct |
10 |
Correct |
162 ms |
13532 KB |
Output is correct |
11 |
Correct |
158 ms |
12508 KB |
Output is correct |
12 |
Correct |
157 ms |
13276 KB |
Output is correct |
13 |
Correct |
157 ms |
11608 KB |
Output is correct |
14 |
Correct |
160 ms |
12120 KB |
Output is correct |
15 |
Correct |
162 ms |
12892 KB |
Output is correct |
16 |
Correct |
165 ms |
13404 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
384 KB |
Output is correct |
2 |
Correct |
1 ms |
384 KB |
Output is correct |
3 |
Correct |
0 ms |
384 KB |
Output is correct |
4 |
Correct |
0 ms |
384 KB |
Output is correct |
5 |
Correct |
0 ms |
384 KB |
Output is correct |
6 |
Correct |
0 ms |
384 KB |
Output is correct |
7 |
Correct |
0 ms |
384 KB |
Output is correct |
8 |
Correct |
0 ms |
384 KB |
Output is correct |
9 |
Correct |
1 ms |
384 KB |
Output is correct |
10 |
Correct |
1 ms |
384 KB |
Output is correct |
11 |
Correct |
1 ms |
384 KB |
Output is correct |
12 |
Correct |
0 ms |
384 KB |
Output is correct |
13 |
Correct |
1 ms |
384 KB |
Output is correct |
14 |
Correct |
1 ms |
384 KB |
Output is correct |
15 |
Correct |
1 ms |
384 KB |
Output is correct |
16 |
Correct |
1 ms |
384 KB |
Output is correct |
17 |
Correct |
1 ms |
384 KB |
Output is correct |
18 |
Correct |
1 ms |
384 KB |
Output is correct |
19 |
Correct |
1 ms |
384 KB |
Output is correct |
20 |
Correct |
0 ms |
384 KB |
Output is correct |
21 |
Correct |
1 ms |
384 KB |
Output is correct |
22 |
Correct |
1 ms |
384 KB |
Output is correct |
23 |
Correct |
1 ms |
384 KB |
Output is correct |
24 |
Correct |
1 ms |
384 KB |
Output is correct |
25 |
Correct |
1 ms |
384 KB |
Output is correct |
26 |
Correct |
0 ms |
384 KB |
Output is correct |
27 |
Correct |
1 ms |
384 KB |
Output is correct |
28 |
Correct |
1 ms |
384 KB |
Output is correct |
29 |
Correct |
150 ms |
12632 KB |
Output is correct |
30 |
Correct |
161 ms |
14596 KB |
Output is correct |
31 |
Correct |
157 ms |
12252 KB |
Output is correct |
32 |
Correct |
158 ms |
12508 KB |
Output is correct |
33 |
Correct |
157 ms |
12508 KB |
Output is correct |
34 |
Correct |
151 ms |
12252 KB |
Output is correct |
35 |
Correct |
158 ms |
12632 KB |
Output is correct |
36 |
Correct |
162 ms |
13532 KB |
Output is correct |
37 |
Correct |
158 ms |
12508 KB |
Output is correct |
38 |
Correct |
157 ms |
13276 KB |
Output is correct |
39 |
Correct |
157 ms |
11608 KB |
Output is correct |
40 |
Correct |
160 ms |
12120 KB |
Output is correct |
41 |
Correct |
162 ms |
12892 KB |
Output is correct |
42 |
Correct |
165 ms |
13404 KB |
Output is correct |
43 |
Correct |
485 ms |
12508 KB |
Output is correct |
44 |
Correct |
552 ms |
14684 KB |
Output is correct |
45 |
Correct |
499 ms |
14392 KB |
Output is correct |
46 |
Correct |
398 ms |
12536 KB |
Output is correct |
47 |
Correct |
399 ms |
12476 KB |
Output is correct |
48 |
Correct |
198 ms |
12632 KB |
Output is correct |
49 |
Correct |
235 ms |
13660 KB |
Output is correct |
50 |
Correct |
474 ms |
12380 KB |
Output is correct |
51 |
Correct |
454 ms |
12888 KB |
Output is correct |
52 |
Correct |
485 ms |
13532 KB |
Output is correct |
53 |
Correct |
513 ms |
11648 KB |
Output is correct |
54 |
Correct |
545 ms |
12508 KB |
Output is correct |
55 |
Correct |
576 ms |
13020 KB |
Output is correct |
56 |
Correct |
542 ms |
13404 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
384 KB |
Output is correct |
2 |
Correct |
1 ms |
384 KB |
Output is correct |
3 |
Correct |
0 ms |
384 KB |
Output is correct |
4 |
Correct |
0 ms |
384 KB |
Output is correct |
5 |
Correct |
0 ms |
384 KB |
Output is correct |
6 |
Correct |
0 ms |
384 KB |
Output is correct |
7 |
Correct |
0 ms |
384 KB |
Output is correct |
8 |
Correct |
0 ms |
384 KB |
Output is correct |
9 |
Correct |
1 ms |
384 KB |
Output is correct |
10 |
Correct |
1 ms |
384 KB |
Output is correct |
11 |
Correct |
1 ms |
384 KB |
Output is correct |
12 |
Correct |
0 ms |
384 KB |
Output is correct |
13 |
Correct |
1 ms |
384 KB |
Output is correct |
14 |
Correct |
1 ms |
384 KB |
Output is correct |
15 |
Correct |
1 ms |
384 KB |
Output is correct |
16 |
Correct |
1 ms |
384 KB |
Output is correct |
17 |
Correct |
1 ms |
384 KB |
Output is correct |
18 |
Correct |
1 ms |
384 KB |
Output is correct |
19 |
Correct |
1 ms |
384 KB |
Output is correct |
20 |
Correct |
0 ms |
384 KB |
Output is correct |
21 |
Correct |
1 ms |
384 KB |
Output is correct |
22 |
Correct |
1 ms |
384 KB |
Output is correct |
23 |
Correct |
1 ms |
384 KB |
Output is correct |
24 |
Correct |
1 ms |
384 KB |
Output is correct |
25 |
Correct |
1 ms |
384 KB |
Output is correct |
26 |
Correct |
0 ms |
384 KB |
Output is correct |
27 |
Correct |
1 ms |
384 KB |
Output is correct |
28 |
Correct |
1 ms |
384 KB |
Output is correct |
29 |
Correct |
3 ms |
512 KB |
Output is correct |
30 |
Correct |
3 ms |
512 KB |
Output is correct |
31 |
Correct |
3 ms |
512 KB |
Output is correct |
32 |
Correct |
3 ms |
384 KB |
Output is correct |
33 |
Correct |
2 ms |
384 KB |
Output is correct |
34 |
Correct |
2 ms |
512 KB |
Output is correct |
35 |
Correct |
3 ms |
512 KB |
Output is correct |
36 |
Correct |
2 ms |
512 KB |
Output is correct |
37 |
Correct |
3 ms |
512 KB |
Output is correct |
38 |
Correct |
4 ms |
512 KB |
Output is correct |
39 |
Correct |
2 ms |
512 KB |
Output is correct |
40 |
Correct |
2 ms |
512 KB |
Output is correct |
41 |
Correct |
2 ms |
512 KB |
Output is correct |
42 |
Correct |
2 ms |
512 KB |
Output is correct |
43 |
Correct |
2 ms |
384 KB |
Output is correct |
44 |
Correct |
2 ms |
512 KB |
Output is correct |
45 |
Correct |
2 ms |
384 KB |
Output is correct |
46 |
Correct |
2 ms |
512 KB |
Output is correct |
47 |
Correct |
2 ms |
384 KB |
Output is correct |
48 |
Correct |
2 ms |
512 KB |
Output is correct |
49 |
Correct |
3 ms |
512 KB |
Output is correct |
50 |
Correct |
2 ms |
512 KB |
Output is correct |
51 |
Correct |
2 ms |
384 KB |
Output is correct |
52 |
Correct |
2 ms |
512 KB |
Output is correct |
53 |
Correct |
2 ms |
512 KB |
Output is correct |
54 |
Correct |
3 ms |
512 KB |
Output is correct |
55 |
Correct |
135 ms |
4088 KB |
Output is correct |
56 |
Correct |
350 ms |
6392 KB |
Output is correct |
57 |
Correct |
155 ms |
5880 KB |
Output is correct |
58 |
Correct |
119 ms |
4216 KB |
Output is correct |
59 |
Correct |
89 ms |
4156 KB |
Output is correct |
60 |
Correct |
107 ms |
4600 KB |
Output is correct |
61 |
Correct |
160 ms |
4088 KB |
Output is correct |
62 |
Correct |
170 ms |
4984 KB |
Output is correct |
63 |
Correct |
152 ms |
3580 KB |
Output is correct |
64 |
Correct |
186 ms |
4348 KB |
Output is correct |
65 |
Correct |
214 ms |
4984 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
384 KB |
Output is correct |
2 |
Correct |
1 ms |
384 KB |
Output is correct |
3 |
Correct |
0 ms |
384 KB |
Output is correct |
4 |
Correct |
0 ms |
384 KB |
Output is correct |
5 |
Correct |
0 ms |
384 KB |
Output is correct |
6 |
Correct |
0 ms |
384 KB |
Output is correct |
7 |
Correct |
0 ms |
384 KB |
Output is correct |
8 |
Correct |
0 ms |
384 KB |
Output is correct |
9 |
Correct |
1 ms |
384 KB |
Output is correct |
10 |
Correct |
1 ms |
384 KB |
Output is correct |
11 |
Correct |
1 ms |
384 KB |
Output is correct |
12 |
Correct |
0 ms |
384 KB |
Output is correct |
13 |
Correct |
1 ms |
384 KB |
Output is correct |
14 |
Correct |
1 ms |
384 KB |
Output is correct |
15 |
Correct |
1 ms |
384 KB |
Output is correct |
16 |
Correct |
1 ms |
384 KB |
Output is correct |
17 |
Correct |
1 ms |
384 KB |
Output is correct |
18 |
Correct |
1 ms |
384 KB |
Output is correct |
19 |
Correct |
1 ms |
384 KB |
Output is correct |
20 |
Correct |
0 ms |
384 KB |
Output is correct |
21 |
Correct |
1 ms |
384 KB |
Output is correct |
22 |
Correct |
1 ms |
384 KB |
Output is correct |
23 |
Correct |
1 ms |
384 KB |
Output is correct |
24 |
Correct |
1 ms |
384 KB |
Output is correct |
25 |
Correct |
1 ms |
384 KB |
Output is correct |
26 |
Correct |
0 ms |
384 KB |
Output is correct |
27 |
Correct |
1 ms |
384 KB |
Output is correct |
28 |
Correct |
1 ms |
384 KB |
Output is correct |
29 |
Correct |
3 ms |
512 KB |
Output is correct |
30 |
Correct |
3 ms |
512 KB |
Output is correct |
31 |
Correct |
3 ms |
512 KB |
Output is correct |
32 |
Correct |
3 ms |
384 KB |
Output is correct |
33 |
Correct |
2 ms |
384 KB |
Output is correct |
34 |
Correct |
2 ms |
512 KB |
Output is correct |
35 |
Correct |
3 ms |
512 KB |
Output is correct |
36 |
Correct |
2 ms |
512 KB |
Output is correct |
37 |
Correct |
3 ms |
512 KB |
Output is correct |
38 |
Correct |
4 ms |
512 KB |
Output is correct |
39 |
Correct |
2 ms |
512 KB |
Output is correct |
40 |
Correct |
2 ms |
512 KB |
Output is correct |
41 |
Correct |
2 ms |
512 KB |
Output is correct |
42 |
Correct |
2 ms |
512 KB |
Output is correct |
43 |
Correct |
2 ms |
384 KB |
Output is correct |
44 |
Correct |
2 ms |
512 KB |
Output is correct |
45 |
Correct |
2 ms |
384 KB |
Output is correct |
46 |
Correct |
2 ms |
512 KB |
Output is correct |
47 |
Correct |
2 ms |
384 KB |
Output is correct |
48 |
Correct |
2 ms |
512 KB |
Output is correct |
49 |
Correct |
3 ms |
512 KB |
Output is correct |
50 |
Correct |
2 ms |
512 KB |
Output is correct |
51 |
Correct |
2 ms |
384 KB |
Output is correct |
52 |
Correct |
2 ms |
512 KB |
Output is correct |
53 |
Correct |
2 ms |
512 KB |
Output is correct |
54 |
Correct |
3 ms |
512 KB |
Output is correct |
55 |
Correct |
150 ms |
12632 KB |
Output is correct |
56 |
Correct |
161 ms |
14596 KB |
Output is correct |
57 |
Correct |
157 ms |
12252 KB |
Output is correct |
58 |
Correct |
158 ms |
12508 KB |
Output is correct |
59 |
Correct |
157 ms |
12508 KB |
Output is correct |
60 |
Correct |
151 ms |
12252 KB |
Output is correct |
61 |
Correct |
158 ms |
12632 KB |
Output is correct |
62 |
Correct |
162 ms |
13532 KB |
Output is correct |
63 |
Correct |
158 ms |
12508 KB |
Output is correct |
64 |
Correct |
157 ms |
13276 KB |
Output is correct |
65 |
Correct |
157 ms |
11608 KB |
Output is correct |
66 |
Correct |
160 ms |
12120 KB |
Output is correct |
67 |
Correct |
162 ms |
12892 KB |
Output is correct |
68 |
Correct |
165 ms |
13404 KB |
Output is correct |
69 |
Correct |
485 ms |
12508 KB |
Output is correct |
70 |
Correct |
552 ms |
14684 KB |
Output is correct |
71 |
Correct |
499 ms |
14392 KB |
Output is correct |
72 |
Correct |
398 ms |
12536 KB |
Output is correct |
73 |
Correct |
399 ms |
12476 KB |
Output is correct |
74 |
Correct |
198 ms |
12632 KB |
Output is correct |
75 |
Correct |
235 ms |
13660 KB |
Output is correct |
76 |
Correct |
474 ms |
12380 KB |
Output is correct |
77 |
Correct |
454 ms |
12888 KB |
Output is correct |
78 |
Correct |
485 ms |
13532 KB |
Output is correct |
79 |
Correct |
513 ms |
11648 KB |
Output is correct |
80 |
Correct |
545 ms |
12508 KB |
Output is correct |
81 |
Correct |
576 ms |
13020 KB |
Output is correct |
82 |
Correct |
542 ms |
13404 KB |
Output is correct |
83 |
Correct |
135 ms |
4088 KB |
Output is correct |
84 |
Correct |
350 ms |
6392 KB |
Output is correct |
85 |
Correct |
155 ms |
5880 KB |
Output is correct |
86 |
Correct |
119 ms |
4216 KB |
Output is correct |
87 |
Correct |
89 ms |
4156 KB |
Output is correct |
88 |
Correct |
107 ms |
4600 KB |
Output is correct |
89 |
Correct |
160 ms |
4088 KB |
Output is correct |
90 |
Correct |
170 ms |
4984 KB |
Output is correct |
91 |
Correct |
152 ms |
3580 KB |
Output is correct |
92 |
Correct |
186 ms |
4348 KB |
Output is correct |
93 |
Correct |
214 ms |
4984 KB |
Output is correct |
94 |
Correct |
845 ms |
8648 KB |
Output is correct |
95 |
Execution timed out |
2083 ms |
10272 KB |
Time limit exceeded |
96 |
Halted |
0 ms |
0 KB |
- |