답안 #1070905

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
1070905 2024-08-22T20:38:44 Z AdamGS Uplifting Excursion (BOI22_vault) C++17
80 / 100
4518 ms 35636 KB
#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=1e6+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]-40, 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) if(A[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 39 ms 19036 KB Output is correct
2 Correct 31 ms 19036 KB Output is correct
3 Correct 14 ms 19036 KB Output is correct
4 Correct 90 ms 19264 KB Output is correct
5 Correct 2 ms 10844 KB Output is correct
6 Correct 951 ms 19496 KB Output is correct
7 Correct 416 ms 19284 KB Output is correct
8 Correct 934 ms 19500 KB Output is correct
9 Correct 968 ms 19592 KB Output is correct
10 Correct 23 ms 19272 KB Output is correct
11 Correct 48 ms 19036 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 39 ms 19036 KB Output is correct
2 Correct 31 ms 19036 KB Output is correct
3 Correct 14 ms 19036 KB Output is correct
4 Correct 90 ms 19264 KB Output is correct
5 Correct 2 ms 10844 KB Output is correct
6 Correct 951 ms 19496 KB Output is correct
7 Correct 416 ms 19284 KB Output is correct
8 Correct 934 ms 19500 KB Output is correct
9 Correct 968 ms 19592 KB Output is correct
10 Correct 23 ms 19272 KB Output is correct
11 Correct 48 ms 19036 KB Output is correct
12 Correct 41 ms 19036 KB Output is correct
13 Correct 30 ms 19032 KB Output is correct
14 Correct 13 ms 19036 KB Output is correct
15 Correct 93 ms 19036 KB Output is correct
16 Correct 2 ms 10840 KB Output is correct
17 Correct 969 ms 19512 KB Output is correct
18 Correct 418 ms 19404 KB Output is correct
19 Correct 962 ms 19504 KB Output is correct
20 Correct 973 ms 19584 KB Output is correct
21 Correct 24 ms 19032 KB Output is correct
22 Correct 47 ms 19036 KB Output is correct
23 Correct 2 ms 10844 KB Output is correct
24 Correct 1993 ms 20944 KB Output is correct
25 Correct 783 ms 19688 KB Output is correct
26 Correct 2047 ms 22284 KB Output is correct
27 Correct 2102 ms 22124 KB Output is correct
28 Correct 29 ms 19032 KB Output is correct
29 Correct 52 ms 19036 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 98 ms 19036 KB Output is correct
2 Correct 425 ms 23116 KB Output is correct
3 Correct 161 ms 26220 KB Output is correct
4 Correct 498 ms 31592 KB Output is correct
5 Correct 469 ms 31504 KB Output is correct
6 Correct 573 ms 34364 KB Output is correct
7 Correct 26 ms 19548 KB Output is correct
8 Correct 55 ms 19036 KB Output is correct
9 Correct 319 ms 34876 KB Output is correct
10 Correct 351 ms 26252 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 98 ms 19036 KB Output is correct
2 Correct 425 ms 23116 KB Output is correct
3 Correct 161 ms 26220 KB Output is correct
4 Correct 498 ms 31592 KB Output is correct
5 Correct 469 ms 31504 KB Output is correct
6 Correct 573 ms 34364 KB Output is correct
7 Correct 26 ms 19548 KB Output is correct
8 Correct 55 ms 19036 KB Output is correct
9 Correct 319 ms 34876 KB Output is correct
10 Correct 351 ms 26252 KB Output is correct
11 Correct 39 ms 19036 KB Output is correct
12 Correct 31 ms 19036 KB Output is correct
13 Correct 14 ms 19036 KB Output is correct
14 Correct 94 ms 19032 KB Output is correct
15 Correct 428 ms 23156 KB Output is correct
16 Correct 117 ms 26232 KB Output is correct
17 Correct 531 ms 31712 KB Output is correct
18 Correct 446 ms 31512 KB Output is correct
19 Correct 566 ms 34152 KB Output is correct
20 Correct 26 ms 19552 KB Output is correct
21 Correct 53 ms 19252 KB Output is correct
22 Correct 328 ms 35024 KB Output is correct
23 Correct 319 ms 26212 KB Output is correct
24 Correct 786 ms 25344 KB Output is correct
25 Correct 272 ms 25280 KB Output is correct
26 Correct 826 ms 31788 KB Output is correct
27 Correct 700 ms 31376 KB Output is correct
28 Correct 782 ms 33080 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 98 ms 19036 KB Output is correct
2 Correct 425 ms 23116 KB Output is correct
3 Correct 161 ms 26220 KB Output is correct
4 Correct 498 ms 31592 KB Output is correct
5 Correct 469 ms 31504 KB Output is correct
6 Correct 573 ms 34364 KB Output is correct
7 Correct 26 ms 19548 KB Output is correct
8 Correct 55 ms 19036 KB Output is correct
9 Correct 319 ms 34876 KB Output is correct
10 Correct 351 ms 26252 KB Output is correct
11 Correct 93 ms 19036 KB Output is correct
12 Correct 417 ms 23156 KB Output is correct
13 Correct 123 ms 26236 KB Output is correct
14 Correct 507 ms 31592 KB Output is correct
15 Correct 459 ms 31504 KB Output is correct
16 Correct 592 ms 34848 KB Output is correct
17 Correct 30 ms 19544 KB Output is correct
18 Correct 50 ms 19036 KB Output is correct
19 Correct 312 ms 33252 KB Output is correct
20 Correct 343 ms 26220 KB Output is correct
21 Correct 24 ms 19036 KB Output is correct
22 Correct 52 ms 19036 KB Output is correct
23 Correct 742 ms 28888 KB Output is correct
24 Correct 313 ms 31700 KB Output is correct
25 Correct 831 ms 35608 KB Output is correct
26 Correct 824 ms 31816 KB Output is correct
27 Correct 934 ms 33308 KB Output is correct
28 Correct 590 ms 24996 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 39 ms 19036 KB Output is correct
2 Correct 31 ms 19036 KB Output is correct
3 Correct 14 ms 19036 KB Output is correct
4 Correct 90 ms 19264 KB Output is correct
5 Correct 2 ms 10844 KB Output is correct
6 Correct 951 ms 19496 KB Output is correct
7 Correct 416 ms 19284 KB Output is correct
8 Correct 934 ms 19500 KB Output is correct
9 Correct 968 ms 19592 KB Output is correct
10 Correct 23 ms 19272 KB Output is correct
11 Correct 48 ms 19036 KB Output is correct
12 Correct 98 ms 19036 KB Output is correct
13 Correct 425 ms 23116 KB Output is correct
14 Correct 161 ms 26220 KB Output is correct
15 Correct 498 ms 31592 KB Output is correct
16 Correct 469 ms 31504 KB Output is correct
17 Correct 573 ms 34364 KB Output is correct
18 Correct 26 ms 19548 KB Output is correct
19 Correct 55 ms 19036 KB Output is correct
20 Correct 319 ms 34876 KB Output is correct
21 Correct 351 ms 26252 KB Output is correct
22 Correct 39 ms 19036 KB Output is correct
23 Correct 31 ms 19036 KB Output is correct
24 Correct 14 ms 19036 KB Output is correct
25 Correct 94 ms 19032 KB Output is correct
26 Correct 428 ms 23156 KB Output is correct
27 Correct 117 ms 26232 KB Output is correct
28 Correct 531 ms 31712 KB Output is correct
29 Correct 446 ms 31512 KB Output is correct
30 Correct 566 ms 34152 KB Output is correct
31 Correct 26 ms 19552 KB Output is correct
32 Correct 53 ms 19252 KB Output is correct
33 Correct 328 ms 35024 KB Output is correct
34 Correct 319 ms 26212 KB Output is correct
35 Correct 786 ms 25344 KB Output is correct
36 Correct 272 ms 25280 KB Output is correct
37 Correct 826 ms 31788 KB Output is correct
38 Correct 700 ms 31376 KB Output is correct
39 Correct 782 ms 33080 KB Output is correct
40 Correct 93 ms 19036 KB Output is correct
41 Correct 417 ms 23156 KB Output is correct
42 Correct 123 ms 26236 KB Output is correct
43 Correct 507 ms 31592 KB Output is correct
44 Correct 459 ms 31504 KB Output is correct
45 Correct 592 ms 34848 KB Output is correct
46 Correct 30 ms 19544 KB Output is correct
47 Correct 50 ms 19036 KB Output is correct
48 Correct 312 ms 33252 KB Output is correct
49 Correct 343 ms 26220 KB Output is correct
50 Correct 24 ms 19036 KB Output is correct
51 Correct 52 ms 19036 KB Output is correct
52 Correct 742 ms 28888 KB Output is correct
53 Correct 313 ms 31700 KB Output is correct
54 Correct 831 ms 35608 KB Output is correct
55 Correct 824 ms 31816 KB Output is correct
56 Correct 934 ms 33308 KB Output is correct
57 Correct 590 ms 24996 KB Output is correct
58 Correct 73 ms 19252 KB Output is correct
59 Correct 31 ms 19032 KB Output is correct
60 Correct 15 ms 19036 KB Output is correct
61 Correct 95 ms 19032 KB Output is correct
62 Correct 3 ms 11096 KB Output is correct
63 Correct 1058 ms 19528 KB Output is correct
64 Correct 447 ms 19268 KB Output is correct
65 Correct 1060 ms 19488 KB Output is correct
66 Correct 1101 ms 19596 KB Output is correct
67 Correct 25 ms 19032 KB Output is correct
68 Correct 54 ms 19256 KB Output is correct
69 Correct 494 ms 23152 KB Output is correct
70 Correct 124 ms 25992 KB Output is correct
71 Correct 531 ms 31624 KB Output is correct
72 Correct 491 ms 31468 KB Output is correct
73 Correct 629 ms 32540 KB Output is correct
74 Correct 45 ms 19284 KB Output is correct
75 Correct 84 ms 19036 KB Output is correct
76 Correct 312 ms 34856 KB Output is correct
77 Correct 340 ms 26256 KB Output is correct
78 Correct 656 ms 25296 KB Output is correct
79 Correct 287 ms 25508 KB Output is correct
80 Correct 772 ms 31816 KB Output is correct
81 Correct 738 ms 31400 KB Output is correct
82 Correct 840 ms 33124 KB Output is correct
83 Correct 786 ms 28932 KB Output is correct
84 Correct 338 ms 31704 KB Output is correct
85 Correct 776 ms 35356 KB Output is correct
86 Correct 815 ms 33504 KB Output is correct
87 Correct 926 ms 32708 KB Output is correct
88 Correct 554 ms 25188 KB Output is correct
89 Correct 1139 ms 25896 KB Output is correct
90 Correct 1152 ms 28940 KB Output is correct
91 Correct 1175 ms 32640 KB Output is correct
92 Correct 1315 ms 34588 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 98 ms 19036 KB Output is correct
2 Correct 425 ms 23116 KB Output is correct
3 Correct 161 ms 26220 KB Output is correct
4 Correct 498 ms 31592 KB Output is correct
5 Correct 469 ms 31504 KB Output is correct
6 Correct 573 ms 34364 KB Output is correct
7 Correct 26 ms 19548 KB Output is correct
8 Correct 55 ms 19036 KB Output is correct
9 Correct 319 ms 34876 KB Output is correct
10 Correct 351 ms 26252 KB Output is correct
11 Correct 93 ms 19036 KB Output is correct
12 Correct 417 ms 23156 KB Output is correct
13 Correct 123 ms 26236 KB Output is correct
14 Correct 507 ms 31592 KB Output is correct
15 Correct 459 ms 31504 KB Output is correct
16 Correct 592 ms 34848 KB Output is correct
17 Correct 30 ms 19544 KB Output is correct
18 Correct 50 ms 19036 KB Output is correct
19 Correct 312 ms 33252 KB Output is correct
20 Correct 343 ms 26220 KB Output is correct
21 Correct 24 ms 19036 KB Output is correct
22 Correct 52 ms 19036 KB Output is correct
23 Correct 742 ms 28888 KB Output is correct
24 Correct 313 ms 31700 KB Output is correct
25 Correct 831 ms 35608 KB Output is correct
26 Correct 824 ms 31816 KB Output is correct
27 Correct 934 ms 33308 KB Output is correct
28 Correct 590 ms 24996 KB Output is correct
29 Correct 91 ms 19036 KB Output is correct
30 Correct 414 ms 23044 KB Output is correct
31 Correct 126 ms 26208 KB Output is correct
32 Correct 539 ms 31552 KB Output is correct
33 Correct 470 ms 31508 KB Output is correct
34 Correct 611 ms 32900 KB Output is correct
35 Correct 46 ms 19508 KB Output is correct
36 Correct 79 ms 19252 KB Output is correct
37 Correct 363 ms 34896 KB Output is correct
38 Correct 333 ms 26244 KB Output is correct
39 Correct 25 ms 19036 KB Output is correct
40 Correct 53 ms 19036 KB Output is correct
41 Correct 796 ms 28992 KB Output is correct
42 Correct 319 ms 31700 KB Output is correct
43 Correct 906 ms 32564 KB Output is correct
44 Correct 856 ms 31820 KB Output is correct
45 Correct 1090 ms 34056 KB Output is correct
46 Correct 560 ms 25040 KB Output is correct
47 Correct 24 ms 19032 KB Output is correct
48 Correct 52 ms 19036 KB Output is correct
49 Correct 1457 ms 34940 KB Output is correct
50 Correct 633 ms 23464 KB Output is correct
51 Correct 1583 ms 32548 KB Output is correct
52 Correct 1679 ms 31080 KB Output is correct
53 Correct 1904 ms 35360 KB Output is correct
54 Correct 1260 ms 26324 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 39 ms 19036 KB Output is correct
2 Correct 31 ms 19036 KB Output is correct
3 Correct 14 ms 19036 KB Output is correct
4 Correct 90 ms 19264 KB Output is correct
5 Correct 2 ms 10844 KB Output is correct
6 Correct 951 ms 19496 KB Output is correct
7 Correct 416 ms 19284 KB Output is correct
8 Correct 934 ms 19500 KB Output is correct
9 Correct 968 ms 19592 KB Output is correct
10 Correct 23 ms 19272 KB Output is correct
11 Correct 48 ms 19036 KB Output is correct
12 Correct 41 ms 19036 KB Output is correct
13 Correct 30 ms 19032 KB Output is correct
14 Correct 13 ms 19036 KB Output is correct
15 Correct 93 ms 19036 KB Output is correct
16 Correct 2 ms 10840 KB Output is correct
17 Correct 969 ms 19512 KB Output is correct
18 Correct 418 ms 19404 KB Output is correct
19 Correct 962 ms 19504 KB Output is correct
20 Correct 973 ms 19584 KB Output is correct
21 Correct 24 ms 19032 KB Output is correct
22 Correct 47 ms 19036 KB Output is correct
23 Correct 2 ms 10844 KB Output is correct
24 Correct 1993 ms 20944 KB Output is correct
25 Correct 783 ms 19688 KB Output is correct
26 Correct 2047 ms 22284 KB Output is correct
27 Correct 2102 ms 22124 KB Output is correct
28 Correct 29 ms 19032 KB Output is correct
29 Correct 52 ms 19036 KB Output is correct
30 Correct 98 ms 19036 KB Output is correct
31 Correct 425 ms 23116 KB Output is correct
32 Correct 161 ms 26220 KB Output is correct
33 Correct 498 ms 31592 KB Output is correct
34 Correct 469 ms 31504 KB Output is correct
35 Correct 573 ms 34364 KB Output is correct
36 Correct 26 ms 19548 KB Output is correct
37 Correct 55 ms 19036 KB Output is correct
38 Correct 319 ms 34876 KB Output is correct
39 Correct 351 ms 26252 KB Output is correct
40 Correct 39 ms 19036 KB Output is correct
41 Correct 31 ms 19036 KB Output is correct
42 Correct 14 ms 19036 KB Output is correct
43 Correct 94 ms 19032 KB Output is correct
44 Correct 428 ms 23156 KB Output is correct
45 Correct 117 ms 26232 KB Output is correct
46 Correct 531 ms 31712 KB Output is correct
47 Correct 446 ms 31512 KB Output is correct
48 Correct 566 ms 34152 KB Output is correct
49 Correct 26 ms 19552 KB Output is correct
50 Correct 53 ms 19252 KB Output is correct
51 Correct 328 ms 35024 KB Output is correct
52 Correct 319 ms 26212 KB Output is correct
53 Correct 786 ms 25344 KB Output is correct
54 Correct 272 ms 25280 KB Output is correct
55 Correct 826 ms 31788 KB Output is correct
56 Correct 700 ms 31376 KB Output is correct
57 Correct 782 ms 33080 KB Output is correct
58 Correct 93 ms 19036 KB Output is correct
59 Correct 417 ms 23156 KB Output is correct
60 Correct 123 ms 26236 KB Output is correct
61 Correct 507 ms 31592 KB Output is correct
62 Correct 459 ms 31504 KB Output is correct
63 Correct 592 ms 34848 KB Output is correct
64 Correct 30 ms 19544 KB Output is correct
65 Correct 50 ms 19036 KB Output is correct
66 Correct 312 ms 33252 KB Output is correct
67 Correct 343 ms 26220 KB Output is correct
68 Correct 24 ms 19036 KB Output is correct
69 Correct 52 ms 19036 KB Output is correct
70 Correct 742 ms 28888 KB Output is correct
71 Correct 313 ms 31700 KB Output is correct
72 Correct 831 ms 35608 KB Output is correct
73 Correct 824 ms 31816 KB Output is correct
74 Correct 934 ms 33308 KB Output is correct
75 Correct 590 ms 24996 KB Output is correct
76 Correct 73 ms 19252 KB Output is correct
77 Correct 31 ms 19032 KB Output is correct
78 Correct 15 ms 19036 KB Output is correct
79 Correct 95 ms 19032 KB Output is correct
80 Correct 3 ms 11096 KB Output is correct
81 Correct 1058 ms 19528 KB Output is correct
82 Correct 447 ms 19268 KB Output is correct
83 Correct 1060 ms 19488 KB Output is correct
84 Correct 1101 ms 19596 KB Output is correct
85 Correct 25 ms 19032 KB Output is correct
86 Correct 54 ms 19256 KB Output is correct
87 Correct 494 ms 23152 KB Output is correct
88 Correct 124 ms 25992 KB Output is correct
89 Correct 531 ms 31624 KB Output is correct
90 Correct 491 ms 31468 KB Output is correct
91 Correct 629 ms 32540 KB Output is correct
92 Correct 45 ms 19284 KB Output is correct
93 Correct 84 ms 19036 KB Output is correct
94 Correct 312 ms 34856 KB Output is correct
95 Correct 340 ms 26256 KB Output is correct
96 Correct 656 ms 25296 KB Output is correct
97 Correct 287 ms 25508 KB Output is correct
98 Correct 772 ms 31816 KB Output is correct
99 Correct 738 ms 31400 KB Output is correct
100 Correct 840 ms 33124 KB Output is correct
101 Correct 786 ms 28932 KB Output is correct
102 Correct 338 ms 31704 KB Output is correct
103 Correct 776 ms 35356 KB Output is correct
104 Correct 815 ms 33504 KB Output is correct
105 Correct 926 ms 32708 KB Output is correct
106 Correct 554 ms 25188 KB Output is correct
107 Correct 1139 ms 25896 KB Output is correct
108 Correct 1152 ms 28940 KB Output is correct
109 Correct 1175 ms 32640 KB Output is correct
110 Correct 1315 ms 34588 KB Output is correct
111 Correct 91 ms 19036 KB Output is correct
112 Correct 414 ms 23044 KB Output is correct
113 Correct 126 ms 26208 KB Output is correct
114 Correct 539 ms 31552 KB Output is correct
115 Correct 470 ms 31508 KB Output is correct
116 Correct 611 ms 32900 KB Output is correct
117 Correct 46 ms 19508 KB Output is correct
118 Correct 79 ms 19252 KB Output is correct
119 Correct 363 ms 34896 KB Output is correct
120 Correct 333 ms 26244 KB Output is correct
121 Correct 25 ms 19036 KB Output is correct
122 Correct 53 ms 19036 KB Output is correct
123 Correct 796 ms 28992 KB Output is correct
124 Correct 319 ms 31700 KB Output is correct
125 Correct 906 ms 32564 KB Output is correct
126 Correct 856 ms 31820 KB Output is correct
127 Correct 1090 ms 34056 KB Output is correct
128 Correct 560 ms 25040 KB Output is correct
129 Correct 24 ms 19032 KB Output is correct
130 Correct 52 ms 19036 KB Output is correct
131 Correct 1457 ms 34940 KB Output is correct
132 Correct 633 ms 23464 KB Output is correct
133 Correct 1583 ms 32548 KB Output is correct
134 Correct 1679 ms 31080 KB Output is correct
135 Correct 1904 ms 35360 KB Output is correct
136 Correct 1260 ms 26324 KB Output is correct
137 Correct 68 ms 19036 KB Output is correct
138 Correct 32 ms 19036 KB Output is correct
139 Correct 24 ms 19272 KB Output is correct
140 Correct 94 ms 19252 KB Output is correct
141 Correct 2 ms 10844 KB Output is correct
142 Correct 1012 ms 19500 KB Output is correct
143 Correct 475 ms 19284 KB Output is correct
144 Correct 1055 ms 19492 KB Output is correct
145 Correct 1072 ms 19588 KB Output is correct
146 Correct 25 ms 19268 KB Output is correct
147 Correct 50 ms 19028 KB Output is correct
148 Correct 3 ms 10844 KB Output is correct
149 Correct 2174 ms 20868 KB Output is correct
150 Correct 814 ms 19688 KB Output is correct
151 Correct 2210 ms 22164 KB Output is correct
152 Correct 2063 ms 22136 KB Output is correct
153 Correct 22 ms 19036 KB Output is correct
154 Correct 46 ms 19032 KB Output is correct
155 Correct 444 ms 23128 KB Output is correct
156 Correct 117 ms 26116 KB Output is correct
157 Correct 455 ms 31660 KB Output is correct
158 Correct 423 ms 31484 KB Output is correct
159 Correct 551 ms 35636 KB Output is correct
160 Correct 33 ms 19528 KB Output is correct
161 Correct 52 ms 19252 KB Output is correct
162 Correct 293 ms 34168 KB Output is correct
163 Correct 318 ms 26224 KB Output is correct
164 Correct 758 ms 28904 KB Output is correct
165 Correct 364 ms 31496 KB Output is correct
166 Correct 732 ms 35072 KB Output is correct
167 Correct 807 ms 33344 KB Output is correct
168 Correct 923 ms 32660 KB Output is correct
169 Correct 545 ms 25016 KB Output is correct
170 Correct 745 ms 25280 KB Output is correct
171 Correct 272 ms 25256 KB Output is correct
172 Correct 799 ms 31784 KB Output is correct
173 Correct 747 ms 31344 KB Output is correct
174 Correct 816 ms 34900 KB Output is correct
175 Correct 1151 ms 25956 KB Output is correct
176 Correct 1179 ms 29052 KB Output is correct
177 Correct 1186 ms 35612 KB Output is correct
178 Correct 1321 ms 34076 KB Output is correct
179 Correct 1471 ms 33052 KB Output is correct
180 Correct 633 ms 23408 KB Output is correct
181 Correct 1581 ms 32576 KB Output is correct
182 Correct 1742 ms 31592 KB Output is correct
183 Correct 1853 ms 34588 KB Output is correct
184 Correct 1275 ms 26316 KB Output is correct
185 Correct 2343 ms 31740 KB Output is correct
186 Correct 2494 ms 31316 KB Output is correct
187 Correct 2717 ms 31724 KB Output is correct
188 Correct 2729 ms 34692 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 98 ms 19036 KB Output is correct
2 Correct 425 ms 23116 KB Output is correct
3 Correct 161 ms 26220 KB Output is correct
4 Correct 498 ms 31592 KB Output is correct
5 Correct 469 ms 31504 KB Output is correct
6 Correct 573 ms 34364 KB Output is correct
7 Correct 26 ms 19548 KB Output is correct
8 Correct 55 ms 19036 KB Output is correct
9 Correct 319 ms 34876 KB Output is correct
10 Correct 351 ms 26252 KB Output is correct
11 Correct 93 ms 19036 KB Output is correct
12 Correct 417 ms 23156 KB Output is correct
13 Correct 123 ms 26236 KB Output is correct
14 Correct 507 ms 31592 KB Output is correct
15 Correct 459 ms 31504 KB Output is correct
16 Correct 592 ms 34848 KB Output is correct
17 Correct 30 ms 19544 KB Output is correct
18 Correct 50 ms 19036 KB Output is correct
19 Correct 312 ms 33252 KB Output is correct
20 Correct 343 ms 26220 KB Output is correct
21 Correct 24 ms 19036 KB Output is correct
22 Correct 52 ms 19036 KB Output is correct
23 Correct 742 ms 28888 KB Output is correct
24 Correct 313 ms 31700 KB Output is correct
25 Correct 831 ms 35608 KB Output is correct
26 Correct 824 ms 31816 KB Output is correct
27 Correct 934 ms 33308 KB Output is correct
28 Correct 590 ms 24996 KB Output is correct
29 Correct 91 ms 19036 KB Output is correct
30 Correct 414 ms 23044 KB Output is correct
31 Correct 126 ms 26208 KB Output is correct
32 Correct 539 ms 31552 KB Output is correct
33 Correct 470 ms 31508 KB Output is correct
34 Correct 611 ms 32900 KB Output is correct
35 Correct 46 ms 19508 KB Output is correct
36 Correct 79 ms 19252 KB Output is correct
37 Correct 363 ms 34896 KB Output is correct
38 Correct 333 ms 26244 KB Output is correct
39 Correct 25 ms 19036 KB Output is correct
40 Correct 53 ms 19036 KB Output is correct
41 Correct 796 ms 28992 KB Output is correct
42 Correct 319 ms 31700 KB Output is correct
43 Correct 906 ms 32564 KB Output is correct
44 Correct 856 ms 31820 KB Output is correct
45 Correct 1090 ms 34056 KB Output is correct
46 Correct 560 ms 25040 KB Output is correct
47 Correct 24 ms 19032 KB Output is correct
48 Correct 52 ms 19036 KB Output is correct
49 Correct 1457 ms 34940 KB Output is correct
50 Correct 633 ms 23464 KB Output is correct
51 Correct 1583 ms 32548 KB Output is correct
52 Correct 1679 ms 31080 KB Output is correct
53 Correct 1904 ms 35360 KB Output is correct
54 Correct 1260 ms 26324 KB Output is correct
55 Correct 99 ms 19032 KB Output is correct
56 Correct 473 ms 23132 KB Output is correct
57 Correct 128 ms 26240 KB Output is correct
58 Correct 546 ms 31740 KB Output is correct
59 Correct 584 ms 31472 KB Output is correct
60 Correct 608 ms 34592 KB Output is correct
61 Correct 48 ms 19548 KB Output is correct
62 Correct 58 ms 19032 KB Output is correct
63 Correct 326 ms 35344 KB Output is correct
64 Correct 329 ms 26160 KB Output is correct
65 Correct 25 ms 19036 KB Output is correct
66 Correct 55 ms 19032 KB Output is correct
67 Correct 805 ms 28872 KB Output is correct
68 Correct 316 ms 31572 KB Output is correct
69 Correct 771 ms 33344 KB Output is correct
70 Correct 829 ms 31808 KB Output is correct
71 Correct 947 ms 34080 KB Output is correct
72 Correct 543 ms 25240 KB Output is correct
73 Correct 23 ms 19036 KB Output is correct
74 Correct 84 ms 19036 KB Output is correct
75 Correct 1481 ms 34736 KB Output is correct
76 Correct 701 ms 23604 KB Output is correct
77 Correct 1543 ms 32564 KB Output is correct
78 Correct 1593 ms 31076 KB Output is correct
79 Correct 1813 ms 35364 KB Output is correct
80 Correct 1339 ms 26492 KB Output is correct
81 Correct 4518 ms 30256 KB Output is correct
82 Correct 2025 ms 23088 KB Output is correct
83 Correct 4291 ms 33364 KB Output is correct
84 Incorrect 4510 ms 33832 KB Output isn't correct
85 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 39 ms 19036 KB Output is correct
2 Correct 31 ms 19036 KB Output is correct
3 Correct 14 ms 19036 KB Output is correct
4 Correct 90 ms 19264 KB Output is correct
5 Correct 2 ms 10844 KB Output is correct
6 Correct 951 ms 19496 KB Output is correct
7 Correct 416 ms 19284 KB Output is correct
8 Correct 934 ms 19500 KB Output is correct
9 Correct 968 ms 19592 KB Output is correct
10 Correct 23 ms 19272 KB Output is correct
11 Correct 48 ms 19036 KB Output is correct
12 Correct 41 ms 19036 KB Output is correct
13 Correct 30 ms 19032 KB Output is correct
14 Correct 13 ms 19036 KB Output is correct
15 Correct 93 ms 19036 KB Output is correct
16 Correct 2 ms 10840 KB Output is correct
17 Correct 969 ms 19512 KB Output is correct
18 Correct 418 ms 19404 KB Output is correct
19 Correct 962 ms 19504 KB Output is correct
20 Correct 973 ms 19584 KB Output is correct
21 Correct 24 ms 19032 KB Output is correct
22 Correct 47 ms 19036 KB Output is correct
23 Correct 2 ms 10844 KB Output is correct
24 Correct 1993 ms 20944 KB Output is correct
25 Correct 783 ms 19688 KB Output is correct
26 Correct 2047 ms 22284 KB Output is correct
27 Correct 2102 ms 22124 KB Output is correct
28 Correct 29 ms 19032 KB Output is correct
29 Correct 52 ms 19036 KB Output is correct
30 Correct 98 ms 19036 KB Output is correct
31 Correct 425 ms 23116 KB Output is correct
32 Correct 161 ms 26220 KB Output is correct
33 Correct 498 ms 31592 KB Output is correct
34 Correct 469 ms 31504 KB Output is correct
35 Correct 573 ms 34364 KB Output is correct
36 Correct 26 ms 19548 KB Output is correct
37 Correct 55 ms 19036 KB Output is correct
38 Correct 319 ms 34876 KB Output is correct
39 Correct 351 ms 26252 KB Output is correct
40 Correct 39 ms 19036 KB Output is correct
41 Correct 31 ms 19036 KB Output is correct
42 Correct 14 ms 19036 KB Output is correct
43 Correct 94 ms 19032 KB Output is correct
44 Correct 428 ms 23156 KB Output is correct
45 Correct 117 ms 26232 KB Output is correct
46 Correct 531 ms 31712 KB Output is correct
47 Correct 446 ms 31512 KB Output is correct
48 Correct 566 ms 34152 KB Output is correct
49 Correct 26 ms 19552 KB Output is correct
50 Correct 53 ms 19252 KB Output is correct
51 Correct 328 ms 35024 KB Output is correct
52 Correct 319 ms 26212 KB Output is correct
53 Correct 786 ms 25344 KB Output is correct
54 Correct 272 ms 25280 KB Output is correct
55 Correct 826 ms 31788 KB Output is correct
56 Correct 700 ms 31376 KB Output is correct
57 Correct 782 ms 33080 KB Output is correct
58 Correct 93 ms 19036 KB Output is correct
59 Correct 417 ms 23156 KB Output is correct
60 Correct 123 ms 26236 KB Output is correct
61 Correct 507 ms 31592 KB Output is correct
62 Correct 459 ms 31504 KB Output is correct
63 Correct 592 ms 34848 KB Output is correct
64 Correct 30 ms 19544 KB Output is correct
65 Correct 50 ms 19036 KB Output is correct
66 Correct 312 ms 33252 KB Output is correct
67 Correct 343 ms 26220 KB Output is correct
68 Correct 24 ms 19036 KB Output is correct
69 Correct 52 ms 19036 KB Output is correct
70 Correct 742 ms 28888 KB Output is correct
71 Correct 313 ms 31700 KB Output is correct
72 Correct 831 ms 35608 KB Output is correct
73 Correct 824 ms 31816 KB Output is correct
74 Correct 934 ms 33308 KB Output is correct
75 Correct 590 ms 24996 KB Output is correct
76 Correct 73 ms 19252 KB Output is correct
77 Correct 31 ms 19032 KB Output is correct
78 Correct 15 ms 19036 KB Output is correct
79 Correct 95 ms 19032 KB Output is correct
80 Correct 3 ms 11096 KB Output is correct
81 Correct 1058 ms 19528 KB Output is correct
82 Correct 447 ms 19268 KB Output is correct
83 Correct 1060 ms 19488 KB Output is correct
84 Correct 1101 ms 19596 KB Output is correct
85 Correct 25 ms 19032 KB Output is correct
86 Correct 54 ms 19256 KB Output is correct
87 Correct 494 ms 23152 KB Output is correct
88 Correct 124 ms 25992 KB Output is correct
89 Correct 531 ms 31624 KB Output is correct
90 Correct 491 ms 31468 KB Output is correct
91 Correct 629 ms 32540 KB Output is correct
92 Correct 45 ms 19284 KB Output is correct
93 Correct 84 ms 19036 KB Output is correct
94 Correct 312 ms 34856 KB Output is correct
95 Correct 340 ms 26256 KB Output is correct
96 Correct 656 ms 25296 KB Output is correct
97 Correct 287 ms 25508 KB Output is correct
98 Correct 772 ms 31816 KB Output is correct
99 Correct 738 ms 31400 KB Output is correct
100 Correct 840 ms 33124 KB Output is correct
101 Correct 786 ms 28932 KB Output is correct
102 Correct 338 ms 31704 KB Output is correct
103 Correct 776 ms 35356 KB Output is correct
104 Correct 815 ms 33504 KB Output is correct
105 Correct 926 ms 32708 KB Output is correct
106 Correct 554 ms 25188 KB Output is correct
107 Correct 1139 ms 25896 KB Output is correct
108 Correct 1152 ms 28940 KB Output is correct
109 Correct 1175 ms 32640 KB Output is correct
110 Correct 1315 ms 34588 KB Output is correct
111 Correct 91 ms 19036 KB Output is correct
112 Correct 414 ms 23044 KB Output is correct
113 Correct 126 ms 26208 KB Output is correct
114 Correct 539 ms 31552 KB Output is correct
115 Correct 470 ms 31508 KB Output is correct
116 Correct 611 ms 32900 KB Output is correct
117 Correct 46 ms 19508 KB Output is correct
118 Correct 79 ms 19252 KB Output is correct
119 Correct 363 ms 34896 KB Output is correct
120 Correct 333 ms 26244 KB Output is correct
121 Correct 25 ms 19036 KB Output is correct
122 Correct 53 ms 19036 KB Output is correct
123 Correct 796 ms 28992 KB Output is correct
124 Correct 319 ms 31700 KB Output is correct
125 Correct 906 ms 32564 KB Output is correct
126 Correct 856 ms 31820 KB Output is correct
127 Correct 1090 ms 34056 KB Output is correct
128 Correct 560 ms 25040 KB Output is correct
129 Correct 24 ms 19032 KB Output is correct
130 Correct 52 ms 19036 KB Output is correct
131 Correct 1457 ms 34940 KB Output is correct
132 Correct 633 ms 23464 KB Output is correct
133 Correct 1583 ms 32548 KB Output is correct
134 Correct 1679 ms 31080 KB Output is correct
135 Correct 1904 ms 35360 KB Output is correct
136 Correct 1260 ms 26324 KB Output is correct
137 Correct 68 ms 19036 KB Output is correct
138 Correct 32 ms 19036 KB Output is correct
139 Correct 24 ms 19272 KB Output is correct
140 Correct 94 ms 19252 KB Output is correct
141 Correct 2 ms 10844 KB Output is correct
142 Correct 1012 ms 19500 KB Output is correct
143 Correct 475 ms 19284 KB Output is correct
144 Correct 1055 ms 19492 KB Output is correct
145 Correct 1072 ms 19588 KB Output is correct
146 Correct 25 ms 19268 KB Output is correct
147 Correct 50 ms 19028 KB Output is correct
148 Correct 3 ms 10844 KB Output is correct
149 Correct 2174 ms 20868 KB Output is correct
150 Correct 814 ms 19688 KB Output is correct
151 Correct 2210 ms 22164 KB Output is correct
152 Correct 2063 ms 22136 KB Output is correct
153 Correct 22 ms 19036 KB Output is correct
154 Correct 46 ms 19032 KB Output is correct
155 Correct 444 ms 23128 KB Output is correct
156 Correct 117 ms 26116 KB Output is correct
157 Correct 455 ms 31660 KB Output is correct
158 Correct 423 ms 31484 KB Output is correct
159 Correct 551 ms 35636 KB Output is correct
160 Correct 33 ms 19528 KB Output is correct
161 Correct 52 ms 19252 KB Output is correct
162 Correct 293 ms 34168 KB Output is correct
163 Correct 318 ms 26224 KB Output is correct
164 Correct 758 ms 28904 KB Output is correct
165 Correct 364 ms 31496 KB Output is correct
166 Correct 732 ms 35072 KB Output is correct
167 Correct 807 ms 33344 KB Output is correct
168 Correct 923 ms 32660 KB Output is correct
169 Correct 545 ms 25016 KB Output is correct
170 Correct 745 ms 25280 KB Output is correct
171 Correct 272 ms 25256 KB Output is correct
172 Correct 799 ms 31784 KB Output is correct
173 Correct 747 ms 31344 KB Output is correct
174 Correct 816 ms 34900 KB Output is correct
175 Correct 1151 ms 25956 KB Output is correct
176 Correct 1179 ms 29052 KB Output is correct
177 Correct 1186 ms 35612 KB Output is correct
178 Correct 1321 ms 34076 KB Output is correct
179 Correct 1471 ms 33052 KB Output is correct
180 Correct 633 ms 23408 KB Output is correct
181 Correct 1581 ms 32576 KB Output is correct
182 Correct 1742 ms 31592 KB Output is correct
183 Correct 1853 ms 34588 KB Output is correct
184 Correct 1275 ms 26316 KB Output is correct
185 Correct 2343 ms 31740 KB Output is correct
186 Correct 2494 ms 31316 KB Output is correct
187 Correct 2717 ms 31724 KB Output is correct
188 Correct 2729 ms 34692 KB Output is correct
189 Correct 99 ms 19032 KB Output is correct
190 Correct 473 ms 23132 KB Output is correct
191 Correct 128 ms 26240 KB Output is correct
192 Correct 546 ms 31740 KB Output is correct
193 Correct 584 ms 31472 KB Output is correct
194 Correct 608 ms 34592 KB Output is correct
195 Correct 48 ms 19548 KB Output is correct
196 Correct 58 ms 19032 KB Output is correct
197 Correct 326 ms 35344 KB Output is correct
198 Correct 329 ms 26160 KB Output is correct
199 Correct 25 ms 19036 KB Output is correct
200 Correct 55 ms 19032 KB Output is correct
201 Correct 805 ms 28872 KB Output is correct
202 Correct 316 ms 31572 KB Output is correct
203 Correct 771 ms 33344 KB Output is correct
204 Correct 829 ms 31808 KB Output is correct
205 Correct 947 ms 34080 KB Output is correct
206 Correct 543 ms 25240 KB Output is correct
207 Correct 23 ms 19036 KB Output is correct
208 Correct 84 ms 19036 KB Output is correct
209 Correct 1481 ms 34736 KB Output is correct
210 Correct 701 ms 23604 KB Output is correct
211 Correct 1543 ms 32564 KB Output is correct
212 Correct 1593 ms 31076 KB Output is correct
213 Correct 1813 ms 35364 KB Output is correct
214 Correct 1339 ms 26492 KB Output is correct
215 Correct 4518 ms 30256 KB Output is correct
216 Correct 2025 ms 23088 KB Output is correct
217 Correct 4291 ms 33364 KB Output is correct
218 Incorrect 4510 ms 33832 KB Output isn't correct
219 Halted 0 ms 0 KB -