# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
1105277 |
2024-10-26T02:27:48 Z |
vjudge1 |
Maze (JOI23_ho_t3) |
C++17 |
|
1136 ms |
775468 KB |
#include <bits/stdc++.h>
//#define int long long
//#define ll long long
#define fi first
#define se second
#define pb push_back
#define all(lmao) lmao.begin(), lmao.end()
using namespace std;
typedef pair<int,int> pii;
typedef tuple<int,int,int> tp;
const int N = 6e6 + 5;
const int oo = 1e9 + 1;
const int mod = 1e9 + 7;
//const ll oo = 5e18;
const int ha[4] = {1, -1, 0, 0};
const int co[4] = {0, 0, 1, -1};
int m, n, k, xt, yt, xs, ys;
int ans;
vector<int> f[N];
vector<int> a[N], ph[N], pc[N];
deque<tp> q;
bool kt(int x,int y){
return x >= 1 && x <= m && y >= 1 && y <= n;
}
int row(int u,int v){
return (ph[u][v] == v ? v : ph[u][v] = row(u, ph[u][v]));
}
int col(int u,int v){
return (pc[u][v] == u ? u : pc[u][v] = col(pc[u][v], v));
}
void conduct(int val,int x,int y){
int l = max(1, x - k + 1), r = min(m, x + k - 1), pl = max(1, y - k + 1), pr = min(n, y + k - 1);
if(xt >= l && xt <= r && yt >= pl && yt <= pr) ans = min(ans, val + 1);
if(l - 1 >= 1){
int lx = l - 1, g = pr;
while(ph[lx][g] >= pl){
g = ph[lx][g];
if(f[lx][g] > val + 1) f[lx][g] = val + 1, q.push_back({f[lx][g], lx, g});
if(!ph[lx][g]) break;
ph[lx][g] = ph[lx][g - 1];
ph[lx][g] = row(lx, ph[lx][g]);
}
}
if(r + 1 <= m){
int lx = r + 1, g = pr;
while(ph[lx][g] >= pl){
g = ph[lx][g];
if(f[lx][g] > val + 1) f[lx][g] = val + 1, q.push_back({f[lx][g], lx, g});
if(!ph[lx][g]) break;
ph[lx][g] = ph[lx][g - 1];
ph[lx][g] = row(lx, ph[lx][g]);
}
}
if(pl - 1 >= 1){
int g = r, ly = pl - 1;
while(pc[g][ly] >= l){
g = pc[g][ly];
if(f[g][ly] > val + 1) f[g][ly] = val + 1, q.push_back({f[g][ly], g, ly});
if(!pc[g][ly]) break;
pc[g][ly] = pc[g - 1][ly];
pc[g][ly] = col(pc[g][ly], ly);
}
}
if(pr + 1 <= n){
int g = r, ly = pr + 1;
while(pc[g][ly] >= l){
g = pc[g][ly];
if(f[g][ly] > val + 1) f[g][ly] = val + 1, q.push_back({f[g][ly], g, ly});
if(!pc[g][ly]) break;
pc[g][ly] = pc[g - 1][ly];
pc[g][ly] = col(pc[g][ly], ly);
}
}
}
signed main(){
ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0);
#define task "v"
if(fopen(task ".inp","r")){
freopen(task ".inp","r",stdin);
freopen(task ".out","w",stdout);
}
cin >> m >> n >> k;
cin >> xs >> ys >> xt >> yt;
for(int i = 1; i <= m; i ++){
string s; cin >> s;
f[i].pb(oo);
a[i].pb(0);
ph[i].pb(0);
pc[i].pb(0);
for(int j = 0; j < n; j ++){
f[i].pb(oo);
pc[i].pb(0);
ph[i].pb(j + 1);
if(s[j] == '.') a[i].pb(0);
else a[i].pb(1);
}
f[i].pb(oo);
a[i].pb(0);
ph[i].pb(0);
pc[i].pb(0);
}
for(int i = 1; i <= n + 1; i ++) pc[0].pb(0);
for(int i = 1; i <= n; i ++){
for(int j = 1; j <= m; j ++){
pc[j][i] = j;
}
}
f[xs][ys] = 0;
q.push_back({0, xs, ys});
ans = oo;
while(!q.empty()){
int val, px, py; tie(val, px, py) = q.front();
q.pop_front();
if(val != f[px][py]) continue;
if(px == xt && py == yt) ans = min(ans, val);
conduct(val, px, py);
for(int d = 0; d < 4; d ++){
int x = px + ha[d];
int y = py + co[d];
if(!kt(x, y) || f[x][y] <= val || a[x][y]) continue;
q.push_front({f[x][y] = val, x, y});
if(ph[x][y]){
ph[x][y] = ph[x][y - 1];
ph[x][y] = row(x, ph[x][y]);
}
if(pc[x][y]){
pc[x][y] = pc[x - 1][y];
pc[x][y] = col(pc[x][y], y);
}
}
}
cout << min(ans, f[xt][yt]);
}
Compilation message
Main.cpp: In function 'int main()':
Main.cpp:92:16: warning: ignoring return value of 'FILE* freopen(const char*, const char*, FILE*)' declared with attribute 'warn_unused_result' [-Wunused-result]
92 | freopen(task ".inp","r",stdin);
| ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~
Main.cpp:93:16: warning: ignoring return value of 'FILE* freopen(const char*, const char*, FILE*)' declared with attribute 'warn_unused_result' [-Wunused-result]
93 | freopen(task ".out","w",stdout);
| ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
372 ms |
564040 KB |
Output is correct |
2 |
Correct |
368 ms |
563836 KB |
Output is correct |
3 |
Correct |
389 ms |
564044 KB |
Output is correct |
4 |
Correct |
400 ms |
564040 KB |
Output is correct |
5 |
Correct |
408 ms |
564040 KB |
Output is correct |
6 |
Correct |
384 ms |
564040 KB |
Output is correct |
7 |
Correct |
393 ms |
563972 KB |
Output is correct |
8 |
Correct |
377 ms |
563916 KB |
Output is correct |
9 |
Correct |
381 ms |
564048 KB |
Output is correct |
10 |
Correct |
355 ms |
563940 KB |
Output is correct |
11 |
Correct |
372 ms |
564040 KB |
Output is correct |
12 |
Correct |
363 ms |
564040 KB |
Output is correct |
13 |
Correct |
352 ms |
564044 KB |
Output is correct |
14 |
Correct |
349 ms |
564040 KB |
Output is correct |
15 |
Correct |
369 ms |
563936 KB |
Output is correct |
16 |
Correct |
364 ms |
564040 KB |
Output is correct |
17 |
Correct |
386 ms |
564056 KB |
Output is correct |
18 |
Correct |
398 ms |
564040 KB |
Output is correct |
19 |
Correct |
386 ms |
565064 KB |
Output is correct |
20 |
Correct |
375 ms |
565172 KB |
Output is correct |
21 |
Correct |
396 ms |
565672 KB |
Output is correct |
22 |
Correct |
407 ms |
564916 KB |
Output is correct |
23 |
Correct |
385 ms |
564836 KB |
Output is correct |
24 |
Correct |
405 ms |
565520 KB |
Output is correct |
25 |
Correct |
400 ms |
565388 KB |
Output is correct |
26 |
Correct |
391 ms |
565064 KB |
Output is correct |
27 |
Correct |
403 ms |
565064 KB |
Output is correct |
28 |
Correct |
428 ms |
565192 KB |
Output is correct |
29 |
Correct |
427 ms |
567116 KB |
Output is correct |
30 |
Correct |
390 ms |
565320 KB |
Output is correct |
31 |
Correct |
400 ms |
569672 KB |
Output is correct |
32 |
Correct |
420 ms |
567020 KB |
Output is correct |
33 |
Correct |
412 ms |
567112 KB |
Output is correct |
34 |
Correct |
411 ms |
567964 KB |
Output is correct |
35 |
Correct |
420 ms |
567960 KB |
Output is correct |
36 |
Correct |
404 ms |
567220 KB |
Output is correct |
37 |
Correct |
404 ms |
567368 KB |
Output is correct |
38 |
Correct |
408 ms |
567312 KB |
Output is correct |
39 |
Correct |
516 ms |
604908 KB |
Output is correct |
40 |
Correct |
414 ms |
567208 KB |
Output is correct |
41 |
Correct |
414 ms |
568584 KB |
Output is correct |
42 |
Correct |
390 ms |
570008 KB |
Output is correct |
43 |
Correct |
361 ms |
569088 KB |
Output is correct |
44 |
Correct |
411 ms |
578084 KB |
Output is correct |
45 |
Correct |
406 ms |
580876 KB |
Output is correct |
46 |
Correct |
464 ms |
627404 KB |
Output is correct |
47 |
Correct |
531 ms |
605000 KB |
Output is correct |
48 |
Correct |
453 ms |
603448 KB |
Output is correct |
49 |
Correct |
484 ms |
599896 KB |
Output is correct |
50 |
Correct |
490 ms |
600960 KB |
Output is correct |
51 |
Correct |
565 ms |
605440 KB |
Output is correct |
52 |
Correct |
564 ms |
604488 KB |
Output is correct |
53 |
Correct |
512 ms |
605188 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
383 ms |
564024 KB |
Output is correct |
2 |
Correct |
400 ms |
564040 KB |
Output is correct |
3 |
Correct |
404 ms |
564040 KB |
Output is correct |
4 |
Correct |
379 ms |
563976 KB |
Output is correct |
5 |
Correct |
429 ms |
564040 KB |
Output is correct |
6 |
Correct |
379 ms |
563928 KB |
Output is correct |
7 |
Correct |
392 ms |
564040 KB |
Output is correct |
8 |
Correct |
407 ms |
564040 KB |
Output is correct |
9 |
Correct |
386 ms |
563916 KB |
Output is correct |
10 |
Correct |
371 ms |
564040 KB |
Output is correct |
11 |
Correct |
370 ms |
563872 KB |
Output is correct |
12 |
Correct |
379 ms |
564040 KB |
Output is correct |
13 |
Correct |
386 ms |
564040 KB |
Output is correct |
14 |
Correct |
376 ms |
564040 KB |
Output is correct |
15 |
Correct |
346 ms |
564032 KB |
Output is correct |
16 |
Correct |
345 ms |
563968 KB |
Output is correct |
17 |
Correct |
350 ms |
564040 KB |
Output is correct |
18 |
Correct |
340 ms |
564040 KB |
Output is correct |
19 |
Correct |
342 ms |
563984 KB |
Output is correct |
20 |
Correct |
347 ms |
564068 KB |
Output is correct |
21 |
Correct |
355 ms |
563960 KB |
Output is correct |
22 |
Correct |
343 ms |
564048 KB |
Output is correct |
23 |
Correct |
381 ms |
564044 KB |
Output is correct |
24 |
Correct |
386 ms |
564040 KB |
Output is correct |
25 |
Correct |
392 ms |
564040 KB |
Output is correct |
26 |
Correct |
383 ms |
564248 KB |
Output is correct |
27 |
Correct |
400 ms |
563924 KB |
Output is correct |
28 |
Correct |
404 ms |
564044 KB |
Output is correct |
29 |
Correct |
382 ms |
564040 KB |
Output is correct |
30 |
Correct |
392 ms |
564040 KB |
Output is correct |
31 |
Correct |
406 ms |
564044 KB |
Output is correct |
32 |
Correct |
393 ms |
564044 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
377 ms |
564012 KB |
Output is correct |
2 |
Correct |
384 ms |
564048 KB |
Output is correct |
3 |
Correct |
378 ms |
563796 KB |
Output is correct |
4 |
Correct |
374 ms |
564052 KB |
Output is correct |
5 |
Correct |
378 ms |
563932 KB |
Output is correct |
6 |
Correct |
381 ms |
564040 KB |
Output is correct |
7 |
Correct |
347 ms |
564100 KB |
Output is correct |
8 |
Correct |
338 ms |
564200 KB |
Output is correct |
9 |
Correct |
351 ms |
564040 KB |
Output is correct |
10 |
Correct |
337 ms |
564040 KB |
Output is correct |
11 |
Correct |
343 ms |
564296 KB |
Output is correct |
12 |
Correct |
338 ms |
563948 KB |
Output is correct |
13 |
Correct |
336 ms |
564040 KB |
Output is correct |
14 |
Correct |
349 ms |
564040 KB |
Output is correct |
15 |
Correct |
383 ms |
564040 KB |
Output is correct |
16 |
Correct |
382 ms |
564296 KB |
Output is correct |
17 |
Correct |
387 ms |
564040 KB |
Output is correct |
18 |
Correct |
394 ms |
564048 KB |
Output is correct |
19 |
Correct |
368 ms |
564040 KB |
Output is correct |
20 |
Correct |
399 ms |
563992 KB |
Output is correct |
21 |
Correct |
390 ms |
564040 KB |
Output is correct |
22 |
Correct |
402 ms |
564040 KB |
Output is correct |
23 |
Correct |
366 ms |
564052 KB |
Output is correct |
24 |
Correct |
380 ms |
564040 KB |
Output is correct |
25 |
Correct |
372 ms |
565136 KB |
Output is correct |
26 |
Correct |
374 ms |
566204 KB |
Output is correct |
27 |
Correct |
378 ms |
565836 KB |
Output is correct |
28 |
Correct |
377 ms |
565324 KB |
Output is correct |
29 |
Correct |
364 ms |
565008 KB |
Output is correct |
30 |
Correct |
371 ms |
565064 KB |
Output is correct |
31 |
Correct |
370 ms |
565052 KB |
Output is correct |
32 |
Correct |
412 ms |
565136 KB |
Output is correct |
33 |
Correct |
393 ms |
565064 KB |
Output is correct |
34 |
Correct |
367 ms |
568904 KB |
Output is correct |
35 |
Correct |
366 ms |
569968 KB |
Output is correct |
36 |
Correct |
326 ms |
568032 KB |
Output is correct |
37 |
Correct |
324 ms |
567076 KB |
Output is correct |
38 |
Correct |
317 ms |
567124 KB |
Output is correct |
39 |
Correct |
389 ms |
579860 KB |
Output is correct |
40 |
Correct |
481 ms |
604128 KB |
Output is correct |
41 |
Correct |
439 ms |
626636 KB |
Output is correct |
42 |
Correct |
407 ms |
608492 KB |
Output is correct |
43 |
Correct |
366 ms |
605000 KB |
Output is correct |
44 |
Correct |
362 ms |
603208 KB |
Output is correct |
45 |
Correct |
544 ms |
608020 KB |
Output is correct |
46 |
Correct |
492 ms |
610040 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
383 ms |
564024 KB |
Output is correct |
2 |
Correct |
400 ms |
564040 KB |
Output is correct |
3 |
Correct |
404 ms |
564040 KB |
Output is correct |
4 |
Correct |
379 ms |
563976 KB |
Output is correct |
5 |
Correct |
429 ms |
564040 KB |
Output is correct |
6 |
Correct |
379 ms |
563928 KB |
Output is correct |
7 |
Correct |
392 ms |
564040 KB |
Output is correct |
8 |
Correct |
407 ms |
564040 KB |
Output is correct |
9 |
Correct |
386 ms |
563916 KB |
Output is correct |
10 |
Correct |
371 ms |
564040 KB |
Output is correct |
11 |
Correct |
370 ms |
563872 KB |
Output is correct |
12 |
Correct |
379 ms |
564040 KB |
Output is correct |
13 |
Correct |
386 ms |
564040 KB |
Output is correct |
14 |
Correct |
376 ms |
564040 KB |
Output is correct |
15 |
Correct |
346 ms |
564032 KB |
Output is correct |
16 |
Correct |
345 ms |
563968 KB |
Output is correct |
17 |
Correct |
350 ms |
564040 KB |
Output is correct |
18 |
Correct |
340 ms |
564040 KB |
Output is correct |
19 |
Correct |
342 ms |
563984 KB |
Output is correct |
20 |
Correct |
347 ms |
564068 KB |
Output is correct |
21 |
Correct |
355 ms |
563960 KB |
Output is correct |
22 |
Correct |
343 ms |
564048 KB |
Output is correct |
23 |
Correct |
381 ms |
564044 KB |
Output is correct |
24 |
Correct |
386 ms |
564040 KB |
Output is correct |
25 |
Correct |
392 ms |
564040 KB |
Output is correct |
26 |
Correct |
383 ms |
564248 KB |
Output is correct |
27 |
Correct |
400 ms |
563924 KB |
Output is correct |
28 |
Correct |
404 ms |
564044 KB |
Output is correct |
29 |
Correct |
382 ms |
564040 KB |
Output is correct |
30 |
Correct |
392 ms |
564040 KB |
Output is correct |
31 |
Correct |
406 ms |
564044 KB |
Output is correct |
32 |
Correct |
393 ms |
564044 KB |
Output is correct |
33 |
Correct |
361 ms |
564960 KB |
Output is correct |
34 |
Correct |
383 ms |
564044 KB |
Output is correct |
35 |
Correct |
346 ms |
564044 KB |
Output is correct |
36 |
Correct |
358 ms |
565092 KB |
Output is correct |
37 |
Correct |
355 ms |
565148 KB |
Output is correct |
38 |
Correct |
357 ms |
566184 KB |
Output is correct |
39 |
Correct |
371 ms |
565856 KB |
Output is correct |
40 |
Correct |
357 ms |
565128 KB |
Output is correct |
41 |
Correct |
358 ms |
565064 KB |
Output is correct |
42 |
Correct |
357 ms |
565332 KB |
Output is correct |
43 |
Correct |
356 ms |
564808 KB |
Output is correct |
44 |
Correct |
368 ms |
564808 KB |
Output is correct |
45 |
Correct |
359 ms |
565388 KB |
Output is correct |
46 |
Correct |
353 ms |
565388 KB |
Output is correct |
47 |
Correct |
377 ms |
565388 KB |
Output is correct |
48 |
Correct |
385 ms |
564936 KB |
Output is correct |
49 |
Correct |
333 ms |
565576 KB |
Output is correct |
50 |
Correct |
322 ms |
565156 KB |
Output is correct |
51 |
Correct |
322 ms |
565064 KB |
Output is correct |
52 |
Correct |
336 ms |
565064 KB |
Output is correct |
53 |
Correct |
334 ms |
565072 KB |
Output is correct |
54 |
Correct |
332 ms |
565064 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
383 ms |
564024 KB |
Output is correct |
2 |
Correct |
400 ms |
564040 KB |
Output is correct |
3 |
Correct |
404 ms |
564040 KB |
Output is correct |
4 |
Correct |
379 ms |
563976 KB |
Output is correct |
5 |
Correct |
429 ms |
564040 KB |
Output is correct |
6 |
Correct |
379 ms |
563928 KB |
Output is correct |
7 |
Correct |
392 ms |
564040 KB |
Output is correct |
8 |
Correct |
407 ms |
564040 KB |
Output is correct |
9 |
Correct |
386 ms |
563916 KB |
Output is correct |
10 |
Correct |
371 ms |
564040 KB |
Output is correct |
11 |
Correct |
370 ms |
563872 KB |
Output is correct |
12 |
Correct |
379 ms |
564040 KB |
Output is correct |
13 |
Correct |
386 ms |
564040 KB |
Output is correct |
14 |
Correct |
376 ms |
564040 KB |
Output is correct |
15 |
Correct |
346 ms |
564032 KB |
Output is correct |
16 |
Correct |
345 ms |
563968 KB |
Output is correct |
17 |
Correct |
350 ms |
564040 KB |
Output is correct |
18 |
Correct |
340 ms |
564040 KB |
Output is correct |
19 |
Correct |
342 ms |
563984 KB |
Output is correct |
20 |
Correct |
347 ms |
564068 KB |
Output is correct |
21 |
Correct |
355 ms |
563960 KB |
Output is correct |
22 |
Correct |
343 ms |
564048 KB |
Output is correct |
23 |
Correct |
381 ms |
564044 KB |
Output is correct |
24 |
Correct |
386 ms |
564040 KB |
Output is correct |
25 |
Correct |
392 ms |
564040 KB |
Output is correct |
26 |
Correct |
383 ms |
564248 KB |
Output is correct |
27 |
Correct |
400 ms |
563924 KB |
Output is correct |
28 |
Correct |
404 ms |
564044 KB |
Output is correct |
29 |
Correct |
382 ms |
564040 KB |
Output is correct |
30 |
Correct |
392 ms |
564040 KB |
Output is correct |
31 |
Correct |
406 ms |
564044 KB |
Output is correct |
32 |
Correct |
393 ms |
564044 KB |
Output is correct |
33 |
Correct |
361 ms |
564960 KB |
Output is correct |
34 |
Correct |
383 ms |
564044 KB |
Output is correct |
35 |
Correct |
346 ms |
564044 KB |
Output is correct |
36 |
Correct |
358 ms |
565092 KB |
Output is correct |
37 |
Correct |
355 ms |
565148 KB |
Output is correct |
38 |
Correct |
357 ms |
566184 KB |
Output is correct |
39 |
Correct |
371 ms |
565856 KB |
Output is correct |
40 |
Correct |
357 ms |
565128 KB |
Output is correct |
41 |
Correct |
358 ms |
565064 KB |
Output is correct |
42 |
Correct |
357 ms |
565332 KB |
Output is correct |
43 |
Correct |
356 ms |
564808 KB |
Output is correct |
44 |
Correct |
368 ms |
564808 KB |
Output is correct |
45 |
Correct |
359 ms |
565388 KB |
Output is correct |
46 |
Correct |
353 ms |
565388 KB |
Output is correct |
47 |
Correct |
377 ms |
565388 KB |
Output is correct |
48 |
Correct |
385 ms |
564936 KB |
Output is correct |
49 |
Correct |
333 ms |
565576 KB |
Output is correct |
50 |
Correct |
322 ms |
565156 KB |
Output is correct |
51 |
Correct |
322 ms |
565064 KB |
Output is correct |
52 |
Correct |
336 ms |
565064 KB |
Output is correct |
53 |
Correct |
334 ms |
565072 KB |
Output is correct |
54 |
Correct |
332 ms |
565064 KB |
Output is correct |
55 |
Correct |
327 ms |
567344 KB |
Output is correct |
56 |
Correct |
337 ms |
565320 KB |
Output is correct |
57 |
Correct |
359 ms |
568924 KB |
Output is correct |
58 |
Correct |
389 ms |
566736 KB |
Output is correct |
59 |
Correct |
358 ms |
569672 KB |
Output is correct |
60 |
Correct |
370 ms |
567368 KB |
Output is correct |
61 |
Correct |
352 ms |
567252 KB |
Output is correct |
62 |
Correct |
346 ms |
567880 KB |
Output is correct |
63 |
Correct |
352 ms |
567112 KB |
Output is correct |
64 |
Correct |
338 ms |
567112 KB |
Output is correct |
65 |
Correct |
379 ms |
568036 KB |
Output is correct |
66 |
Correct |
377 ms |
567964 KB |
Output is correct |
67 |
Correct |
362 ms |
567600 KB |
Output is correct |
68 |
Correct |
362 ms |
566856 KB |
Output is correct |
69 |
Correct |
392 ms |
567092 KB |
Output is correct |
70 |
Correct |
376 ms |
567412 KB |
Output is correct |
71 |
Correct |
370 ms |
566856 KB |
Output is correct |
72 |
Correct |
375 ms |
567368 KB |
Output is correct |
73 |
Correct |
368 ms |
567368 KB |
Output is correct |
74 |
Correct |
349 ms |
567124 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
372 ms |
564040 KB |
Output is correct |
2 |
Correct |
368 ms |
563836 KB |
Output is correct |
3 |
Correct |
389 ms |
564044 KB |
Output is correct |
4 |
Correct |
400 ms |
564040 KB |
Output is correct |
5 |
Correct |
408 ms |
564040 KB |
Output is correct |
6 |
Correct |
384 ms |
564040 KB |
Output is correct |
7 |
Correct |
393 ms |
563972 KB |
Output is correct |
8 |
Correct |
377 ms |
563916 KB |
Output is correct |
9 |
Correct |
381 ms |
564048 KB |
Output is correct |
10 |
Correct |
355 ms |
563940 KB |
Output is correct |
11 |
Correct |
372 ms |
564040 KB |
Output is correct |
12 |
Correct |
363 ms |
564040 KB |
Output is correct |
13 |
Correct |
352 ms |
564044 KB |
Output is correct |
14 |
Correct |
349 ms |
564040 KB |
Output is correct |
15 |
Correct |
369 ms |
563936 KB |
Output is correct |
16 |
Correct |
364 ms |
564040 KB |
Output is correct |
17 |
Correct |
386 ms |
564056 KB |
Output is correct |
18 |
Correct |
398 ms |
564040 KB |
Output is correct |
19 |
Correct |
386 ms |
565064 KB |
Output is correct |
20 |
Correct |
375 ms |
565172 KB |
Output is correct |
21 |
Correct |
396 ms |
565672 KB |
Output is correct |
22 |
Correct |
407 ms |
564916 KB |
Output is correct |
23 |
Correct |
385 ms |
564836 KB |
Output is correct |
24 |
Correct |
405 ms |
565520 KB |
Output is correct |
25 |
Correct |
400 ms |
565388 KB |
Output is correct |
26 |
Correct |
391 ms |
565064 KB |
Output is correct |
27 |
Correct |
403 ms |
565064 KB |
Output is correct |
28 |
Correct |
428 ms |
565192 KB |
Output is correct |
29 |
Correct |
427 ms |
567116 KB |
Output is correct |
30 |
Correct |
390 ms |
565320 KB |
Output is correct |
31 |
Correct |
400 ms |
569672 KB |
Output is correct |
32 |
Correct |
420 ms |
567020 KB |
Output is correct |
33 |
Correct |
412 ms |
567112 KB |
Output is correct |
34 |
Correct |
411 ms |
567964 KB |
Output is correct |
35 |
Correct |
420 ms |
567960 KB |
Output is correct |
36 |
Correct |
404 ms |
567220 KB |
Output is correct |
37 |
Correct |
404 ms |
567368 KB |
Output is correct |
38 |
Correct |
408 ms |
567312 KB |
Output is correct |
39 |
Correct |
516 ms |
604908 KB |
Output is correct |
40 |
Correct |
414 ms |
567208 KB |
Output is correct |
41 |
Correct |
414 ms |
568584 KB |
Output is correct |
42 |
Correct |
390 ms |
570008 KB |
Output is correct |
43 |
Correct |
361 ms |
569088 KB |
Output is correct |
44 |
Correct |
411 ms |
578084 KB |
Output is correct |
45 |
Correct |
406 ms |
580876 KB |
Output is correct |
46 |
Correct |
464 ms |
627404 KB |
Output is correct |
47 |
Correct |
531 ms |
605000 KB |
Output is correct |
48 |
Correct |
453 ms |
603448 KB |
Output is correct |
49 |
Correct |
484 ms |
599896 KB |
Output is correct |
50 |
Correct |
490 ms |
600960 KB |
Output is correct |
51 |
Correct |
565 ms |
605440 KB |
Output is correct |
52 |
Correct |
564 ms |
604488 KB |
Output is correct |
53 |
Correct |
512 ms |
605188 KB |
Output is correct |
54 |
Correct |
383 ms |
564024 KB |
Output is correct |
55 |
Correct |
400 ms |
564040 KB |
Output is correct |
56 |
Correct |
404 ms |
564040 KB |
Output is correct |
57 |
Correct |
379 ms |
563976 KB |
Output is correct |
58 |
Correct |
429 ms |
564040 KB |
Output is correct |
59 |
Correct |
379 ms |
563928 KB |
Output is correct |
60 |
Correct |
392 ms |
564040 KB |
Output is correct |
61 |
Correct |
407 ms |
564040 KB |
Output is correct |
62 |
Correct |
386 ms |
563916 KB |
Output is correct |
63 |
Correct |
371 ms |
564040 KB |
Output is correct |
64 |
Correct |
370 ms |
563872 KB |
Output is correct |
65 |
Correct |
379 ms |
564040 KB |
Output is correct |
66 |
Correct |
386 ms |
564040 KB |
Output is correct |
67 |
Correct |
376 ms |
564040 KB |
Output is correct |
68 |
Correct |
346 ms |
564032 KB |
Output is correct |
69 |
Correct |
345 ms |
563968 KB |
Output is correct |
70 |
Correct |
350 ms |
564040 KB |
Output is correct |
71 |
Correct |
340 ms |
564040 KB |
Output is correct |
72 |
Correct |
342 ms |
563984 KB |
Output is correct |
73 |
Correct |
347 ms |
564068 KB |
Output is correct |
74 |
Correct |
355 ms |
563960 KB |
Output is correct |
75 |
Correct |
343 ms |
564048 KB |
Output is correct |
76 |
Correct |
381 ms |
564044 KB |
Output is correct |
77 |
Correct |
386 ms |
564040 KB |
Output is correct |
78 |
Correct |
392 ms |
564040 KB |
Output is correct |
79 |
Correct |
383 ms |
564248 KB |
Output is correct |
80 |
Correct |
400 ms |
563924 KB |
Output is correct |
81 |
Correct |
404 ms |
564044 KB |
Output is correct |
82 |
Correct |
382 ms |
564040 KB |
Output is correct |
83 |
Correct |
392 ms |
564040 KB |
Output is correct |
84 |
Correct |
406 ms |
564044 KB |
Output is correct |
85 |
Correct |
393 ms |
564044 KB |
Output is correct |
86 |
Correct |
377 ms |
564012 KB |
Output is correct |
87 |
Correct |
384 ms |
564048 KB |
Output is correct |
88 |
Correct |
378 ms |
563796 KB |
Output is correct |
89 |
Correct |
374 ms |
564052 KB |
Output is correct |
90 |
Correct |
378 ms |
563932 KB |
Output is correct |
91 |
Correct |
381 ms |
564040 KB |
Output is correct |
92 |
Correct |
347 ms |
564100 KB |
Output is correct |
93 |
Correct |
338 ms |
564200 KB |
Output is correct |
94 |
Correct |
351 ms |
564040 KB |
Output is correct |
95 |
Correct |
337 ms |
564040 KB |
Output is correct |
96 |
Correct |
343 ms |
564296 KB |
Output is correct |
97 |
Correct |
338 ms |
563948 KB |
Output is correct |
98 |
Correct |
336 ms |
564040 KB |
Output is correct |
99 |
Correct |
349 ms |
564040 KB |
Output is correct |
100 |
Correct |
383 ms |
564040 KB |
Output is correct |
101 |
Correct |
382 ms |
564296 KB |
Output is correct |
102 |
Correct |
387 ms |
564040 KB |
Output is correct |
103 |
Correct |
394 ms |
564048 KB |
Output is correct |
104 |
Correct |
368 ms |
564040 KB |
Output is correct |
105 |
Correct |
399 ms |
563992 KB |
Output is correct |
106 |
Correct |
390 ms |
564040 KB |
Output is correct |
107 |
Correct |
402 ms |
564040 KB |
Output is correct |
108 |
Correct |
366 ms |
564052 KB |
Output is correct |
109 |
Correct |
380 ms |
564040 KB |
Output is correct |
110 |
Correct |
372 ms |
565136 KB |
Output is correct |
111 |
Correct |
374 ms |
566204 KB |
Output is correct |
112 |
Correct |
378 ms |
565836 KB |
Output is correct |
113 |
Correct |
377 ms |
565324 KB |
Output is correct |
114 |
Correct |
364 ms |
565008 KB |
Output is correct |
115 |
Correct |
371 ms |
565064 KB |
Output is correct |
116 |
Correct |
370 ms |
565052 KB |
Output is correct |
117 |
Correct |
412 ms |
565136 KB |
Output is correct |
118 |
Correct |
393 ms |
565064 KB |
Output is correct |
119 |
Correct |
367 ms |
568904 KB |
Output is correct |
120 |
Correct |
366 ms |
569968 KB |
Output is correct |
121 |
Correct |
326 ms |
568032 KB |
Output is correct |
122 |
Correct |
324 ms |
567076 KB |
Output is correct |
123 |
Correct |
317 ms |
567124 KB |
Output is correct |
124 |
Correct |
389 ms |
579860 KB |
Output is correct |
125 |
Correct |
481 ms |
604128 KB |
Output is correct |
126 |
Correct |
439 ms |
626636 KB |
Output is correct |
127 |
Correct |
407 ms |
608492 KB |
Output is correct |
128 |
Correct |
366 ms |
605000 KB |
Output is correct |
129 |
Correct |
362 ms |
603208 KB |
Output is correct |
130 |
Correct |
544 ms |
608020 KB |
Output is correct |
131 |
Correct |
492 ms |
610040 KB |
Output is correct |
132 |
Correct |
361 ms |
564960 KB |
Output is correct |
133 |
Correct |
383 ms |
564044 KB |
Output is correct |
134 |
Correct |
346 ms |
564044 KB |
Output is correct |
135 |
Correct |
358 ms |
565092 KB |
Output is correct |
136 |
Correct |
355 ms |
565148 KB |
Output is correct |
137 |
Correct |
357 ms |
566184 KB |
Output is correct |
138 |
Correct |
371 ms |
565856 KB |
Output is correct |
139 |
Correct |
357 ms |
565128 KB |
Output is correct |
140 |
Correct |
358 ms |
565064 KB |
Output is correct |
141 |
Correct |
357 ms |
565332 KB |
Output is correct |
142 |
Correct |
356 ms |
564808 KB |
Output is correct |
143 |
Correct |
368 ms |
564808 KB |
Output is correct |
144 |
Correct |
359 ms |
565388 KB |
Output is correct |
145 |
Correct |
353 ms |
565388 KB |
Output is correct |
146 |
Correct |
377 ms |
565388 KB |
Output is correct |
147 |
Correct |
385 ms |
564936 KB |
Output is correct |
148 |
Correct |
333 ms |
565576 KB |
Output is correct |
149 |
Correct |
322 ms |
565156 KB |
Output is correct |
150 |
Correct |
322 ms |
565064 KB |
Output is correct |
151 |
Correct |
336 ms |
565064 KB |
Output is correct |
152 |
Correct |
334 ms |
565072 KB |
Output is correct |
153 |
Correct |
332 ms |
565064 KB |
Output is correct |
154 |
Correct |
327 ms |
567344 KB |
Output is correct |
155 |
Correct |
337 ms |
565320 KB |
Output is correct |
156 |
Correct |
359 ms |
568924 KB |
Output is correct |
157 |
Correct |
389 ms |
566736 KB |
Output is correct |
158 |
Correct |
358 ms |
569672 KB |
Output is correct |
159 |
Correct |
370 ms |
567368 KB |
Output is correct |
160 |
Correct |
352 ms |
567252 KB |
Output is correct |
161 |
Correct |
346 ms |
567880 KB |
Output is correct |
162 |
Correct |
352 ms |
567112 KB |
Output is correct |
163 |
Correct |
338 ms |
567112 KB |
Output is correct |
164 |
Correct |
379 ms |
568036 KB |
Output is correct |
165 |
Correct |
377 ms |
567964 KB |
Output is correct |
166 |
Correct |
362 ms |
567600 KB |
Output is correct |
167 |
Correct |
362 ms |
566856 KB |
Output is correct |
168 |
Correct |
392 ms |
567092 KB |
Output is correct |
169 |
Correct |
376 ms |
567412 KB |
Output is correct |
170 |
Correct |
370 ms |
566856 KB |
Output is correct |
171 |
Correct |
375 ms |
567368 KB |
Output is correct |
172 |
Correct |
368 ms |
567368 KB |
Output is correct |
173 |
Correct |
349 ms |
567124 KB |
Output is correct |
174 |
Correct |
346 ms |
567684 KB |
Output is correct |
175 |
Correct |
356 ms |
570524 KB |
Output is correct |
176 |
Correct |
380 ms |
579248 KB |
Output is correct |
177 |
Correct |
418 ms |
582260 KB |
Output is correct |
178 |
Correct |
460 ms |
588612 KB |
Output is correct |
179 |
Correct |
434 ms |
594044 KB |
Output is correct |
180 |
Correct |
504 ms |
590680 KB |
Output is correct |
181 |
Correct |
457 ms |
591440 KB |
Output is correct |
182 |
Correct |
459 ms |
592200 KB |
Output is correct |
183 |
Correct |
499 ms |
595064 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
372 ms |
564040 KB |
Output is correct |
2 |
Correct |
368 ms |
563836 KB |
Output is correct |
3 |
Correct |
389 ms |
564044 KB |
Output is correct |
4 |
Correct |
400 ms |
564040 KB |
Output is correct |
5 |
Correct |
408 ms |
564040 KB |
Output is correct |
6 |
Correct |
384 ms |
564040 KB |
Output is correct |
7 |
Correct |
393 ms |
563972 KB |
Output is correct |
8 |
Correct |
377 ms |
563916 KB |
Output is correct |
9 |
Correct |
381 ms |
564048 KB |
Output is correct |
10 |
Correct |
355 ms |
563940 KB |
Output is correct |
11 |
Correct |
372 ms |
564040 KB |
Output is correct |
12 |
Correct |
363 ms |
564040 KB |
Output is correct |
13 |
Correct |
352 ms |
564044 KB |
Output is correct |
14 |
Correct |
349 ms |
564040 KB |
Output is correct |
15 |
Correct |
369 ms |
563936 KB |
Output is correct |
16 |
Correct |
364 ms |
564040 KB |
Output is correct |
17 |
Correct |
386 ms |
564056 KB |
Output is correct |
18 |
Correct |
398 ms |
564040 KB |
Output is correct |
19 |
Correct |
386 ms |
565064 KB |
Output is correct |
20 |
Correct |
375 ms |
565172 KB |
Output is correct |
21 |
Correct |
396 ms |
565672 KB |
Output is correct |
22 |
Correct |
407 ms |
564916 KB |
Output is correct |
23 |
Correct |
385 ms |
564836 KB |
Output is correct |
24 |
Correct |
405 ms |
565520 KB |
Output is correct |
25 |
Correct |
400 ms |
565388 KB |
Output is correct |
26 |
Correct |
391 ms |
565064 KB |
Output is correct |
27 |
Correct |
403 ms |
565064 KB |
Output is correct |
28 |
Correct |
428 ms |
565192 KB |
Output is correct |
29 |
Correct |
427 ms |
567116 KB |
Output is correct |
30 |
Correct |
390 ms |
565320 KB |
Output is correct |
31 |
Correct |
400 ms |
569672 KB |
Output is correct |
32 |
Correct |
420 ms |
567020 KB |
Output is correct |
33 |
Correct |
412 ms |
567112 KB |
Output is correct |
34 |
Correct |
411 ms |
567964 KB |
Output is correct |
35 |
Correct |
420 ms |
567960 KB |
Output is correct |
36 |
Correct |
404 ms |
567220 KB |
Output is correct |
37 |
Correct |
404 ms |
567368 KB |
Output is correct |
38 |
Correct |
408 ms |
567312 KB |
Output is correct |
39 |
Correct |
516 ms |
604908 KB |
Output is correct |
40 |
Correct |
414 ms |
567208 KB |
Output is correct |
41 |
Correct |
414 ms |
568584 KB |
Output is correct |
42 |
Correct |
390 ms |
570008 KB |
Output is correct |
43 |
Correct |
361 ms |
569088 KB |
Output is correct |
44 |
Correct |
411 ms |
578084 KB |
Output is correct |
45 |
Correct |
406 ms |
580876 KB |
Output is correct |
46 |
Correct |
464 ms |
627404 KB |
Output is correct |
47 |
Correct |
531 ms |
605000 KB |
Output is correct |
48 |
Correct |
453 ms |
603448 KB |
Output is correct |
49 |
Correct |
484 ms |
599896 KB |
Output is correct |
50 |
Correct |
490 ms |
600960 KB |
Output is correct |
51 |
Correct |
565 ms |
605440 KB |
Output is correct |
52 |
Correct |
564 ms |
604488 KB |
Output is correct |
53 |
Correct |
512 ms |
605188 KB |
Output is correct |
54 |
Correct |
383 ms |
564024 KB |
Output is correct |
55 |
Correct |
400 ms |
564040 KB |
Output is correct |
56 |
Correct |
404 ms |
564040 KB |
Output is correct |
57 |
Correct |
379 ms |
563976 KB |
Output is correct |
58 |
Correct |
429 ms |
564040 KB |
Output is correct |
59 |
Correct |
379 ms |
563928 KB |
Output is correct |
60 |
Correct |
392 ms |
564040 KB |
Output is correct |
61 |
Correct |
407 ms |
564040 KB |
Output is correct |
62 |
Correct |
386 ms |
563916 KB |
Output is correct |
63 |
Correct |
371 ms |
564040 KB |
Output is correct |
64 |
Correct |
370 ms |
563872 KB |
Output is correct |
65 |
Correct |
379 ms |
564040 KB |
Output is correct |
66 |
Correct |
386 ms |
564040 KB |
Output is correct |
67 |
Correct |
376 ms |
564040 KB |
Output is correct |
68 |
Correct |
346 ms |
564032 KB |
Output is correct |
69 |
Correct |
345 ms |
563968 KB |
Output is correct |
70 |
Correct |
350 ms |
564040 KB |
Output is correct |
71 |
Correct |
340 ms |
564040 KB |
Output is correct |
72 |
Correct |
342 ms |
563984 KB |
Output is correct |
73 |
Correct |
347 ms |
564068 KB |
Output is correct |
74 |
Correct |
355 ms |
563960 KB |
Output is correct |
75 |
Correct |
343 ms |
564048 KB |
Output is correct |
76 |
Correct |
381 ms |
564044 KB |
Output is correct |
77 |
Correct |
386 ms |
564040 KB |
Output is correct |
78 |
Correct |
392 ms |
564040 KB |
Output is correct |
79 |
Correct |
383 ms |
564248 KB |
Output is correct |
80 |
Correct |
400 ms |
563924 KB |
Output is correct |
81 |
Correct |
404 ms |
564044 KB |
Output is correct |
82 |
Correct |
382 ms |
564040 KB |
Output is correct |
83 |
Correct |
392 ms |
564040 KB |
Output is correct |
84 |
Correct |
406 ms |
564044 KB |
Output is correct |
85 |
Correct |
393 ms |
564044 KB |
Output is correct |
86 |
Correct |
377 ms |
564012 KB |
Output is correct |
87 |
Correct |
384 ms |
564048 KB |
Output is correct |
88 |
Correct |
378 ms |
563796 KB |
Output is correct |
89 |
Correct |
374 ms |
564052 KB |
Output is correct |
90 |
Correct |
378 ms |
563932 KB |
Output is correct |
91 |
Correct |
381 ms |
564040 KB |
Output is correct |
92 |
Correct |
347 ms |
564100 KB |
Output is correct |
93 |
Correct |
338 ms |
564200 KB |
Output is correct |
94 |
Correct |
351 ms |
564040 KB |
Output is correct |
95 |
Correct |
337 ms |
564040 KB |
Output is correct |
96 |
Correct |
343 ms |
564296 KB |
Output is correct |
97 |
Correct |
338 ms |
563948 KB |
Output is correct |
98 |
Correct |
336 ms |
564040 KB |
Output is correct |
99 |
Correct |
349 ms |
564040 KB |
Output is correct |
100 |
Correct |
383 ms |
564040 KB |
Output is correct |
101 |
Correct |
382 ms |
564296 KB |
Output is correct |
102 |
Correct |
387 ms |
564040 KB |
Output is correct |
103 |
Correct |
394 ms |
564048 KB |
Output is correct |
104 |
Correct |
368 ms |
564040 KB |
Output is correct |
105 |
Correct |
399 ms |
563992 KB |
Output is correct |
106 |
Correct |
390 ms |
564040 KB |
Output is correct |
107 |
Correct |
402 ms |
564040 KB |
Output is correct |
108 |
Correct |
366 ms |
564052 KB |
Output is correct |
109 |
Correct |
380 ms |
564040 KB |
Output is correct |
110 |
Correct |
372 ms |
565136 KB |
Output is correct |
111 |
Correct |
374 ms |
566204 KB |
Output is correct |
112 |
Correct |
378 ms |
565836 KB |
Output is correct |
113 |
Correct |
377 ms |
565324 KB |
Output is correct |
114 |
Correct |
364 ms |
565008 KB |
Output is correct |
115 |
Correct |
371 ms |
565064 KB |
Output is correct |
116 |
Correct |
370 ms |
565052 KB |
Output is correct |
117 |
Correct |
412 ms |
565136 KB |
Output is correct |
118 |
Correct |
393 ms |
565064 KB |
Output is correct |
119 |
Correct |
367 ms |
568904 KB |
Output is correct |
120 |
Correct |
366 ms |
569968 KB |
Output is correct |
121 |
Correct |
326 ms |
568032 KB |
Output is correct |
122 |
Correct |
324 ms |
567076 KB |
Output is correct |
123 |
Correct |
317 ms |
567124 KB |
Output is correct |
124 |
Correct |
389 ms |
579860 KB |
Output is correct |
125 |
Correct |
481 ms |
604128 KB |
Output is correct |
126 |
Correct |
439 ms |
626636 KB |
Output is correct |
127 |
Correct |
407 ms |
608492 KB |
Output is correct |
128 |
Correct |
366 ms |
605000 KB |
Output is correct |
129 |
Correct |
362 ms |
603208 KB |
Output is correct |
130 |
Correct |
544 ms |
608020 KB |
Output is correct |
131 |
Correct |
492 ms |
610040 KB |
Output is correct |
132 |
Correct |
361 ms |
564960 KB |
Output is correct |
133 |
Correct |
383 ms |
564044 KB |
Output is correct |
134 |
Correct |
346 ms |
564044 KB |
Output is correct |
135 |
Correct |
358 ms |
565092 KB |
Output is correct |
136 |
Correct |
355 ms |
565148 KB |
Output is correct |
137 |
Correct |
357 ms |
566184 KB |
Output is correct |
138 |
Correct |
371 ms |
565856 KB |
Output is correct |
139 |
Correct |
357 ms |
565128 KB |
Output is correct |
140 |
Correct |
358 ms |
565064 KB |
Output is correct |
141 |
Correct |
357 ms |
565332 KB |
Output is correct |
142 |
Correct |
356 ms |
564808 KB |
Output is correct |
143 |
Correct |
368 ms |
564808 KB |
Output is correct |
144 |
Correct |
359 ms |
565388 KB |
Output is correct |
145 |
Correct |
353 ms |
565388 KB |
Output is correct |
146 |
Correct |
377 ms |
565388 KB |
Output is correct |
147 |
Correct |
385 ms |
564936 KB |
Output is correct |
148 |
Correct |
333 ms |
565576 KB |
Output is correct |
149 |
Correct |
322 ms |
565156 KB |
Output is correct |
150 |
Correct |
322 ms |
565064 KB |
Output is correct |
151 |
Correct |
336 ms |
565064 KB |
Output is correct |
152 |
Correct |
334 ms |
565072 KB |
Output is correct |
153 |
Correct |
332 ms |
565064 KB |
Output is correct |
154 |
Correct |
327 ms |
567344 KB |
Output is correct |
155 |
Correct |
337 ms |
565320 KB |
Output is correct |
156 |
Correct |
359 ms |
568924 KB |
Output is correct |
157 |
Correct |
389 ms |
566736 KB |
Output is correct |
158 |
Correct |
358 ms |
569672 KB |
Output is correct |
159 |
Correct |
370 ms |
567368 KB |
Output is correct |
160 |
Correct |
352 ms |
567252 KB |
Output is correct |
161 |
Correct |
346 ms |
567880 KB |
Output is correct |
162 |
Correct |
352 ms |
567112 KB |
Output is correct |
163 |
Correct |
338 ms |
567112 KB |
Output is correct |
164 |
Correct |
379 ms |
568036 KB |
Output is correct |
165 |
Correct |
377 ms |
567964 KB |
Output is correct |
166 |
Correct |
362 ms |
567600 KB |
Output is correct |
167 |
Correct |
362 ms |
566856 KB |
Output is correct |
168 |
Correct |
392 ms |
567092 KB |
Output is correct |
169 |
Correct |
376 ms |
567412 KB |
Output is correct |
170 |
Correct |
370 ms |
566856 KB |
Output is correct |
171 |
Correct |
375 ms |
567368 KB |
Output is correct |
172 |
Correct |
368 ms |
567368 KB |
Output is correct |
173 |
Correct |
349 ms |
567124 KB |
Output is correct |
174 |
Correct |
346 ms |
567684 KB |
Output is correct |
175 |
Correct |
356 ms |
570524 KB |
Output is correct |
176 |
Correct |
380 ms |
579248 KB |
Output is correct |
177 |
Correct |
418 ms |
582260 KB |
Output is correct |
178 |
Correct |
460 ms |
588612 KB |
Output is correct |
179 |
Correct |
434 ms |
594044 KB |
Output is correct |
180 |
Correct |
504 ms |
590680 KB |
Output is correct |
181 |
Correct |
457 ms |
591440 KB |
Output is correct |
182 |
Correct |
459 ms |
592200 KB |
Output is correct |
183 |
Correct |
499 ms |
595064 KB |
Output is correct |
184 |
Correct |
659 ms |
619912 KB |
Output is correct |
185 |
Correct |
529 ms |
591936 KB |
Output is correct |
186 |
Correct |
665 ms |
618848 KB |
Output is correct |
187 |
Correct |
611 ms |
613192 KB |
Output is correct |
188 |
Correct |
603 ms |
663816 KB |
Output is correct |
189 |
Correct |
753 ms |
622388 KB |
Output is correct |
190 |
Correct |
560 ms |
621484 KB |
Output is correct |
191 |
Correct |
526 ms |
633752 KB |
Output is correct |
192 |
Correct |
442 ms |
621384 KB |
Output is correct |
193 |
Correct |
406 ms |
621384 KB |
Output is correct |
194 |
Correct |
566 ms |
635580 KB |
Output is correct |
195 |
Correct |
495 ms |
638084 KB |
Output is correct |
196 |
Correct |
545 ms |
616392 KB |
Output is correct |
197 |
Correct |
556 ms |
622980 KB |
Output is correct |
198 |
Correct |
559 ms |
614472 KB |
Output is correct |
199 |
Correct |
507 ms |
616272 KB |
Output is correct |
200 |
Correct |
749 ms |
620756 KB |
Output is correct |
201 |
Correct |
711 ms |
622664 KB |
Output is correct |
202 |
Correct |
571 ms |
622292 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
372 ms |
564040 KB |
Output is correct |
2 |
Correct |
368 ms |
563836 KB |
Output is correct |
3 |
Correct |
389 ms |
564044 KB |
Output is correct |
4 |
Correct |
400 ms |
564040 KB |
Output is correct |
5 |
Correct |
408 ms |
564040 KB |
Output is correct |
6 |
Correct |
384 ms |
564040 KB |
Output is correct |
7 |
Correct |
393 ms |
563972 KB |
Output is correct |
8 |
Correct |
377 ms |
563916 KB |
Output is correct |
9 |
Correct |
381 ms |
564048 KB |
Output is correct |
10 |
Correct |
355 ms |
563940 KB |
Output is correct |
11 |
Correct |
372 ms |
564040 KB |
Output is correct |
12 |
Correct |
363 ms |
564040 KB |
Output is correct |
13 |
Correct |
352 ms |
564044 KB |
Output is correct |
14 |
Correct |
349 ms |
564040 KB |
Output is correct |
15 |
Correct |
369 ms |
563936 KB |
Output is correct |
16 |
Correct |
364 ms |
564040 KB |
Output is correct |
17 |
Correct |
386 ms |
564056 KB |
Output is correct |
18 |
Correct |
398 ms |
564040 KB |
Output is correct |
19 |
Correct |
386 ms |
565064 KB |
Output is correct |
20 |
Correct |
375 ms |
565172 KB |
Output is correct |
21 |
Correct |
396 ms |
565672 KB |
Output is correct |
22 |
Correct |
407 ms |
564916 KB |
Output is correct |
23 |
Correct |
385 ms |
564836 KB |
Output is correct |
24 |
Correct |
405 ms |
565520 KB |
Output is correct |
25 |
Correct |
400 ms |
565388 KB |
Output is correct |
26 |
Correct |
391 ms |
565064 KB |
Output is correct |
27 |
Correct |
403 ms |
565064 KB |
Output is correct |
28 |
Correct |
428 ms |
565192 KB |
Output is correct |
29 |
Correct |
427 ms |
567116 KB |
Output is correct |
30 |
Correct |
390 ms |
565320 KB |
Output is correct |
31 |
Correct |
400 ms |
569672 KB |
Output is correct |
32 |
Correct |
420 ms |
567020 KB |
Output is correct |
33 |
Correct |
412 ms |
567112 KB |
Output is correct |
34 |
Correct |
411 ms |
567964 KB |
Output is correct |
35 |
Correct |
420 ms |
567960 KB |
Output is correct |
36 |
Correct |
404 ms |
567220 KB |
Output is correct |
37 |
Correct |
404 ms |
567368 KB |
Output is correct |
38 |
Correct |
408 ms |
567312 KB |
Output is correct |
39 |
Correct |
516 ms |
604908 KB |
Output is correct |
40 |
Correct |
414 ms |
567208 KB |
Output is correct |
41 |
Correct |
414 ms |
568584 KB |
Output is correct |
42 |
Correct |
390 ms |
570008 KB |
Output is correct |
43 |
Correct |
361 ms |
569088 KB |
Output is correct |
44 |
Correct |
411 ms |
578084 KB |
Output is correct |
45 |
Correct |
406 ms |
580876 KB |
Output is correct |
46 |
Correct |
464 ms |
627404 KB |
Output is correct |
47 |
Correct |
531 ms |
605000 KB |
Output is correct |
48 |
Correct |
453 ms |
603448 KB |
Output is correct |
49 |
Correct |
484 ms |
599896 KB |
Output is correct |
50 |
Correct |
490 ms |
600960 KB |
Output is correct |
51 |
Correct |
565 ms |
605440 KB |
Output is correct |
52 |
Correct |
564 ms |
604488 KB |
Output is correct |
53 |
Correct |
512 ms |
605188 KB |
Output is correct |
54 |
Correct |
383 ms |
564024 KB |
Output is correct |
55 |
Correct |
400 ms |
564040 KB |
Output is correct |
56 |
Correct |
404 ms |
564040 KB |
Output is correct |
57 |
Correct |
379 ms |
563976 KB |
Output is correct |
58 |
Correct |
429 ms |
564040 KB |
Output is correct |
59 |
Correct |
379 ms |
563928 KB |
Output is correct |
60 |
Correct |
392 ms |
564040 KB |
Output is correct |
61 |
Correct |
407 ms |
564040 KB |
Output is correct |
62 |
Correct |
386 ms |
563916 KB |
Output is correct |
63 |
Correct |
371 ms |
564040 KB |
Output is correct |
64 |
Correct |
370 ms |
563872 KB |
Output is correct |
65 |
Correct |
379 ms |
564040 KB |
Output is correct |
66 |
Correct |
386 ms |
564040 KB |
Output is correct |
67 |
Correct |
376 ms |
564040 KB |
Output is correct |
68 |
Correct |
346 ms |
564032 KB |
Output is correct |
69 |
Correct |
345 ms |
563968 KB |
Output is correct |
70 |
Correct |
350 ms |
564040 KB |
Output is correct |
71 |
Correct |
340 ms |
564040 KB |
Output is correct |
72 |
Correct |
342 ms |
563984 KB |
Output is correct |
73 |
Correct |
347 ms |
564068 KB |
Output is correct |
74 |
Correct |
355 ms |
563960 KB |
Output is correct |
75 |
Correct |
343 ms |
564048 KB |
Output is correct |
76 |
Correct |
381 ms |
564044 KB |
Output is correct |
77 |
Correct |
386 ms |
564040 KB |
Output is correct |
78 |
Correct |
392 ms |
564040 KB |
Output is correct |
79 |
Correct |
383 ms |
564248 KB |
Output is correct |
80 |
Correct |
400 ms |
563924 KB |
Output is correct |
81 |
Correct |
404 ms |
564044 KB |
Output is correct |
82 |
Correct |
382 ms |
564040 KB |
Output is correct |
83 |
Correct |
392 ms |
564040 KB |
Output is correct |
84 |
Correct |
406 ms |
564044 KB |
Output is correct |
85 |
Correct |
393 ms |
564044 KB |
Output is correct |
86 |
Correct |
377 ms |
564012 KB |
Output is correct |
87 |
Correct |
384 ms |
564048 KB |
Output is correct |
88 |
Correct |
378 ms |
563796 KB |
Output is correct |
89 |
Correct |
374 ms |
564052 KB |
Output is correct |
90 |
Correct |
378 ms |
563932 KB |
Output is correct |
91 |
Correct |
381 ms |
564040 KB |
Output is correct |
92 |
Correct |
347 ms |
564100 KB |
Output is correct |
93 |
Correct |
338 ms |
564200 KB |
Output is correct |
94 |
Correct |
351 ms |
564040 KB |
Output is correct |
95 |
Correct |
337 ms |
564040 KB |
Output is correct |
96 |
Correct |
343 ms |
564296 KB |
Output is correct |
97 |
Correct |
338 ms |
563948 KB |
Output is correct |
98 |
Correct |
336 ms |
564040 KB |
Output is correct |
99 |
Correct |
349 ms |
564040 KB |
Output is correct |
100 |
Correct |
383 ms |
564040 KB |
Output is correct |
101 |
Correct |
382 ms |
564296 KB |
Output is correct |
102 |
Correct |
387 ms |
564040 KB |
Output is correct |
103 |
Correct |
394 ms |
564048 KB |
Output is correct |
104 |
Correct |
368 ms |
564040 KB |
Output is correct |
105 |
Correct |
399 ms |
563992 KB |
Output is correct |
106 |
Correct |
390 ms |
564040 KB |
Output is correct |
107 |
Correct |
402 ms |
564040 KB |
Output is correct |
108 |
Correct |
366 ms |
564052 KB |
Output is correct |
109 |
Correct |
380 ms |
564040 KB |
Output is correct |
110 |
Correct |
372 ms |
565136 KB |
Output is correct |
111 |
Correct |
374 ms |
566204 KB |
Output is correct |
112 |
Correct |
378 ms |
565836 KB |
Output is correct |
113 |
Correct |
377 ms |
565324 KB |
Output is correct |
114 |
Correct |
364 ms |
565008 KB |
Output is correct |
115 |
Correct |
371 ms |
565064 KB |
Output is correct |
116 |
Correct |
370 ms |
565052 KB |
Output is correct |
117 |
Correct |
412 ms |
565136 KB |
Output is correct |
118 |
Correct |
393 ms |
565064 KB |
Output is correct |
119 |
Correct |
367 ms |
568904 KB |
Output is correct |
120 |
Correct |
366 ms |
569968 KB |
Output is correct |
121 |
Correct |
326 ms |
568032 KB |
Output is correct |
122 |
Correct |
324 ms |
567076 KB |
Output is correct |
123 |
Correct |
317 ms |
567124 KB |
Output is correct |
124 |
Correct |
389 ms |
579860 KB |
Output is correct |
125 |
Correct |
481 ms |
604128 KB |
Output is correct |
126 |
Correct |
439 ms |
626636 KB |
Output is correct |
127 |
Correct |
407 ms |
608492 KB |
Output is correct |
128 |
Correct |
366 ms |
605000 KB |
Output is correct |
129 |
Correct |
362 ms |
603208 KB |
Output is correct |
130 |
Correct |
544 ms |
608020 KB |
Output is correct |
131 |
Correct |
492 ms |
610040 KB |
Output is correct |
132 |
Correct |
361 ms |
564960 KB |
Output is correct |
133 |
Correct |
383 ms |
564044 KB |
Output is correct |
134 |
Correct |
346 ms |
564044 KB |
Output is correct |
135 |
Correct |
358 ms |
565092 KB |
Output is correct |
136 |
Correct |
355 ms |
565148 KB |
Output is correct |
137 |
Correct |
357 ms |
566184 KB |
Output is correct |
138 |
Correct |
371 ms |
565856 KB |
Output is correct |
139 |
Correct |
357 ms |
565128 KB |
Output is correct |
140 |
Correct |
358 ms |
565064 KB |
Output is correct |
141 |
Correct |
357 ms |
565332 KB |
Output is correct |
142 |
Correct |
356 ms |
564808 KB |
Output is correct |
143 |
Correct |
368 ms |
564808 KB |
Output is correct |
144 |
Correct |
359 ms |
565388 KB |
Output is correct |
145 |
Correct |
353 ms |
565388 KB |
Output is correct |
146 |
Correct |
377 ms |
565388 KB |
Output is correct |
147 |
Correct |
385 ms |
564936 KB |
Output is correct |
148 |
Correct |
333 ms |
565576 KB |
Output is correct |
149 |
Correct |
322 ms |
565156 KB |
Output is correct |
150 |
Correct |
322 ms |
565064 KB |
Output is correct |
151 |
Correct |
336 ms |
565064 KB |
Output is correct |
152 |
Correct |
334 ms |
565072 KB |
Output is correct |
153 |
Correct |
332 ms |
565064 KB |
Output is correct |
154 |
Correct |
327 ms |
567344 KB |
Output is correct |
155 |
Correct |
337 ms |
565320 KB |
Output is correct |
156 |
Correct |
359 ms |
568924 KB |
Output is correct |
157 |
Correct |
389 ms |
566736 KB |
Output is correct |
158 |
Correct |
358 ms |
569672 KB |
Output is correct |
159 |
Correct |
370 ms |
567368 KB |
Output is correct |
160 |
Correct |
352 ms |
567252 KB |
Output is correct |
161 |
Correct |
346 ms |
567880 KB |
Output is correct |
162 |
Correct |
352 ms |
567112 KB |
Output is correct |
163 |
Correct |
338 ms |
567112 KB |
Output is correct |
164 |
Correct |
379 ms |
568036 KB |
Output is correct |
165 |
Correct |
377 ms |
567964 KB |
Output is correct |
166 |
Correct |
362 ms |
567600 KB |
Output is correct |
167 |
Correct |
362 ms |
566856 KB |
Output is correct |
168 |
Correct |
392 ms |
567092 KB |
Output is correct |
169 |
Correct |
376 ms |
567412 KB |
Output is correct |
170 |
Correct |
370 ms |
566856 KB |
Output is correct |
171 |
Correct |
375 ms |
567368 KB |
Output is correct |
172 |
Correct |
368 ms |
567368 KB |
Output is correct |
173 |
Correct |
349 ms |
567124 KB |
Output is correct |
174 |
Correct |
346 ms |
567684 KB |
Output is correct |
175 |
Correct |
356 ms |
570524 KB |
Output is correct |
176 |
Correct |
380 ms |
579248 KB |
Output is correct |
177 |
Correct |
418 ms |
582260 KB |
Output is correct |
178 |
Correct |
460 ms |
588612 KB |
Output is correct |
179 |
Correct |
434 ms |
594044 KB |
Output is correct |
180 |
Correct |
504 ms |
590680 KB |
Output is correct |
181 |
Correct |
457 ms |
591440 KB |
Output is correct |
182 |
Correct |
459 ms |
592200 KB |
Output is correct |
183 |
Correct |
499 ms |
595064 KB |
Output is correct |
184 |
Correct |
659 ms |
619912 KB |
Output is correct |
185 |
Correct |
529 ms |
591936 KB |
Output is correct |
186 |
Correct |
665 ms |
618848 KB |
Output is correct |
187 |
Correct |
611 ms |
613192 KB |
Output is correct |
188 |
Correct |
603 ms |
663816 KB |
Output is correct |
189 |
Correct |
753 ms |
622388 KB |
Output is correct |
190 |
Correct |
560 ms |
621484 KB |
Output is correct |
191 |
Correct |
526 ms |
633752 KB |
Output is correct |
192 |
Correct |
442 ms |
621384 KB |
Output is correct |
193 |
Correct |
406 ms |
621384 KB |
Output is correct |
194 |
Correct |
566 ms |
635580 KB |
Output is correct |
195 |
Correct |
495 ms |
638084 KB |
Output is correct |
196 |
Correct |
545 ms |
616392 KB |
Output is correct |
197 |
Correct |
556 ms |
622980 KB |
Output is correct |
198 |
Correct |
559 ms |
614472 KB |
Output is correct |
199 |
Correct |
507 ms |
616272 KB |
Output is correct |
200 |
Correct |
749 ms |
620756 KB |
Output is correct |
201 |
Correct |
711 ms |
622664 KB |
Output is correct |
202 |
Correct |
571 ms |
622292 KB |
Output is correct |
203 |
Correct |
985 ms |
700668 KB |
Output is correct |
204 |
Correct |
556 ms |
631976 KB |
Output is correct |
205 |
Correct |
904 ms |
633040 KB |
Output is correct |
206 |
Correct |
964 ms |
674240 KB |
Output is correct |
207 |
Correct |
810 ms |
775468 KB |
Output is correct |
208 |
Correct |
1088 ms |
702400 KB |
Output is correct |
209 |
Correct |
863 ms |
700560 KB |
Output is correct |
210 |
Correct |
701 ms |
736472 KB |
Output is correct |
211 |
Correct |
494 ms |
700568 KB |
Output is correct |
212 |
Correct |
484 ms |
697416 KB |
Output is correct |
213 |
Correct |
727 ms |
707160 KB |
Output is correct |
214 |
Correct |
712 ms |
707160 KB |
Output is correct |
215 |
Correct |
848 ms |
672376 KB |
Output is correct |
216 |
Correct |
855 ms |
666088 KB |
Output is correct |
217 |
Correct |
847 ms |
678388 KB |
Output is correct |
218 |
Correct |
969 ms |
665928 KB |
Output is correct |
219 |
Correct |
1044 ms |
692648 KB |
Output is correct |
220 |
Correct |
1056 ms |
722920 KB |
Output is correct |
221 |
Correct |
1102 ms |
734324 KB |
Output is correct |
222 |
Correct |
1136 ms |
755992 KB |
Output is correct |
223 |
Correct |
1136 ms |
698952 KB |
Output is correct |
224 |
Correct |
1018 ms |
701252 KB |
Output is correct |
225 |
Correct |
889 ms |
702356 KB |
Output is correct |