답안 #840164

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
840164 2023-08-31T07:38:51 Z KLPP 봉쇄 시간 (IOI23_closing) C++17
75 / 100
1000 ms 674504 KB
#include "closing.h"
#include<bits/stdc++.h>

using namespace std;
typedef long long int lld;

#define rep(i,a,b) for(int i=a;i<b;i++)
#define trav(a,v) for(auto a:v)
#include <vector>
int n;
lld pref[1000000];
lld distX[1000000];
lld distY[1000000];
vector<pair<int,lld> >nei[1000000];
void DFSX(int node, lld dist=0){
	distX[node]=dist;
	trav(a,nei[node]){
		if(distX[a.first]==-1){
			DFSX(a.first,dist+a.second);
		}
	}
}
void DFSY(int node, lld dist=0){
	distY[node]=dist;
	trav(a,nei[node]){
		if(distY[a.first]==-1){
			DFSY(a.first,dist+a.second);
		}
	}
}
vector<lld> diffs;
vector<lld> dists[1000000];
vector<lld >gains[1000000];
vector<lld >gainsX[1000000];
vector<lld >gainsY[1000000];
lld absol(lld x){
	return max(x,-x);
}
vector<lld> DP[1000000][3];

int max_score(int N, int X, int Y, long long K,
              std::vector<int> U, std::vector<int> V, std::vector<int> W)
{
	n=N;
	rep(i,0,n)nei[i].clear(),distX[i]=-1,distY[i]=-1;
	rep(i,0,n-1){
		nei[U[i]].push_back({V[i],W[i]});
		nei[V[i]].push_back({U[i],W[i]});
	}
	DFSX(X);
	DFSY(Y);
	priority_queue<lld> pq;
	rep(i,0,n){
		pq.push(-distX[i]);
		pq.push(-distY[i]);
	}
	lld sum=0;
	int cnt=0;
	while(!pq.empty() && sum<=K){
		lld d=-pq.top();
		pq.pop();
		sum+=d;
		cnt++;
	}
	if(sum>K)cnt--;
	int ans=cnt;
	diffs.clear();
	rep(i,0,n)diffs.push_back(distX[i]-distY[i]);
	sort(diffs.begin(),diffs.end());
	diffs.resize(unique(diffs.begin(),diffs.end())-diffs.begin());
	int m=diffs.size();
	rep(i,0,m)gains[i].clear(),dists[i].clear(),gainsX[i].clear(),gainsY[i].clear();
	rep(i,0,n){
		int pos=lower_bound(diffs.begin(),diffs.end(),distX[i]-distY[i])-diffs.begin();
		dists[pos].push_back(min(distX[i],distY[i]));
	}
	rep(i,0,m)sort(dists[i].begin(),dists[i].end());
	rep(i,0,m){
		lld delta=absol(diffs[i]);
		int cnt=0;
		gains[i].push_back(0);
		gains[i].push_back(delta);
		gains[i].push_back(dists[i][0]);
		rep(j,1,(int)dists[i].size()){
			lld a=dists[i][j];
			if(a<delta){
				gains[i].push_back(a);
				cnt++;
			}else{
				while(cnt>0){
					gains[i].push_back(delta);
					cnt--;
				}
				gains[i].push_back(a);
				cnt++;
			}
		}
		while(cnt>0){
			gains[i].push_back(delta);
			cnt--;
		}
		
		rep(j,0,(int)gains[i].size()-1)gains[i][j+1]+=gains[i][j];
		gains[i][0]=1e18;
		gains[i][1]=1e18;

		gainsX[i].push_back(0);
		trav(a,dists[i]){
			gainsX[i].push_back(a);
		}
		gainsY[i].push_back(0);
		trav(a,dists[i])gainsY[i].push_back(a+delta);
		rep(j,0,(int)gainsX[i].size()-1)gainsX[i][j+1]+=gainsX[i][j];
		rep(j,0,(int)gainsY[i].size()-1)gainsY[i][j+1]+=gainsY[i][j];
		gainsX[i][0]=1e18;
		gainsY[i][0]=1e18;
		if(diffs[i]>0)swap(gainsX[i],gainsY[i]);
		
	}
	rep(i,0,m+1){
		rep(j,0,3)DP[i][j].clear();
	}
	DP[0][0].resize(2*n+1,1e18);
	DP[0][1].resize(2*n+1,1e18);
	DP[0][2].resize(2*n+1,1e18);
	DP[0][0][0]=0;
	DP[0][1][0]=0;
	DP[0][2][0]=0;
	rep(i,0,m){
		rep(j,0,3){
			DP[i+1][j].resize(2*n+1,1e18);
		}
		rep(l,0,3){
			rep(j,l,3){
				rep(k,0,2*n+1){
					if(j==0){
						rep(o,0,(int)gainsX[i].size()){
							if(o+k<=2*n)DP[i+1][j][o+k]=min(DP[i+1][j][o+k],DP[i][l][k]+gainsX[i][o]);
						}
					}
					if(j==1){
						rep(o,0,(int)gains[i].size()){
							if(o+k<=2*n)DP[i+1][j][o+k]=min(DP[i+1][j][o+k],DP[i][l][k]+gains[i][o]);
						}
					}
					if(j==2){
						rep(o,0,(int)gainsY[i].size()){
							if(o+k<=2*n)DP[i+1][j][o+k]=min(DP[i+1][j][o+k],DP[i][l][k]+gainsY[i][o]);
						}
					}
				}
			}
		}
	}
	rep(i,0,2*n+1){
		//cout<<DP[m][2][i]<<" ";
		rep(j,0,3){
			if(DP[m][j][i]<=K)ans=max(ans,i);
		}
	}
    return ans;
}
# 결과 실행 시간 메모리 Grader output
1 Correct 73 ms 188040 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Execution timed out 1104 ms 674504 KB Time limit exceeded
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 73 ms 188104 KB Output is correct
2 Correct 73 ms 188128 KB Output is correct
3 Correct 72 ms 188108 KB Output is correct
4 Correct 72 ms 188156 KB Output is correct
5 Correct 73 ms 188092 KB Output is correct
6 Correct 72 ms 188184 KB Output is correct
7 Correct 73 ms 188088 KB Output is correct
8 Correct 74 ms 188236 KB Output is correct
9 Correct 73 ms 188212 KB Output is correct
10 Correct 75 ms 188232 KB Output is correct
11 Correct 72 ms 188176 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 73 ms 188104 KB Output is correct
2 Correct 73 ms 188128 KB Output is correct
3 Correct 72 ms 188108 KB Output is correct
4 Correct 72 ms 188156 KB Output is correct
5 Correct 73 ms 188092 KB Output is correct
6 Correct 72 ms 188184 KB Output is correct
7 Correct 73 ms 188088 KB Output is correct
8 Correct 74 ms 188236 KB Output is correct
9 Correct 73 ms 188212 KB Output is correct
10 Correct 75 ms 188232 KB Output is correct
11 Correct 72 ms 188176 KB Output is correct
12 Correct 73 ms 188160 KB Output is correct
13 Correct 72 ms 188112 KB Output is correct
14 Correct 73 ms 188436 KB Output is correct
15 Correct 73 ms 188200 KB Output is correct
16 Correct 77 ms 188632 KB Output is correct
17 Correct 73 ms 188580 KB Output is correct
18 Correct 73 ms 188128 KB Output is correct
19 Correct 78 ms 188236 KB Output is correct
20 Correct 77 ms 188192 KB Output is correct
21 Correct 85 ms 195284 KB Output is correct
22 Correct 82 ms 193348 KB Output is correct
23 Correct 90 ms 199972 KB Output is correct
24 Correct 94 ms 200092 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 73 ms 188104 KB Output is correct
2 Correct 73 ms 188128 KB Output is correct
3 Correct 72 ms 188108 KB Output is correct
4 Correct 72 ms 188156 KB Output is correct
5 Correct 73 ms 188092 KB Output is correct
6 Correct 72 ms 188184 KB Output is correct
7 Correct 73 ms 188088 KB Output is correct
8 Correct 74 ms 188236 KB Output is correct
9 Correct 73 ms 188212 KB Output is correct
10 Correct 75 ms 188232 KB Output is correct
11 Correct 72 ms 188176 KB Output is correct
12 Correct 73 ms 188160 KB Output is correct
13 Correct 72 ms 188112 KB Output is correct
14 Correct 73 ms 188436 KB Output is correct
15 Correct 73 ms 188200 KB Output is correct
16 Correct 77 ms 188632 KB Output is correct
17 Correct 73 ms 188580 KB Output is correct
18 Correct 73 ms 188128 KB Output is correct
19 Correct 78 ms 188236 KB Output is correct
20 Correct 77 ms 188192 KB Output is correct
21 Correct 85 ms 195284 KB Output is correct
22 Correct 82 ms 193348 KB Output is correct
23 Correct 90 ms 199972 KB Output is correct
24 Correct 94 ms 200092 KB Output is correct
25 Correct 83 ms 188272 KB Output is correct
26 Correct 228 ms 189216 KB Output is correct
27 Correct 212 ms 189044 KB Output is correct
28 Correct 581 ms 559176 KB Output is correct
29 Correct 460 ms 445100 KB Output is correct
30 Correct 260 ms 252560 KB Output is correct
31 Correct 635 ms 611964 KB Output is correct
32 Correct 634 ms 611876 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 73 ms 188040 KB Output is correct
2 Correct 73 ms 188104 KB Output is correct
3 Correct 73 ms 188128 KB Output is correct
4 Correct 72 ms 188108 KB Output is correct
5 Correct 72 ms 188156 KB Output is correct
6 Correct 73 ms 188092 KB Output is correct
7 Correct 72 ms 188052 KB Output is correct
8 Correct 73 ms 188108 KB Output is correct
9 Correct 75 ms 188068 KB Output is correct
10 Correct 72 ms 188100 KB Output is correct
11 Correct 73 ms 188116 KB Output is correct
12 Correct 73 ms 188108 KB Output is correct
13 Correct 72 ms 188088 KB Output is correct
14 Correct 75 ms 188108 KB Output is correct
15 Correct 74 ms 188124 KB Output is correct
16 Correct 72 ms 188144 KB Output is correct
17 Correct 72 ms 188164 KB Output is correct
18 Correct 74 ms 188140 KB Output is correct
19 Correct 74 ms 188108 KB Output is correct
20 Correct 72 ms 188172 KB Output is correct
21 Correct 75 ms 188156 KB Output is correct
22 Correct 69 ms 188100 KB Output is correct
23 Correct 73 ms 188108 KB Output is correct
24 Correct 72 ms 188156 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 73 ms 188040 KB Output is correct
2 Correct 73 ms 188104 KB Output is correct
3 Correct 73 ms 188128 KB Output is correct
4 Correct 72 ms 188108 KB Output is correct
5 Correct 72 ms 188156 KB Output is correct
6 Correct 73 ms 188092 KB Output is correct
7 Correct 72 ms 188184 KB Output is correct
8 Correct 73 ms 188088 KB Output is correct
9 Correct 74 ms 188236 KB Output is correct
10 Correct 73 ms 188212 KB Output is correct
11 Correct 75 ms 188232 KB Output is correct
12 Correct 72 ms 188176 KB Output is correct
13 Correct 73 ms 188160 KB Output is correct
14 Correct 72 ms 188112 KB Output is correct
15 Correct 73 ms 188436 KB Output is correct
16 Correct 73 ms 188200 KB Output is correct
17 Correct 77 ms 188632 KB Output is correct
18 Correct 73 ms 188580 KB Output is correct
19 Correct 72 ms 188052 KB Output is correct
20 Correct 73 ms 188108 KB Output is correct
21 Correct 75 ms 188068 KB Output is correct
22 Correct 72 ms 188100 KB Output is correct
23 Correct 73 ms 188116 KB Output is correct
24 Correct 73 ms 188108 KB Output is correct
25 Correct 72 ms 188088 KB Output is correct
26 Correct 75 ms 188108 KB Output is correct
27 Correct 74 ms 188124 KB Output is correct
28 Correct 72 ms 188144 KB Output is correct
29 Correct 72 ms 188164 KB Output is correct
30 Correct 74 ms 188140 KB Output is correct
31 Correct 74 ms 188108 KB Output is correct
32 Correct 72 ms 188172 KB Output is correct
33 Correct 75 ms 188156 KB Output is correct
34 Correct 69 ms 188100 KB Output is correct
35 Correct 73 ms 188108 KB Output is correct
36 Correct 72 ms 188156 KB Output is correct
37 Correct 72 ms 188108 KB Output is correct
38 Correct 73 ms 188164 KB Output is correct
39 Correct 72 ms 188112 KB Output is correct
40 Correct 75 ms 188212 KB Output is correct
41 Correct 76 ms 188108 KB Output is correct
42 Correct 74 ms 188180 KB Output is correct
43 Correct 74 ms 188560 KB Output is correct
44 Correct 76 ms 188200 KB Output is correct
45 Correct 76 ms 188380 KB Output is correct
46 Correct 74 ms 188164 KB Output is correct
47 Correct 73 ms 188240 KB Output is correct
48 Correct 74 ms 188112 KB Output is correct
49 Correct 74 ms 188072 KB Output is correct
50 Correct 72 ms 188100 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 73 ms 188040 KB Output is correct
2 Correct 73 ms 188104 KB Output is correct
3 Correct 73 ms 188128 KB Output is correct
4 Correct 72 ms 188108 KB Output is correct
5 Correct 72 ms 188156 KB Output is correct
6 Correct 73 ms 188092 KB Output is correct
7 Correct 72 ms 188184 KB Output is correct
8 Correct 73 ms 188088 KB Output is correct
9 Correct 74 ms 188236 KB Output is correct
10 Correct 73 ms 188212 KB Output is correct
11 Correct 75 ms 188232 KB Output is correct
12 Correct 72 ms 188176 KB Output is correct
13 Correct 73 ms 188160 KB Output is correct
14 Correct 72 ms 188112 KB Output is correct
15 Correct 73 ms 188436 KB Output is correct
16 Correct 73 ms 188200 KB Output is correct
17 Correct 77 ms 188632 KB Output is correct
18 Correct 73 ms 188580 KB Output is correct
19 Correct 73 ms 188128 KB Output is correct
20 Correct 78 ms 188236 KB Output is correct
21 Correct 77 ms 188192 KB Output is correct
22 Correct 85 ms 195284 KB Output is correct
23 Correct 82 ms 193348 KB Output is correct
24 Correct 90 ms 199972 KB Output is correct
25 Correct 94 ms 200092 KB Output is correct
26 Correct 72 ms 188052 KB Output is correct
27 Correct 73 ms 188108 KB Output is correct
28 Correct 75 ms 188068 KB Output is correct
29 Correct 72 ms 188100 KB Output is correct
30 Correct 73 ms 188116 KB Output is correct
31 Correct 73 ms 188108 KB Output is correct
32 Correct 72 ms 188088 KB Output is correct
33 Correct 75 ms 188108 KB Output is correct
34 Correct 74 ms 188124 KB Output is correct
35 Correct 72 ms 188144 KB Output is correct
36 Correct 72 ms 188164 KB Output is correct
37 Correct 74 ms 188140 KB Output is correct
38 Correct 74 ms 188108 KB Output is correct
39 Correct 72 ms 188172 KB Output is correct
40 Correct 75 ms 188156 KB Output is correct
41 Correct 69 ms 188100 KB Output is correct
42 Correct 73 ms 188108 KB Output is correct
43 Correct 72 ms 188156 KB Output is correct
44 Correct 72 ms 188108 KB Output is correct
45 Correct 73 ms 188164 KB Output is correct
46 Correct 72 ms 188112 KB Output is correct
47 Correct 75 ms 188212 KB Output is correct
48 Correct 76 ms 188108 KB Output is correct
49 Correct 74 ms 188180 KB Output is correct
50 Correct 74 ms 188560 KB Output is correct
51 Correct 76 ms 188200 KB Output is correct
52 Correct 76 ms 188380 KB Output is correct
53 Correct 74 ms 188164 KB Output is correct
54 Correct 73 ms 188240 KB Output is correct
55 Correct 74 ms 188112 KB Output is correct
56 Correct 74 ms 188072 KB Output is correct
57 Correct 72 ms 188100 KB Output is correct
58 Correct 73 ms 188116 KB Output is correct
59 Correct 76 ms 188180 KB Output is correct
60 Correct 75 ms 188544 KB Output is correct
61 Correct 76 ms 188396 KB Output is correct
62 Correct 75 ms 188428 KB Output is correct
63 Correct 77 ms 188204 KB Output is correct
64 Correct 76 ms 188496 KB Output is correct
65 Correct 79 ms 189220 KB Output is correct
66 Correct 78 ms 188180 KB Output is correct
67 Correct 79 ms 188364 KB Output is correct
68 Correct 87 ms 197220 KB Output is correct
69 Correct 95 ms 197276 KB Output is correct
70 Correct 82 ms 190920 KB Output is correct
71 Correct 81 ms 192004 KB Output is correct
72 Correct 77 ms 188528 KB Output is correct
73 Correct 75 ms 188232 KB Output is correct
74 Correct 75 ms 188236 KB Output is correct
75 Correct 78 ms 188104 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 73 ms 188040 KB Output is correct
2 Correct 73 ms 188104 KB Output is correct
3 Correct 73 ms 188128 KB Output is correct
4 Correct 72 ms 188108 KB Output is correct
5 Correct 72 ms 188156 KB Output is correct
6 Correct 73 ms 188092 KB Output is correct
7 Correct 72 ms 188184 KB Output is correct
8 Correct 73 ms 188088 KB Output is correct
9 Correct 74 ms 188236 KB Output is correct
10 Correct 73 ms 188212 KB Output is correct
11 Correct 75 ms 188232 KB Output is correct
12 Correct 72 ms 188176 KB Output is correct
13 Correct 73 ms 188160 KB Output is correct
14 Correct 72 ms 188112 KB Output is correct
15 Correct 73 ms 188436 KB Output is correct
16 Correct 73 ms 188200 KB Output is correct
17 Correct 77 ms 188632 KB Output is correct
18 Correct 73 ms 188580 KB Output is correct
19 Correct 73 ms 188128 KB Output is correct
20 Correct 78 ms 188236 KB Output is correct
21 Correct 77 ms 188192 KB Output is correct
22 Correct 85 ms 195284 KB Output is correct
23 Correct 82 ms 193348 KB Output is correct
24 Correct 90 ms 199972 KB Output is correct
25 Correct 94 ms 200092 KB Output is correct
26 Correct 83 ms 188272 KB Output is correct
27 Correct 228 ms 189216 KB Output is correct
28 Correct 212 ms 189044 KB Output is correct
29 Correct 581 ms 559176 KB Output is correct
30 Correct 460 ms 445100 KB Output is correct
31 Correct 260 ms 252560 KB Output is correct
32 Correct 635 ms 611964 KB Output is correct
33 Correct 634 ms 611876 KB Output is correct
34 Correct 72 ms 188052 KB Output is correct
35 Correct 73 ms 188108 KB Output is correct
36 Correct 75 ms 188068 KB Output is correct
37 Correct 72 ms 188100 KB Output is correct
38 Correct 73 ms 188116 KB Output is correct
39 Correct 73 ms 188108 KB Output is correct
40 Correct 72 ms 188088 KB Output is correct
41 Correct 75 ms 188108 KB Output is correct
42 Correct 74 ms 188124 KB Output is correct
43 Correct 72 ms 188144 KB Output is correct
44 Correct 72 ms 188164 KB Output is correct
45 Correct 74 ms 188140 KB Output is correct
46 Correct 74 ms 188108 KB Output is correct
47 Correct 72 ms 188172 KB Output is correct
48 Correct 75 ms 188156 KB Output is correct
49 Correct 69 ms 188100 KB Output is correct
50 Correct 73 ms 188108 KB Output is correct
51 Correct 72 ms 188156 KB Output is correct
52 Correct 72 ms 188108 KB Output is correct
53 Correct 73 ms 188164 KB Output is correct
54 Correct 72 ms 188112 KB Output is correct
55 Correct 75 ms 188212 KB Output is correct
56 Correct 76 ms 188108 KB Output is correct
57 Correct 74 ms 188180 KB Output is correct
58 Correct 74 ms 188560 KB Output is correct
59 Correct 76 ms 188200 KB Output is correct
60 Correct 76 ms 188380 KB Output is correct
61 Correct 74 ms 188164 KB Output is correct
62 Correct 73 ms 188240 KB Output is correct
63 Correct 74 ms 188112 KB Output is correct
64 Correct 74 ms 188072 KB Output is correct
65 Correct 72 ms 188100 KB Output is correct
66 Correct 73 ms 188116 KB Output is correct
67 Correct 76 ms 188180 KB Output is correct
68 Correct 75 ms 188544 KB Output is correct
69 Correct 76 ms 188396 KB Output is correct
70 Correct 75 ms 188428 KB Output is correct
71 Correct 77 ms 188204 KB Output is correct
72 Correct 76 ms 188496 KB Output is correct
73 Correct 79 ms 189220 KB Output is correct
74 Correct 78 ms 188180 KB Output is correct
75 Correct 79 ms 188364 KB Output is correct
76 Correct 87 ms 197220 KB Output is correct
77 Correct 95 ms 197276 KB Output is correct
78 Correct 82 ms 190920 KB Output is correct
79 Correct 81 ms 192004 KB Output is correct
80 Correct 77 ms 188528 KB Output is correct
81 Correct 75 ms 188232 KB Output is correct
82 Correct 75 ms 188236 KB Output is correct
83 Correct 78 ms 188104 KB Output is correct
84 Correct 77 ms 188228 KB Output is correct
85 Correct 86 ms 188412 KB Output is correct
86 Correct 81 ms 188568 KB Output is correct
87 Correct 83 ms 188432 KB Output is correct
88 Correct 83 ms 188460 KB Output is correct
89 Correct 224 ms 189508 KB Output is correct
90 Correct 193 ms 190448 KB Output is correct
91 Correct 237 ms 212600 KB Output is correct
92 Correct 211 ms 189388 KB Output is correct
93 Correct 210 ms 200860 KB Output is correct
94 Correct 507 ms 480876 KB Output is correct
95 Correct 532 ms 514012 KB Output is correct
96 Correct 357 ms 349892 KB Output is correct
97 Correct 346 ms 322340 KB Output is correct
98 Correct 205 ms 191324 KB Output is correct
99 Correct 230 ms 189256 KB Output is correct
100 Correct 149 ms 188912 KB Output is correct
101 Correct 92 ms 188300 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 73 ms 188040 KB Output is correct
2 Correct 73 ms 188104 KB Output is correct
3 Correct 73 ms 188128 KB Output is correct
4 Correct 72 ms 188108 KB Output is correct
5 Correct 72 ms 188156 KB Output is correct
6 Correct 73 ms 188092 KB Output is correct
7 Correct 72 ms 188184 KB Output is correct
8 Correct 73 ms 188088 KB Output is correct
9 Correct 74 ms 188236 KB Output is correct
10 Correct 73 ms 188212 KB Output is correct
11 Correct 75 ms 188232 KB Output is correct
12 Correct 72 ms 188176 KB Output is correct
13 Correct 73 ms 188160 KB Output is correct
14 Correct 72 ms 188112 KB Output is correct
15 Correct 73 ms 188436 KB Output is correct
16 Correct 73 ms 188200 KB Output is correct
17 Correct 77 ms 188632 KB Output is correct
18 Correct 73 ms 188580 KB Output is correct
19 Correct 73 ms 188128 KB Output is correct
20 Correct 78 ms 188236 KB Output is correct
21 Correct 77 ms 188192 KB Output is correct
22 Correct 85 ms 195284 KB Output is correct
23 Correct 82 ms 193348 KB Output is correct
24 Correct 90 ms 199972 KB Output is correct
25 Correct 94 ms 200092 KB Output is correct
26 Correct 83 ms 188272 KB Output is correct
27 Correct 228 ms 189216 KB Output is correct
28 Correct 212 ms 189044 KB Output is correct
29 Correct 581 ms 559176 KB Output is correct
30 Correct 460 ms 445100 KB Output is correct
31 Correct 260 ms 252560 KB Output is correct
32 Correct 635 ms 611964 KB Output is correct
33 Correct 634 ms 611876 KB Output is correct
34 Correct 72 ms 188052 KB Output is correct
35 Correct 73 ms 188108 KB Output is correct
36 Correct 75 ms 188068 KB Output is correct
37 Correct 72 ms 188100 KB Output is correct
38 Correct 73 ms 188116 KB Output is correct
39 Correct 73 ms 188108 KB Output is correct
40 Correct 72 ms 188088 KB Output is correct
41 Correct 75 ms 188108 KB Output is correct
42 Correct 74 ms 188124 KB Output is correct
43 Correct 72 ms 188144 KB Output is correct
44 Correct 72 ms 188164 KB Output is correct
45 Correct 74 ms 188140 KB Output is correct
46 Correct 74 ms 188108 KB Output is correct
47 Correct 72 ms 188172 KB Output is correct
48 Correct 75 ms 188156 KB Output is correct
49 Correct 69 ms 188100 KB Output is correct
50 Correct 73 ms 188108 KB Output is correct
51 Correct 72 ms 188156 KB Output is correct
52 Correct 72 ms 188108 KB Output is correct
53 Correct 73 ms 188164 KB Output is correct
54 Correct 72 ms 188112 KB Output is correct
55 Correct 75 ms 188212 KB Output is correct
56 Correct 76 ms 188108 KB Output is correct
57 Correct 74 ms 188180 KB Output is correct
58 Correct 74 ms 188560 KB Output is correct
59 Correct 76 ms 188200 KB Output is correct
60 Correct 76 ms 188380 KB Output is correct
61 Correct 74 ms 188164 KB Output is correct
62 Correct 73 ms 188240 KB Output is correct
63 Correct 74 ms 188112 KB Output is correct
64 Correct 74 ms 188072 KB Output is correct
65 Correct 72 ms 188100 KB Output is correct
66 Correct 73 ms 188116 KB Output is correct
67 Correct 76 ms 188180 KB Output is correct
68 Correct 75 ms 188544 KB Output is correct
69 Correct 76 ms 188396 KB Output is correct
70 Correct 75 ms 188428 KB Output is correct
71 Correct 77 ms 188204 KB Output is correct
72 Correct 76 ms 188496 KB Output is correct
73 Correct 79 ms 189220 KB Output is correct
74 Correct 78 ms 188180 KB Output is correct
75 Correct 79 ms 188364 KB Output is correct
76 Correct 87 ms 197220 KB Output is correct
77 Correct 95 ms 197276 KB Output is correct
78 Correct 82 ms 190920 KB Output is correct
79 Correct 81 ms 192004 KB Output is correct
80 Correct 77 ms 188528 KB Output is correct
81 Correct 75 ms 188232 KB Output is correct
82 Correct 75 ms 188236 KB Output is correct
83 Correct 78 ms 188104 KB Output is correct
84 Correct 77 ms 188228 KB Output is correct
85 Correct 86 ms 188412 KB Output is correct
86 Correct 81 ms 188568 KB Output is correct
87 Correct 83 ms 188432 KB Output is correct
88 Correct 83 ms 188460 KB Output is correct
89 Correct 224 ms 189508 KB Output is correct
90 Correct 193 ms 190448 KB Output is correct
91 Correct 237 ms 212600 KB Output is correct
92 Correct 211 ms 189388 KB Output is correct
93 Correct 210 ms 200860 KB Output is correct
94 Correct 507 ms 480876 KB Output is correct
95 Correct 532 ms 514012 KB Output is correct
96 Correct 357 ms 349892 KB Output is correct
97 Correct 346 ms 322340 KB Output is correct
98 Correct 205 ms 191324 KB Output is correct
99 Correct 230 ms 189256 KB Output is correct
100 Correct 149 ms 188912 KB Output is correct
101 Correct 92 ms 188300 KB Output is correct
102 Correct 524 ms 191076 KB Output is correct
103 Execution timed out 1091 ms 191052 KB Time limit exceeded
104 Halted 0 ms 0 KB -