#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
#define rep(a, b) for(int a = 0; a < (b); ++a)
#define st first
#define nd second
#define pb push_back
#define all(a) a.begin(), a.end()
const ll INF=1e18+7;
const ll LIM=5e5+7;
ll dp[LIM], dp2[LIM], A[LIM], B[LIM];
int main() {
ios_base::sync_with_stdio(0); cin.tie(0);
ll n, m;
cin >> n >> m;
rep(i, n) cin >> A[n-i];
rep(i, n+1) cin >> B[i];
ll ans=0;
rep(i, n+1) ans+=B[i];
rep(i, n+1) ans+=A[i];
rep(i, n+1) m+=A[i]*(ll)i;
rep(i, n+1) m-=B[i]*(ll)i;
if(m<0) {
m*=-1;
rep(i, n+1) swap(A[i], B[i]);
}
rep(i, LIM) dp[i]=INF;
dp[0]=0;
for(ll i=n; i; --i) {
if(m>=LIM/2) {
ll p=m-LIM/2;
p=(p+i-1)/i;
p=min(p, max(A[i]-100, 0ll));
A[i]-=p;
dp[0]+=p;
m-=p*i;
}
}
if(m>=LIM) {
cout << "impossible\n";
return 0;
}
rep(xd, 2) {
for(ll i=1; i<=n; ++i) {
vector<ll>V[i], l(i);
rep(j, LIM) {
ll p=j%i;
while(l[p]<V[p].size() && (j-V[p][l[p]])/i>A[i]) ++l[p];
while(V[p].size()>0 && dp[j]<=dp[V[p].back()]+(j-V[p].back())/i) {
V[p].pop_back();
l[p]=min(l[p], (ll)V[p].size());
}
dp2[j]=dp[j];
if(l[p]<V[p].size()) {
dp2[j]=min(dp2[j], dp[V[p][l[p]]]+(j-V[p][l[p]])/i);
}
V[p].pb(j);
}
rep(j, LIM) dp[j]=dp2[j];
}
rep(i, LIM/2) swap(dp[i], dp[LIM-i-1]);
rep(i, n+1) swap(A[i], B[i]);
}
if(dp[m]==INF) {
cout << "impossible\n";
return 0;
}
cout << ans-dp[m] << '\n';
}
Compilation message
vault.cpp: In function 'int main()':
vault.cpp:48:15: warning: comparison of integer expressions of different signedness: '__gnu_cxx::__alloc_traits<std::allocator<long long int>, long long int>::value_type' {aka 'long long int'} and 'std::vector<long long int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
48 | while(l[p]<V[p].size() && (j-V[p][l[p]])/i>A[i]) ++l[p];
vault.cpp:54:12: warning: comparison of integer expressions of different signedness: '__gnu_cxx::__alloc_traits<std::allocator<long long int>, long long int>::value_type' {aka 'long long int'} and 'std::vector<long long int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
54 | if(l[p]<V[p].size()) {
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
20 ms |
11612 KB |
Output is correct |
2 |
Correct |
33 ms |
11612 KB |
Output is correct |
3 |
Correct |
11 ms |
11612 KB |
Output is correct |
4 |
Correct |
103 ms |
11808 KB |
Output is correct |
5 |
Correct |
1 ms |
7516 KB |
Output is correct |
6 |
Correct |
476 ms |
12040 KB |
Output is correct |
7 |
Correct |
488 ms |
11856 KB |
Output is correct |
8 |
Correct |
486 ms |
12036 KB |
Output is correct |
9 |
Correct |
490 ms |
12164 KB |
Output is correct |
10 |
Correct |
423 ms |
11808 KB |
Output is correct |
11 |
Correct |
442 ms |
11608 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
20 ms |
11612 KB |
Output is correct |
2 |
Correct |
33 ms |
11612 KB |
Output is correct |
3 |
Correct |
11 ms |
11612 KB |
Output is correct |
4 |
Correct |
103 ms |
11808 KB |
Output is correct |
5 |
Correct |
1 ms |
7516 KB |
Output is correct |
6 |
Correct |
476 ms |
12040 KB |
Output is correct |
7 |
Correct |
488 ms |
11856 KB |
Output is correct |
8 |
Correct |
486 ms |
12036 KB |
Output is correct |
9 |
Correct |
490 ms |
12164 KB |
Output is correct |
10 |
Correct |
423 ms |
11808 KB |
Output is correct |
11 |
Correct |
442 ms |
11608 KB |
Output is correct |
12 |
Correct |
22 ms |
11612 KB |
Output is correct |
13 |
Correct |
27 ms |
11824 KB |
Output is correct |
14 |
Correct |
10 ms |
11612 KB |
Output is correct |
15 |
Correct |
98 ms |
11812 KB |
Output is correct |
16 |
Correct |
1 ms |
7512 KB |
Output is correct |
17 |
Correct |
504 ms |
12016 KB |
Output is correct |
18 |
Correct |
496 ms |
11860 KB |
Output is correct |
19 |
Correct |
489 ms |
12032 KB |
Output is correct |
20 |
Correct |
489 ms |
12164 KB |
Output is correct |
21 |
Correct |
422 ms |
11608 KB |
Output is correct |
22 |
Correct |
421 ms |
11804 KB |
Output is correct |
23 |
Correct |
2 ms |
7512 KB |
Output is correct |
24 |
Correct |
1020 ms |
13408 KB |
Output is correct |
25 |
Correct |
979 ms |
12240 KB |
Output is correct |
26 |
Correct |
1046 ms |
14792 KB |
Output is correct |
27 |
Correct |
1064 ms |
14700 KB |
Output is correct |
28 |
Correct |
798 ms |
11828 KB |
Output is correct |
29 |
Correct |
805 ms |
11608 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
101 ms |
11608 KB |
Output is correct |
2 |
Correct |
323 ms |
13672 KB |
Output is correct |
3 |
Correct |
290 ms |
15096 KB |
Output is correct |
4 |
Correct |
343 ms |
17896 KB |
Output is correct |
5 |
Correct |
325 ms |
17732 KB |
Output is correct |
6 |
Correct |
400 ms |
18516 KB |
Output is correct |
7 |
Correct |
254 ms |
11856 KB |
Output is correct |
8 |
Correct |
250 ms |
12060 KB |
Output is correct |
9 |
Correct |
330 ms |
18552 KB |
Output is correct |
10 |
Correct |
310 ms |
15184 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
101 ms |
11608 KB |
Output is correct |
2 |
Correct |
323 ms |
13672 KB |
Output is correct |
3 |
Correct |
290 ms |
15096 KB |
Output is correct |
4 |
Correct |
343 ms |
17896 KB |
Output is correct |
5 |
Correct |
325 ms |
17732 KB |
Output is correct |
6 |
Correct |
400 ms |
18516 KB |
Output is correct |
7 |
Correct |
254 ms |
11856 KB |
Output is correct |
8 |
Correct |
250 ms |
12060 KB |
Output is correct |
9 |
Correct |
330 ms |
18552 KB |
Output is correct |
10 |
Correct |
310 ms |
15184 KB |
Output is correct |
11 |
Correct |
21 ms |
11608 KB |
Output is correct |
12 |
Correct |
34 ms |
11612 KB |
Output is correct |
13 |
Correct |
11 ms |
11836 KB |
Output is correct |
14 |
Correct |
96 ms |
11800 KB |
Output is correct |
15 |
Correct |
326 ms |
13684 KB |
Output is correct |
16 |
Correct |
286 ms |
15104 KB |
Output is correct |
17 |
Correct |
353 ms |
17960 KB |
Output is correct |
18 |
Correct |
345 ms |
17912 KB |
Output is correct |
19 |
Correct |
377 ms |
18552 KB |
Output is correct |
20 |
Correct |
256 ms |
12064 KB |
Output is correct |
21 |
Correct |
255 ms |
11796 KB |
Output is correct |
22 |
Correct |
348 ms |
18436 KB |
Output is correct |
23 |
Correct |
322 ms |
15388 KB |
Output is correct |
24 |
Correct |
345 ms |
14832 KB |
Output is correct |
25 |
Correct |
304 ms |
15032 KB |
Output is correct |
26 |
Correct |
372 ms |
18372 KB |
Output is correct |
27 |
Correct |
350 ms |
17880 KB |
Output is correct |
28 |
Correct |
382 ms |
18548 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
101 ms |
11608 KB |
Output is correct |
2 |
Correct |
323 ms |
13672 KB |
Output is correct |
3 |
Correct |
290 ms |
15096 KB |
Output is correct |
4 |
Correct |
343 ms |
17896 KB |
Output is correct |
5 |
Correct |
325 ms |
17732 KB |
Output is correct |
6 |
Correct |
400 ms |
18516 KB |
Output is correct |
7 |
Correct |
254 ms |
11856 KB |
Output is correct |
8 |
Correct |
250 ms |
12060 KB |
Output is correct |
9 |
Correct |
330 ms |
18552 KB |
Output is correct |
10 |
Correct |
310 ms |
15184 KB |
Output is correct |
11 |
Correct |
96 ms |
11612 KB |
Output is correct |
12 |
Correct |
341 ms |
13648 KB |
Output is correct |
13 |
Correct |
296 ms |
15308 KB |
Output is correct |
14 |
Correct |
360 ms |
17936 KB |
Output is correct |
15 |
Correct |
352 ms |
17732 KB |
Output is correct |
16 |
Correct |
394 ms |
18544 KB |
Output is correct |
17 |
Correct |
253 ms |
12076 KB |
Output is correct |
18 |
Correct |
263 ms |
11812 KB |
Output is correct |
19 |
Correct |
338 ms |
18552 KB |
Output is correct |
20 |
Correct |
318 ms |
15372 KB |
Output is correct |
21 |
Correct |
423 ms |
11816 KB |
Output is correct |
22 |
Correct |
406 ms |
11608 KB |
Output is correct |
23 |
Correct |
531 ms |
16648 KB |
Output is correct |
24 |
Correct |
507 ms |
17924 KB |
Output is correct |
25 |
Correct |
553 ms |
20080 KB |
Output is correct |
26 |
Correct |
554 ms |
18256 KB |
Output is correct |
27 |
Correct |
606 ms |
18644 KB |
Output is correct |
28 |
Correct |
517 ms |
14800 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
20 ms |
11612 KB |
Output is correct |
2 |
Correct |
33 ms |
11612 KB |
Output is correct |
3 |
Correct |
11 ms |
11612 KB |
Output is correct |
4 |
Correct |
103 ms |
11808 KB |
Output is correct |
5 |
Correct |
1 ms |
7516 KB |
Output is correct |
6 |
Correct |
476 ms |
12040 KB |
Output is correct |
7 |
Correct |
488 ms |
11856 KB |
Output is correct |
8 |
Correct |
486 ms |
12036 KB |
Output is correct |
9 |
Correct |
490 ms |
12164 KB |
Output is correct |
10 |
Correct |
423 ms |
11808 KB |
Output is correct |
11 |
Correct |
442 ms |
11608 KB |
Output is correct |
12 |
Correct |
101 ms |
11608 KB |
Output is correct |
13 |
Correct |
323 ms |
13672 KB |
Output is correct |
14 |
Correct |
290 ms |
15096 KB |
Output is correct |
15 |
Correct |
343 ms |
17896 KB |
Output is correct |
16 |
Correct |
325 ms |
17732 KB |
Output is correct |
17 |
Correct |
400 ms |
18516 KB |
Output is correct |
18 |
Correct |
254 ms |
11856 KB |
Output is correct |
19 |
Correct |
250 ms |
12060 KB |
Output is correct |
20 |
Correct |
330 ms |
18552 KB |
Output is correct |
21 |
Correct |
310 ms |
15184 KB |
Output is correct |
22 |
Correct |
21 ms |
11608 KB |
Output is correct |
23 |
Correct |
34 ms |
11612 KB |
Output is correct |
24 |
Correct |
11 ms |
11836 KB |
Output is correct |
25 |
Correct |
96 ms |
11800 KB |
Output is correct |
26 |
Correct |
326 ms |
13684 KB |
Output is correct |
27 |
Correct |
286 ms |
15104 KB |
Output is correct |
28 |
Correct |
353 ms |
17960 KB |
Output is correct |
29 |
Correct |
345 ms |
17912 KB |
Output is correct |
30 |
Correct |
377 ms |
18552 KB |
Output is correct |
31 |
Correct |
256 ms |
12064 KB |
Output is correct |
32 |
Correct |
255 ms |
11796 KB |
Output is correct |
33 |
Correct |
348 ms |
18436 KB |
Output is correct |
34 |
Correct |
322 ms |
15388 KB |
Output is correct |
35 |
Correct |
345 ms |
14832 KB |
Output is correct |
36 |
Correct |
304 ms |
15032 KB |
Output is correct |
37 |
Correct |
372 ms |
18372 KB |
Output is correct |
38 |
Correct |
350 ms |
17880 KB |
Output is correct |
39 |
Correct |
382 ms |
18548 KB |
Output is correct |
40 |
Correct |
96 ms |
11612 KB |
Output is correct |
41 |
Correct |
341 ms |
13648 KB |
Output is correct |
42 |
Correct |
296 ms |
15308 KB |
Output is correct |
43 |
Correct |
360 ms |
17936 KB |
Output is correct |
44 |
Correct |
352 ms |
17732 KB |
Output is correct |
45 |
Correct |
394 ms |
18544 KB |
Output is correct |
46 |
Correct |
253 ms |
12076 KB |
Output is correct |
47 |
Correct |
263 ms |
11812 KB |
Output is correct |
48 |
Correct |
338 ms |
18552 KB |
Output is correct |
49 |
Correct |
318 ms |
15372 KB |
Output is correct |
50 |
Correct |
423 ms |
11816 KB |
Output is correct |
51 |
Correct |
406 ms |
11608 KB |
Output is correct |
52 |
Correct |
531 ms |
16648 KB |
Output is correct |
53 |
Correct |
507 ms |
17924 KB |
Output is correct |
54 |
Correct |
553 ms |
20080 KB |
Output is correct |
55 |
Correct |
554 ms |
18256 KB |
Output is correct |
56 |
Correct |
606 ms |
18644 KB |
Output is correct |
57 |
Correct |
517 ms |
14800 KB |
Output is correct |
58 |
Correct |
21 ms |
11608 KB |
Output is correct |
59 |
Correct |
31 ms |
11612 KB |
Output is correct |
60 |
Correct |
10 ms |
11608 KB |
Output is correct |
61 |
Correct |
95 ms |
11824 KB |
Output is correct |
62 |
Correct |
1 ms |
7516 KB |
Output is correct |
63 |
Correct |
461 ms |
12012 KB |
Output is correct |
64 |
Correct |
460 ms |
12112 KB |
Output is correct |
65 |
Correct |
462 ms |
12024 KB |
Output is correct |
66 |
Correct |
463 ms |
12408 KB |
Output is correct |
67 |
Correct |
398 ms |
11612 KB |
Output is correct |
68 |
Correct |
407 ms |
11612 KB |
Output is correct |
69 |
Correct |
323 ms |
13772 KB |
Output is correct |
70 |
Correct |
278 ms |
15280 KB |
Output is correct |
71 |
Correct |
332 ms |
17900 KB |
Output is correct |
72 |
Correct |
325 ms |
17868 KB |
Output is correct |
73 |
Correct |
372 ms |
18548 KB |
Output is correct |
74 |
Correct |
247 ms |
12116 KB |
Output is correct |
75 |
Correct |
245 ms |
11820 KB |
Output is correct |
76 |
Correct |
328 ms |
18536 KB |
Output is correct |
77 |
Correct |
310 ms |
15220 KB |
Output is correct |
78 |
Correct |
323 ms |
14832 KB |
Output is correct |
79 |
Correct |
286 ms |
14952 KB |
Output is correct |
80 |
Correct |
345 ms |
18384 KB |
Output is correct |
81 |
Correct |
323 ms |
17868 KB |
Output is correct |
82 |
Correct |
356 ms |
18540 KB |
Output is correct |
83 |
Correct |
532 ms |
16880 KB |
Output is correct |
84 |
Correct |
498 ms |
17920 KB |
Output is correct |
85 |
Correct |
557 ms |
18488 KB |
Output is correct |
86 |
Correct |
554 ms |
18500 KB |
Output is correct |
87 |
Correct |
607 ms |
18540 KB |
Output is correct |
88 |
Correct |
522 ms |
14648 KB |
Output is correct |
89 |
Correct |
522 ms |
15260 KB |
Output is correct |
90 |
Correct |
534 ms |
16792 KB |
Output is correct |
91 |
Correct |
526 ms |
19820 KB |
Output is correct |
92 |
Correct |
600 ms |
18504 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
101 ms |
11608 KB |
Output is correct |
2 |
Correct |
323 ms |
13672 KB |
Output is correct |
3 |
Correct |
290 ms |
15096 KB |
Output is correct |
4 |
Correct |
343 ms |
17896 KB |
Output is correct |
5 |
Correct |
325 ms |
17732 KB |
Output is correct |
6 |
Correct |
400 ms |
18516 KB |
Output is correct |
7 |
Correct |
254 ms |
11856 KB |
Output is correct |
8 |
Correct |
250 ms |
12060 KB |
Output is correct |
9 |
Correct |
330 ms |
18552 KB |
Output is correct |
10 |
Correct |
310 ms |
15184 KB |
Output is correct |
11 |
Correct |
96 ms |
11612 KB |
Output is correct |
12 |
Correct |
341 ms |
13648 KB |
Output is correct |
13 |
Correct |
296 ms |
15308 KB |
Output is correct |
14 |
Correct |
360 ms |
17936 KB |
Output is correct |
15 |
Correct |
352 ms |
17732 KB |
Output is correct |
16 |
Correct |
394 ms |
18544 KB |
Output is correct |
17 |
Correct |
253 ms |
12076 KB |
Output is correct |
18 |
Correct |
263 ms |
11812 KB |
Output is correct |
19 |
Correct |
338 ms |
18552 KB |
Output is correct |
20 |
Correct |
318 ms |
15372 KB |
Output is correct |
21 |
Correct |
423 ms |
11816 KB |
Output is correct |
22 |
Correct |
406 ms |
11608 KB |
Output is correct |
23 |
Correct |
531 ms |
16648 KB |
Output is correct |
24 |
Correct |
507 ms |
17924 KB |
Output is correct |
25 |
Correct |
553 ms |
20080 KB |
Output is correct |
26 |
Correct |
554 ms |
18256 KB |
Output is correct |
27 |
Correct |
606 ms |
18644 KB |
Output is correct |
28 |
Correct |
517 ms |
14800 KB |
Output is correct |
29 |
Correct |
95 ms |
11808 KB |
Output is correct |
30 |
Correct |
316 ms |
13712 KB |
Output is correct |
31 |
Correct |
285 ms |
15284 KB |
Output is correct |
32 |
Correct |
336 ms |
17912 KB |
Output is correct |
33 |
Correct |
323 ms |
17764 KB |
Output is correct |
34 |
Correct |
375 ms |
18548 KB |
Output is correct |
35 |
Correct |
246 ms |
11980 KB |
Output is correct |
36 |
Correct |
245 ms |
11812 KB |
Output is correct |
37 |
Correct |
320 ms |
18544 KB |
Output is correct |
38 |
Correct |
303 ms |
15152 KB |
Output is correct |
39 |
Correct |
402 ms |
11812 KB |
Output is correct |
40 |
Correct |
402 ms |
11612 KB |
Output is correct |
41 |
Correct |
537 ms |
16676 KB |
Output is correct |
42 |
Correct |
514 ms |
17944 KB |
Output is correct |
43 |
Correct |
552 ms |
18408 KB |
Output is correct |
44 |
Correct |
558 ms |
18500 KB |
Output is correct |
45 |
Correct |
605 ms |
18420 KB |
Output is correct |
46 |
Correct |
526 ms |
14736 KB |
Output is correct |
47 |
Correct |
811 ms |
11820 KB |
Output is correct |
48 |
Correct |
798 ms |
11860 KB |
Output is correct |
49 |
Correct |
1062 ms |
18540 KB |
Output is correct |
50 |
Correct |
983 ms |
14052 KB |
Output is correct |
51 |
Correct |
1089 ms |
20080 KB |
Output is correct |
52 |
Incorrect |
1118 ms |
17644 KB |
Output isn't correct |
53 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
20 ms |
11612 KB |
Output is correct |
2 |
Correct |
33 ms |
11612 KB |
Output is correct |
3 |
Correct |
11 ms |
11612 KB |
Output is correct |
4 |
Correct |
103 ms |
11808 KB |
Output is correct |
5 |
Correct |
1 ms |
7516 KB |
Output is correct |
6 |
Correct |
476 ms |
12040 KB |
Output is correct |
7 |
Correct |
488 ms |
11856 KB |
Output is correct |
8 |
Correct |
486 ms |
12036 KB |
Output is correct |
9 |
Correct |
490 ms |
12164 KB |
Output is correct |
10 |
Correct |
423 ms |
11808 KB |
Output is correct |
11 |
Correct |
442 ms |
11608 KB |
Output is correct |
12 |
Correct |
22 ms |
11612 KB |
Output is correct |
13 |
Correct |
27 ms |
11824 KB |
Output is correct |
14 |
Correct |
10 ms |
11612 KB |
Output is correct |
15 |
Correct |
98 ms |
11812 KB |
Output is correct |
16 |
Correct |
1 ms |
7512 KB |
Output is correct |
17 |
Correct |
504 ms |
12016 KB |
Output is correct |
18 |
Correct |
496 ms |
11860 KB |
Output is correct |
19 |
Correct |
489 ms |
12032 KB |
Output is correct |
20 |
Correct |
489 ms |
12164 KB |
Output is correct |
21 |
Correct |
422 ms |
11608 KB |
Output is correct |
22 |
Correct |
421 ms |
11804 KB |
Output is correct |
23 |
Correct |
2 ms |
7512 KB |
Output is correct |
24 |
Correct |
1020 ms |
13408 KB |
Output is correct |
25 |
Correct |
979 ms |
12240 KB |
Output is correct |
26 |
Correct |
1046 ms |
14792 KB |
Output is correct |
27 |
Correct |
1064 ms |
14700 KB |
Output is correct |
28 |
Correct |
798 ms |
11828 KB |
Output is correct |
29 |
Correct |
805 ms |
11608 KB |
Output is correct |
30 |
Correct |
101 ms |
11608 KB |
Output is correct |
31 |
Correct |
323 ms |
13672 KB |
Output is correct |
32 |
Correct |
290 ms |
15096 KB |
Output is correct |
33 |
Correct |
343 ms |
17896 KB |
Output is correct |
34 |
Correct |
325 ms |
17732 KB |
Output is correct |
35 |
Correct |
400 ms |
18516 KB |
Output is correct |
36 |
Correct |
254 ms |
11856 KB |
Output is correct |
37 |
Correct |
250 ms |
12060 KB |
Output is correct |
38 |
Correct |
330 ms |
18552 KB |
Output is correct |
39 |
Correct |
310 ms |
15184 KB |
Output is correct |
40 |
Correct |
21 ms |
11608 KB |
Output is correct |
41 |
Correct |
34 ms |
11612 KB |
Output is correct |
42 |
Correct |
11 ms |
11836 KB |
Output is correct |
43 |
Correct |
96 ms |
11800 KB |
Output is correct |
44 |
Correct |
326 ms |
13684 KB |
Output is correct |
45 |
Correct |
286 ms |
15104 KB |
Output is correct |
46 |
Correct |
353 ms |
17960 KB |
Output is correct |
47 |
Correct |
345 ms |
17912 KB |
Output is correct |
48 |
Correct |
377 ms |
18552 KB |
Output is correct |
49 |
Correct |
256 ms |
12064 KB |
Output is correct |
50 |
Correct |
255 ms |
11796 KB |
Output is correct |
51 |
Correct |
348 ms |
18436 KB |
Output is correct |
52 |
Correct |
322 ms |
15388 KB |
Output is correct |
53 |
Correct |
345 ms |
14832 KB |
Output is correct |
54 |
Correct |
304 ms |
15032 KB |
Output is correct |
55 |
Correct |
372 ms |
18372 KB |
Output is correct |
56 |
Correct |
350 ms |
17880 KB |
Output is correct |
57 |
Correct |
382 ms |
18548 KB |
Output is correct |
58 |
Correct |
96 ms |
11612 KB |
Output is correct |
59 |
Correct |
341 ms |
13648 KB |
Output is correct |
60 |
Correct |
296 ms |
15308 KB |
Output is correct |
61 |
Correct |
360 ms |
17936 KB |
Output is correct |
62 |
Correct |
352 ms |
17732 KB |
Output is correct |
63 |
Correct |
394 ms |
18544 KB |
Output is correct |
64 |
Correct |
253 ms |
12076 KB |
Output is correct |
65 |
Correct |
263 ms |
11812 KB |
Output is correct |
66 |
Correct |
338 ms |
18552 KB |
Output is correct |
67 |
Correct |
318 ms |
15372 KB |
Output is correct |
68 |
Correct |
423 ms |
11816 KB |
Output is correct |
69 |
Correct |
406 ms |
11608 KB |
Output is correct |
70 |
Correct |
531 ms |
16648 KB |
Output is correct |
71 |
Correct |
507 ms |
17924 KB |
Output is correct |
72 |
Correct |
553 ms |
20080 KB |
Output is correct |
73 |
Correct |
554 ms |
18256 KB |
Output is correct |
74 |
Correct |
606 ms |
18644 KB |
Output is correct |
75 |
Correct |
517 ms |
14800 KB |
Output is correct |
76 |
Correct |
21 ms |
11608 KB |
Output is correct |
77 |
Correct |
31 ms |
11612 KB |
Output is correct |
78 |
Correct |
10 ms |
11608 KB |
Output is correct |
79 |
Correct |
95 ms |
11824 KB |
Output is correct |
80 |
Correct |
1 ms |
7516 KB |
Output is correct |
81 |
Correct |
461 ms |
12012 KB |
Output is correct |
82 |
Correct |
460 ms |
12112 KB |
Output is correct |
83 |
Correct |
462 ms |
12024 KB |
Output is correct |
84 |
Correct |
463 ms |
12408 KB |
Output is correct |
85 |
Correct |
398 ms |
11612 KB |
Output is correct |
86 |
Correct |
407 ms |
11612 KB |
Output is correct |
87 |
Correct |
323 ms |
13772 KB |
Output is correct |
88 |
Correct |
278 ms |
15280 KB |
Output is correct |
89 |
Correct |
332 ms |
17900 KB |
Output is correct |
90 |
Correct |
325 ms |
17868 KB |
Output is correct |
91 |
Correct |
372 ms |
18548 KB |
Output is correct |
92 |
Correct |
247 ms |
12116 KB |
Output is correct |
93 |
Correct |
245 ms |
11820 KB |
Output is correct |
94 |
Correct |
328 ms |
18536 KB |
Output is correct |
95 |
Correct |
310 ms |
15220 KB |
Output is correct |
96 |
Correct |
323 ms |
14832 KB |
Output is correct |
97 |
Correct |
286 ms |
14952 KB |
Output is correct |
98 |
Correct |
345 ms |
18384 KB |
Output is correct |
99 |
Correct |
323 ms |
17868 KB |
Output is correct |
100 |
Correct |
356 ms |
18540 KB |
Output is correct |
101 |
Correct |
532 ms |
16880 KB |
Output is correct |
102 |
Correct |
498 ms |
17920 KB |
Output is correct |
103 |
Correct |
557 ms |
18488 KB |
Output is correct |
104 |
Correct |
554 ms |
18500 KB |
Output is correct |
105 |
Correct |
607 ms |
18540 KB |
Output is correct |
106 |
Correct |
522 ms |
14648 KB |
Output is correct |
107 |
Correct |
522 ms |
15260 KB |
Output is correct |
108 |
Correct |
534 ms |
16792 KB |
Output is correct |
109 |
Correct |
526 ms |
19820 KB |
Output is correct |
110 |
Correct |
600 ms |
18504 KB |
Output is correct |
111 |
Correct |
95 ms |
11808 KB |
Output is correct |
112 |
Correct |
316 ms |
13712 KB |
Output is correct |
113 |
Correct |
285 ms |
15284 KB |
Output is correct |
114 |
Correct |
336 ms |
17912 KB |
Output is correct |
115 |
Correct |
323 ms |
17764 KB |
Output is correct |
116 |
Correct |
375 ms |
18548 KB |
Output is correct |
117 |
Correct |
246 ms |
11980 KB |
Output is correct |
118 |
Correct |
245 ms |
11812 KB |
Output is correct |
119 |
Correct |
320 ms |
18544 KB |
Output is correct |
120 |
Correct |
303 ms |
15152 KB |
Output is correct |
121 |
Correct |
402 ms |
11812 KB |
Output is correct |
122 |
Correct |
402 ms |
11612 KB |
Output is correct |
123 |
Correct |
537 ms |
16676 KB |
Output is correct |
124 |
Correct |
514 ms |
17944 KB |
Output is correct |
125 |
Correct |
552 ms |
18408 KB |
Output is correct |
126 |
Correct |
558 ms |
18500 KB |
Output is correct |
127 |
Correct |
605 ms |
18420 KB |
Output is correct |
128 |
Correct |
526 ms |
14736 KB |
Output is correct |
129 |
Correct |
811 ms |
11820 KB |
Output is correct |
130 |
Correct |
798 ms |
11860 KB |
Output is correct |
131 |
Correct |
1062 ms |
18540 KB |
Output is correct |
132 |
Correct |
983 ms |
14052 KB |
Output is correct |
133 |
Correct |
1089 ms |
20080 KB |
Output is correct |
134 |
Incorrect |
1118 ms |
17644 KB |
Output isn't correct |
135 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
101 ms |
11608 KB |
Output is correct |
2 |
Correct |
323 ms |
13672 KB |
Output is correct |
3 |
Correct |
290 ms |
15096 KB |
Output is correct |
4 |
Correct |
343 ms |
17896 KB |
Output is correct |
5 |
Correct |
325 ms |
17732 KB |
Output is correct |
6 |
Correct |
400 ms |
18516 KB |
Output is correct |
7 |
Correct |
254 ms |
11856 KB |
Output is correct |
8 |
Correct |
250 ms |
12060 KB |
Output is correct |
9 |
Correct |
330 ms |
18552 KB |
Output is correct |
10 |
Correct |
310 ms |
15184 KB |
Output is correct |
11 |
Correct |
96 ms |
11612 KB |
Output is correct |
12 |
Correct |
341 ms |
13648 KB |
Output is correct |
13 |
Correct |
296 ms |
15308 KB |
Output is correct |
14 |
Correct |
360 ms |
17936 KB |
Output is correct |
15 |
Correct |
352 ms |
17732 KB |
Output is correct |
16 |
Correct |
394 ms |
18544 KB |
Output is correct |
17 |
Correct |
253 ms |
12076 KB |
Output is correct |
18 |
Correct |
263 ms |
11812 KB |
Output is correct |
19 |
Correct |
338 ms |
18552 KB |
Output is correct |
20 |
Correct |
318 ms |
15372 KB |
Output is correct |
21 |
Correct |
423 ms |
11816 KB |
Output is correct |
22 |
Correct |
406 ms |
11608 KB |
Output is correct |
23 |
Correct |
531 ms |
16648 KB |
Output is correct |
24 |
Correct |
507 ms |
17924 KB |
Output is correct |
25 |
Correct |
553 ms |
20080 KB |
Output is correct |
26 |
Correct |
554 ms |
18256 KB |
Output is correct |
27 |
Correct |
606 ms |
18644 KB |
Output is correct |
28 |
Correct |
517 ms |
14800 KB |
Output is correct |
29 |
Correct |
95 ms |
11808 KB |
Output is correct |
30 |
Correct |
316 ms |
13712 KB |
Output is correct |
31 |
Correct |
285 ms |
15284 KB |
Output is correct |
32 |
Correct |
336 ms |
17912 KB |
Output is correct |
33 |
Correct |
323 ms |
17764 KB |
Output is correct |
34 |
Correct |
375 ms |
18548 KB |
Output is correct |
35 |
Correct |
246 ms |
11980 KB |
Output is correct |
36 |
Correct |
245 ms |
11812 KB |
Output is correct |
37 |
Correct |
320 ms |
18544 KB |
Output is correct |
38 |
Correct |
303 ms |
15152 KB |
Output is correct |
39 |
Correct |
402 ms |
11812 KB |
Output is correct |
40 |
Correct |
402 ms |
11612 KB |
Output is correct |
41 |
Correct |
537 ms |
16676 KB |
Output is correct |
42 |
Correct |
514 ms |
17944 KB |
Output is correct |
43 |
Correct |
552 ms |
18408 KB |
Output is correct |
44 |
Correct |
558 ms |
18500 KB |
Output is correct |
45 |
Correct |
605 ms |
18420 KB |
Output is correct |
46 |
Correct |
526 ms |
14736 KB |
Output is correct |
47 |
Correct |
811 ms |
11820 KB |
Output is correct |
48 |
Correct |
798 ms |
11860 KB |
Output is correct |
49 |
Correct |
1062 ms |
18540 KB |
Output is correct |
50 |
Correct |
983 ms |
14052 KB |
Output is correct |
51 |
Correct |
1089 ms |
20080 KB |
Output is correct |
52 |
Incorrect |
1118 ms |
17644 KB |
Output isn't correct |
53 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
20 ms |
11612 KB |
Output is correct |
2 |
Correct |
33 ms |
11612 KB |
Output is correct |
3 |
Correct |
11 ms |
11612 KB |
Output is correct |
4 |
Correct |
103 ms |
11808 KB |
Output is correct |
5 |
Correct |
1 ms |
7516 KB |
Output is correct |
6 |
Correct |
476 ms |
12040 KB |
Output is correct |
7 |
Correct |
488 ms |
11856 KB |
Output is correct |
8 |
Correct |
486 ms |
12036 KB |
Output is correct |
9 |
Correct |
490 ms |
12164 KB |
Output is correct |
10 |
Correct |
423 ms |
11808 KB |
Output is correct |
11 |
Correct |
442 ms |
11608 KB |
Output is correct |
12 |
Correct |
22 ms |
11612 KB |
Output is correct |
13 |
Correct |
27 ms |
11824 KB |
Output is correct |
14 |
Correct |
10 ms |
11612 KB |
Output is correct |
15 |
Correct |
98 ms |
11812 KB |
Output is correct |
16 |
Correct |
1 ms |
7512 KB |
Output is correct |
17 |
Correct |
504 ms |
12016 KB |
Output is correct |
18 |
Correct |
496 ms |
11860 KB |
Output is correct |
19 |
Correct |
489 ms |
12032 KB |
Output is correct |
20 |
Correct |
489 ms |
12164 KB |
Output is correct |
21 |
Correct |
422 ms |
11608 KB |
Output is correct |
22 |
Correct |
421 ms |
11804 KB |
Output is correct |
23 |
Correct |
2 ms |
7512 KB |
Output is correct |
24 |
Correct |
1020 ms |
13408 KB |
Output is correct |
25 |
Correct |
979 ms |
12240 KB |
Output is correct |
26 |
Correct |
1046 ms |
14792 KB |
Output is correct |
27 |
Correct |
1064 ms |
14700 KB |
Output is correct |
28 |
Correct |
798 ms |
11828 KB |
Output is correct |
29 |
Correct |
805 ms |
11608 KB |
Output is correct |
30 |
Correct |
101 ms |
11608 KB |
Output is correct |
31 |
Correct |
323 ms |
13672 KB |
Output is correct |
32 |
Correct |
290 ms |
15096 KB |
Output is correct |
33 |
Correct |
343 ms |
17896 KB |
Output is correct |
34 |
Correct |
325 ms |
17732 KB |
Output is correct |
35 |
Correct |
400 ms |
18516 KB |
Output is correct |
36 |
Correct |
254 ms |
11856 KB |
Output is correct |
37 |
Correct |
250 ms |
12060 KB |
Output is correct |
38 |
Correct |
330 ms |
18552 KB |
Output is correct |
39 |
Correct |
310 ms |
15184 KB |
Output is correct |
40 |
Correct |
21 ms |
11608 KB |
Output is correct |
41 |
Correct |
34 ms |
11612 KB |
Output is correct |
42 |
Correct |
11 ms |
11836 KB |
Output is correct |
43 |
Correct |
96 ms |
11800 KB |
Output is correct |
44 |
Correct |
326 ms |
13684 KB |
Output is correct |
45 |
Correct |
286 ms |
15104 KB |
Output is correct |
46 |
Correct |
353 ms |
17960 KB |
Output is correct |
47 |
Correct |
345 ms |
17912 KB |
Output is correct |
48 |
Correct |
377 ms |
18552 KB |
Output is correct |
49 |
Correct |
256 ms |
12064 KB |
Output is correct |
50 |
Correct |
255 ms |
11796 KB |
Output is correct |
51 |
Correct |
348 ms |
18436 KB |
Output is correct |
52 |
Correct |
322 ms |
15388 KB |
Output is correct |
53 |
Correct |
345 ms |
14832 KB |
Output is correct |
54 |
Correct |
304 ms |
15032 KB |
Output is correct |
55 |
Correct |
372 ms |
18372 KB |
Output is correct |
56 |
Correct |
350 ms |
17880 KB |
Output is correct |
57 |
Correct |
382 ms |
18548 KB |
Output is correct |
58 |
Correct |
96 ms |
11612 KB |
Output is correct |
59 |
Correct |
341 ms |
13648 KB |
Output is correct |
60 |
Correct |
296 ms |
15308 KB |
Output is correct |
61 |
Correct |
360 ms |
17936 KB |
Output is correct |
62 |
Correct |
352 ms |
17732 KB |
Output is correct |
63 |
Correct |
394 ms |
18544 KB |
Output is correct |
64 |
Correct |
253 ms |
12076 KB |
Output is correct |
65 |
Correct |
263 ms |
11812 KB |
Output is correct |
66 |
Correct |
338 ms |
18552 KB |
Output is correct |
67 |
Correct |
318 ms |
15372 KB |
Output is correct |
68 |
Correct |
423 ms |
11816 KB |
Output is correct |
69 |
Correct |
406 ms |
11608 KB |
Output is correct |
70 |
Correct |
531 ms |
16648 KB |
Output is correct |
71 |
Correct |
507 ms |
17924 KB |
Output is correct |
72 |
Correct |
553 ms |
20080 KB |
Output is correct |
73 |
Correct |
554 ms |
18256 KB |
Output is correct |
74 |
Correct |
606 ms |
18644 KB |
Output is correct |
75 |
Correct |
517 ms |
14800 KB |
Output is correct |
76 |
Correct |
21 ms |
11608 KB |
Output is correct |
77 |
Correct |
31 ms |
11612 KB |
Output is correct |
78 |
Correct |
10 ms |
11608 KB |
Output is correct |
79 |
Correct |
95 ms |
11824 KB |
Output is correct |
80 |
Correct |
1 ms |
7516 KB |
Output is correct |
81 |
Correct |
461 ms |
12012 KB |
Output is correct |
82 |
Correct |
460 ms |
12112 KB |
Output is correct |
83 |
Correct |
462 ms |
12024 KB |
Output is correct |
84 |
Correct |
463 ms |
12408 KB |
Output is correct |
85 |
Correct |
398 ms |
11612 KB |
Output is correct |
86 |
Correct |
407 ms |
11612 KB |
Output is correct |
87 |
Correct |
323 ms |
13772 KB |
Output is correct |
88 |
Correct |
278 ms |
15280 KB |
Output is correct |
89 |
Correct |
332 ms |
17900 KB |
Output is correct |
90 |
Correct |
325 ms |
17868 KB |
Output is correct |
91 |
Correct |
372 ms |
18548 KB |
Output is correct |
92 |
Correct |
247 ms |
12116 KB |
Output is correct |
93 |
Correct |
245 ms |
11820 KB |
Output is correct |
94 |
Correct |
328 ms |
18536 KB |
Output is correct |
95 |
Correct |
310 ms |
15220 KB |
Output is correct |
96 |
Correct |
323 ms |
14832 KB |
Output is correct |
97 |
Correct |
286 ms |
14952 KB |
Output is correct |
98 |
Correct |
345 ms |
18384 KB |
Output is correct |
99 |
Correct |
323 ms |
17868 KB |
Output is correct |
100 |
Correct |
356 ms |
18540 KB |
Output is correct |
101 |
Correct |
532 ms |
16880 KB |
Output is correct |
102 |
Correct |
498 ms |
17920 KB |
Output is correct |
103 |
Correct |
557 ms |
18488 KB |
Output is correct |
104 |
Correct |
554 ms |
18500 KB |
Output is correct |
105 |
Correct |
607 ms |
18540 KB |
Output is correct |
106 |
Correct |
522 ms |
14648 KB |
Output is correct |
107 |
Correct |
522 ms |
15260 KB |
Output is correct |
108 |
Correct |
534 ms |
16792 KB |
Output is correct |
109 |
Correct |
526 ms |
19820 KB |
Output is correct |
110 |
Correct |
600 ms |
18504 KB |
Output is correct |
111 |
Correct |
95 ms |
11808 KB |
Output is correct |
112 |
Correct |
316 ms |
13712 KB |
Output is correct |
113 |
Correct |
285 ms |
15284 KB |
Output is correct |
114 |
Correct |
336 ms |
17912 KB |
Output is correct |
115 |
Correct |
323 ms |
17764 KB |
Output is correct |
116 |
Correct |
375 ms |
18548 KB |
Output is correct |
117 |
Correct |
246 ms |
11980 KB |
Output is correct |
118 |
Correct |
245 ms |
11812 KB |
Output is correct |
119 |
Correct |
320 ms |
18544 KB |
Output is correct |
120 |
Correct |
303 ms |
15152 KB |
Output is correct |
121 |
Correct |
402 ms |
11812 KB |
Output is correct |
122 |
Correct |
402 ms |
11612 KB |
Output is correct |
123 |
Correct |
537 ms |
16676 KB |
Output is correct |
124 |
Correct |
514 ms |
17944 KB |
Output is correct |
125 |
Correct |
552 ms |
18408 KB |
Output is correct |
126 |
Correct |
558 ms |
18500 KB |
Output is correct |
127 |
Correct |
605 ms |
18420 KB |
Output is correct |
128 |
Correct |
526 ms |
14736 KB |
Output is correct |
129 |
Correct |
811 ms |
11820 KB |
Output is correct |
130 |
Correct |
798 ms |
11860 KB |
Output is correct |
131 |
Correct |
1062 ms |
18540 KB |
Output is correct |
132 |
Correct |
983 ms |
14052 KB |
Output is correct |
133 |
Correct |
1089 ms |
20080 KB |
Output is correct |
134 |
Incorrect |
1118 ms |
17644 KB |
Output isn't correct |
135 |
Halted |
0 ms |
0 KB |
- |