답안 #832047

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
832047 2023-08-20T21:34:02 Z Antekb 도로 폐쇄 (APIO21_roads) C++17
53 / 100
2000 ms 30448 KB
#include<bits/stdc++.h>
#include "roads.h"
#define st first
#define nd second
#define pb push_back
#define pp pop_back
#define eb emplace_back
#define mp make_pair
#define all(x) (x).begin(), (x).end()
using namespace std;

typedef long long ll;
typedef pair<int, int> pii;
typedef vector<int> vi;
typedef vector<pii > vii;

void debug(){cerr<<"\n";}
template <typename H, typename... T>
void debug(H h, T... t) {cerr<<h; if (sizeof...(t)) cerr << ", "; debug(t...);}
#define deb(x...) cerr<<#x<<" = ";debug(x);

const int N=1e5+5;
vii E[N], E2[N];
ll dp[N][2];
int par[N];
int vis[N];
vi co[N];
vector<ll> suf[N];

void dfs(int v, int k){
	for(pii e:E[v]){
		int u=e.st, c=e.nd;
		if(u!=par[v]){
			par[u]=v;
			dfs(u, k);
		}
	}
	dp[v][1]=dp[v][0]=0;
		vector<int> V;
		for(pii e:E[v]){
			int u=e.st, c=e.nd;
			if(u!=par[v]){
					dp[v][0]+=dp[u][1];
					V.pb(dp[u][0]+c-dp[u][1]);
			}
		}
		sort(all(V));
		for(int j=V.size()-1; j>=int(V.size())-k+1 && j>=0 && V[j]>0; j--){
			dp[v][0]+=V[j];
		}
		dp[v][1]=dp[v][0];
		if(V.size()>=k && V.end()[-k]>0)dp[v][1]+=V.end()[-k];
		//if(i>=2)assert(2*dp[v][1][i-1]>=dp[v][1][i]+dp[v][1][i-2]);
	//deb(v, dp[v][0], dp[v][1], dp[v][2]);
}
void dfs2(int v, int k){
	for(pii e:E2[v])dfs2(e.st, k);
	dp[v][1]=dp[v][0]=0;
	vector<int> V;
	for(pii e:E2[v]){
		int u=e.st, c=e.nd;
		dp[v][0]+=dp[u][1];
		V.pb(dp[u][0]+c-dp[u][1]);
	}
	sort(all(V));
	ll s=0;
	ll opt=0, opt2=0;
	dp[v][1]=dp[v][0];
	/*for(int i:V){
		deb(i);
	}
	deb(" ");
	for(int i:suf[v]){
		deb(i);
	}*/
	if(suf[v].size()){
	for(int j=0; j<=V.size(); j++){
		if(j+1<k){
			opt=max(opt, suf[v].end()[max(-k+1+j, -int(suf[v].size()))]+s);
			//deb(j, s, suf[v].end()[-k+1+j]);
		}
		if(j<k)opt2=max(opt2, suf[v].end()[max(-k+j, -int(suf[v].size()))]+s);
		if(j!=V.size())s+=V.end()[-1-j];
	}
	}
	else{
		for(int j=0; j<=k && j<=V.size(); j++){
		if(j+1<=k){
			opt=max(opt,s);
			//deb(j, s, suf[v].end()[-k+1+j]);
		}
		if(j<=k)opt2=max(opt2, s);
		if(j!=V.size())s+=V.end()[-1-j];
	}
	}
	opt2=max(opt, opt2);
	dp[v][0]+=opt;
	dp[v][1]+=opt2;
	//deb(v, dp[v][0], dp[v][1]);
}

std::vector<long long> minimum_closure_costs(int n, std::vector<int> uu, 
	std::vector<int> vv,std::vector<int> ww) {
	ll sum=0;
	for(int i=0; i<n-1; i++){
		E[uu[i]].eb(vv[i], ww[i]);
		E[vv[i]].eb(uu[i], ww[i]);
		sum+=ww[i];
	}
	vector<ll> ans(n);
	ans[0]=sum;
	par[0]=-1;
	int K=100;
	for(int i=1; i<K && i<n; i++){
		dfs(0, i);
		ans[i]=sum-dp[0][1];
	}
	vi todo;
	for(int t=K; t<n; t++){
		if(t==100 || t==200 || t==400 || t==800 || t==1600 || t==4000){
			todo.clear();
			sum=0;
			for(int i=0; i<n; i++){
				if(E[i].size()>=K){
					E2[i].clear();
					suf[i].clear();
					co[i].clear();
					if(i==0 || E[par[i]].size()<K)todo.pb(i);
					for(auto e:E[i]){
						if(E[e.st].size()>=K && e.st!=par[i]){
							//deb(i, par[i], e.st);
							E2[i].pb(e);
						}
						if(E[e.st].size()<K || e.st!=par[i]){
							sum+=e.nd;
							if(E[e.st].size()<K){
								co[i].pb(e.nd);
							}
						}
					}
					if(co[i].size())sort(all(co[i]));
					suf[i].resize(co[i].size());
					for(int j=int(co[i].size())-1; j>=0; j--){
						suf[i][j]=co[i][j];
						if(j!=co[i].size()-1){
							suf[i][j]+=suf[i][j+1];
						}
					}
				}
			}
		}
				ans[t]=sum;
				for(int v:todo){
					dfs2(v, t);
					ans[t]-=dp[v][1];
				}
	}
	return ans;
}

Compilation message

roads.cpp: In function 'void dfs(int, int)':
roads.cpp:32:15: warning: unused variable 'c' [-Wunused-variable]
   32 |   int u=e.st, c=e.nd;
      |               ^
roads.cpp:52:14: warning: comparison of integer expressions of different signedness: 'std::vector<int>::size_type' {aka 'long unsigned int'} and 'int' [-Wsign-compare]
   52 |   if(V.size()>=k && V.end()[-k]>0)dp[v][1]+=V.end()[-k];
      |      ~~~~~~~~^~~
roads.cpp: In function 'void dfs2(int, int)':
roads.cpp:77:16: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   77 |  for(int j=0; j<=V.size(); j++){
      |               ~^~~~~~~~~~
roads.cpp:83:7: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   83 |   if(j!=V.size())s+=V.end()[-1-j];
      |      ~^~~~~~~~~~
roads.cpp:87:25: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   87 |   for(int j=0; j<=k && j<=V.size(); j++){
      |                        ~^~~~~~~~~~
roads.cpp:93:7: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   93 |   if(j!=V.size())s+=V.end()[-1-j];
      |      ~^~~~~~~~~~
roads.cpp: In function 'std::vector<long long int> minimum_closure_costs(int, std::vector<int>, std::vector<int>, std::vector<int>)':
roads.cpp:124:19: warning: comparison of integer expressions of different signedness: 'std::vector<std::pair<int, int> >::size_type' {aka 'long unsigned int'} and 'int' [-Wsign-compare]
  124 |     if(E[i].size()>=K){
      |        ~~~~~~~~~~~^~~
roads.cpp:128:33: warning: comparison of integer expressions of different signedness: 'std::vector<std::pair<int, int> >::size_type' {aka 'long unsigned int'} and 'int' [-Wsign-compare]
  128 |      if(i==0 || E[par[i]].size()<K)todo.pb(i);
      |                 ~~~~~~~~~~~~~~~~^~
roads.cpp:130:24: warning: comparison of integer expressions of different signedness: 'std::vector<std::pair<int, int> >::size_type' {aka 'long unsigned int'} and 'int' [-Wsign-compare]
  130 |       if(E[e.st].size()>=K && e.st!=par[i]){
      |          ~~~~~~~~~~~~~~^~~
roads.cpp:134:24: warning: comparison of integer expressions of different signedness: 'std::vector<std::pair<int, int> >::size_type' {aka 'long unsigned int'} and 'int' [-Wsign-compare]
  134 |       if(E[e.st].size()<K || e.st!=par[i]){
      |          ~~~~~~~~~~~~~~^~
roads.cpp:136:25: warning: comparison of integer expressions of different signedness: 'std::vector<std::pair<int, int> >::size_type' {aka 'long unsigned int'} and 'int' [-Wsign-compare]
  136 |        if(E[e.st].size()<K){
      |           ~~~~~~~~~~~~~~^~
roads.cpp:145:11: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
  145 |       if(j!=co[i].size()-1){
      |          ~^~~~~~~~~~~~~~~~
# 결과 실행 시간 메모리 Grader output
1 Correct 5 ms 9684 KB Output is correct
2 Correct 13 ms 9900 KB Output is correct
3 Correct 15 ms 9908 KB Output is correct
4 Correct 8 ms 9940 KB Output is correct
5 Correct 5 ms 9684 KB Output is correct
6 Correct 5 ms 9684 KB Output is correct
7 Correct 4 ms 9684 KB Output is correct
8 Correct 9 ms 9812 KB Output is correct
9 Correct 9 ms 9812 KB Output is correct
10 Correct 4 ms 9736 KB Output is correct
11 Correct 5 ms 9684 KB Output is correct
12 Correct 249 ms 16032 KB Output is correct
13 Correct 469 ms 20320 KB Output is correct
14 Correct 742 ms 19504 KB Output is correct
15 Correct 883 ms 20612 KB Output is correct
16 Correct 879 ms 20636 KB Output is correct
17 Correct 319 ms 20604 KB Output is correct
18 Correct 4 ms 9684 KB Output is correct
19 Correct 289 ms 19392 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 4 ms 9684 KB Output is correct
2 Correct 431 ms 26932 KB Output is correct
3 Correct 471 ms 29112 KB Output is correct
4 Correct 509 ms 30444 KB Output is correct
5 Correct 514 ms 30440 KB Output is correct
6 Correct 10 ms 9940 KB Output is correct
7 Correct 11 ms 10068 KB Output is correct
8 Correct 11 ms 10068 KB Output is correct
9 Correct 5 ms 9684 KB Output is correct
10 Correct 5 ms 9684 KB Output is correct
11 Correct 5 ms 9684 KB Output is correct
12 Correct 249 ms 22144 KB Output is correct
13 Correct 509 ms 30344 KB Output is correct
14 Correct 5 ms 9684 KB Output is correct
15 Correct 419 ms 28380 KB Output is correct
16 Correct 560 ms 30448 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 4 ms 9684 KB Output is correct
2 Correct 4 ms 9648 KB Output is correct
3 Correct 4 ms 9684 KB Output is correct
4 Correct 5 ms 9684 KB Output is correct
5 Correct 7 ms 9684 KB Output is correct
6 Correct 5 ms 9684 KB Output is correct
7 Correct 5 ms 9684 KB Output is correct
8 Correct 5 ms 9684 KB Output is correct
9 Correct 5 ms 9624 KB Output is correct
10 Correct 5 ms 9684 KB Output is correct
11 Correct 6 ms 9684 KB Output is correct
12 Correct 5 ms 9684 KB Output is correct
13 Correct 4 ms 9684 KB Output is correct
14 Correct 4 ms 9684 KB Output is correct
15 Correct 5 ms 9684 KB Output is correct
16 Correct 5 ms 9684 KB Output is correct
17 Correct 5 ms 9684 KB Output is correct
18 Correct 6 ms 9740 KB Output is correct
19 Correct 5 ms 9684 KB Output is correct
20 Correct 5 ms 9736 KB Output is correct
21 Correct 4 ms 9684 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 4 ms 9684 KB Output is correct
2 Correct 4 ms 9648 KB Output is correct
3 Correct 4 ms 9684 KB Output is correct
4 Correct 5 ms 9684 KB Output is correct
5 Correct 7 ms 9684 KB Output is correct
6 Correct 5 ms 9684 KB Output is correct
7 Correct 5 ms 9684 KB Output is correct
8 Correct 5 ms 9684 KB Output is correct
9 Correct 5 ms 9624 KB Output is correct
10 Correct 5 ms 9684 KB Output is correct
11 Correct 6 ms 9684 KB Output is correct
12 Correct 5 ms 9684 KB Output is correct
13 Correct 4 ms 9684 KB Output is correct
14 Correct 4 ms 9684 KB Output is correct
15 Correct 5 ms 9684 KB Output is correct
16 Correct 5 ms 9684 KB Output is correct
17 Correct 5 ms 9684 KB Output is correct
18 Correct 6 ms 9740 KB Output is correct
19 Correct 5 ms 9684 KB Output is correct
20 Correct 5 ms 9736 KB Output is correct
21 Correct 4 ms 9684 KB Output is correct
22 Correct 4 ms 9684 KB Output is correct
23 Correct 10 ms 9812 KB Output is correct
24 Correct 14 ms 9812 KB Output is correct
25 Correct 13 ms 9812 KB Output is correct
26 Correct 11 ms 9892 KB Output is correct
27 Correct 12 ms 9932 KB Output is correct
28 Correct 9 ms 9908 KB Output is correct
29 Correct 14 ms 9872 KB Output is correct
30 Correct 13 ms 9916 KB Output is correct
31 Correct 13 ms 9824 KB Output is correct
32 Correct 11 ms 9852 KB Output is correct
33 Correct 11 ms 10048 KB Output is correct
34 Correct 11 ms 10120 KB Output is correct
35 Correct 11 ms 10064 KB Output is correct
36 Correct 13 ms 9892 KB Output is correct
37 Correct 14 ms 9904 KB Output is correct
38 Correct 8 ms 9912 KB Output is correct
39 Correct 4 ms 9684 KB Output is correct
40 Correct 4 ms 9684 KB Output is correct
41 Correct 5 ms 9684 KB Output is correct
42 Correct 5 ms 9684 KB Output is correct
43 Correct 5 ms 9684 KB Output is correct
44 Correct 5 ms 9684 KB Output is correct
45 Correct 5 ms 9684 KB Output is correct
46 Correct 5 ms 9684 KB Output is correct
47 Correct 6 ms 9684 KB Output is correct
48 Correct 5 ms 9684 KB Output is correct
49 Correct 5 ms 9684 KB Output is correct
50 Correct 5 ms 9684 KB Output is correct
51 Correct 5 ms 9684 KB Output is correct
52 Correct 5 ms 9684 KB Output is correct
53 Correct 12 ms 9812 KB Output is correct
54 Correct 14 ms 9892 KB Output is correct
55 Correct 10 ms 9908 KB Output is correct
56 Correct 9 ms 9812 KB Output is correct
57 Correct 9 ms 9812 KB Output is correct
58 Correct 5 ms 9684 KB Output is correct
59 Correct 5 ms 9684 KB Output is correct
60 Correct 5 ms 9684 KB Output is correct
61 Correct 4 ms 9684 KB Output is correct
62 Correct 6 ms 9684 KB Output is correct
63 Correct 4 ms 9684 KB Output is correct
64 Correct 14 ms 9892 KB Output is correct
65 Correct 14 ms 9896 KB Output is correct
66 Correct 9 ms 9900 KB Output is correct
67 Correct 8 ms 9812 KB Output is correct
68 Correct 8 ms 9812 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 804 ms 18140 KB Output is correct
2 Correct 753 ms 18100 KB Output is correct
3 Correct 1883 ms 20628 KB Output is correct
4 Correct 827 ms 18516 KB Output is correct
5 Correct 1047 ms 20644 KB Output is correct
6 Correct 450 ms 19936 KB Output is correct
7 Correct 904 ms 19460 KB Output is correct
8 Correct 292 ms 19608 KB Output is correct
9 Correct 859 ms 23248 KB Output is correct
10 Correct 715 ms 18336 KB Output is correct
11 Correct 1981 ms 20332 KB Output is correct
12 Correct 337 ms 19960 KB Output is correct
13 Correct 5 ms 9684 KB Output is correct
14 Correct 415 ms 28288 KB Output is correct
15 Correct 528 ms 30412 KB Output is correct
16 Correct 13 ms 9812 KB Output is correct
17 Correct 14 ms 9812 KB Output is correct
18 Correct 8 ms 9812 KB Output is correct
19 Correct 8 ms 9896 KB Output is correct
20 Correct 8 ms 9812 KB Output is correct
21 Correct 303 ms 19420 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 804 ms 18140 KB Output is correct
2 Correct 753 ms 18100 KB Output is correct
3 Correct 1883 ms 20628 KB Output is correct
4 Correct 827 ms 18516 KB Output is correct
5 Correct 1047 ms 20644 KB Output is correct
6 Correct 450 ms 19936 KB Output is correct
7 Correct 904 ms 19460 KB Output is correct
8 Correct 292 ms 19608 KB Output is correct
9 Correct 859 ms 23248 KB Output is correct
10 Correct 715 ms 18336 KB Output is correct
11 Correct 1981 ms 20332 KB Output is correct
12 Correct 337 ms 19960 KB Output is correct
13 Correct 5 ms 9684 KB Output is correct
14 Correct 415 ms 28288 KB Output is correct
15 Correct 528 ms 30412 KB Output is correct
16 Correct 13 ms 9812 KB Output is correct
17 Correct 14 ms 9812 KB Output is correct
18 Correct 8 ms 9812 KB Output is correct
19 Correct 8 ms 9896 KB Output is correct
20 Correct 8 ms 9812 KB Output is correct
21 Correct 303 ms 19420 KB Output is correct
22 Correct 4 ms 9684 KB Output is correct
23 Correct 4 ms 9684 KB Output is correct
24 Correct 4 ms 9684 KB Output is correct
25 Correct 643 ms 17280 KB Output is correct
26 Correct 568 ms 16556 KB Output is correct
27 Correct 1014 ms 18572 KB Output is correct
28 Execution timed out 2053 ms 20556 KB Time limit exceeded
29 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 5 ms 9684 KB Output is correct
2 Correct 13 ms 9900 KB Output is correct
3 Correct 15 ms 9908 KB Output is correct
4 Correct 8 ms 9940 KB Output is correct
5 Correct 5 ms 9684 KB Output is correct
6 Correct 5 ms 9684 KB Output is correct
7 Correct 4 ms 9684 KB Output is correct
8 Correct 9 ms 9812 KB Output is correct
9 Correct 9 ms 9812 KB Output is correct
10 Correct 4 ms 9736 KB Output is correct
11 Correct 5 ms 9684 KB Output is correct
12 Correct 249 ms 16032 KB Output is correct
13 Correct 469 ms 20320 KB Output is correct
14 Correct 742 ms 19504 KB Output is correct
15 Correct 883 ms 20612 KB Output is correct
16 Correct 879 ms 20636 KB Output is correct
17 Correct 319 ms 20604 KB Output is correct
18 Correct 4 ms 9684 KB Output is correct
19 Correct 289 ms 19392 KB Output is correct
20 Correct 4 ms 9684 KB Output is correct
21 Correct 431 ms 26932 KB Output is correct
22 Correct 471 ms 29112 KB Output is correct
23 Correct 509 ms 30444 KB Output is correct
24 Correct 514 ms 30440 KB Output is correct
25 Correct 10 ms 9940 KB Output is correct
26 Correct 11 ms 10068 KB Output is correct
27 Correct 11 ms 10068 KB Output is correct
28 Correct 5 ms 9684 KB Output is correct
29 Correct 5 ms 9684 KB Output is correct
30 Correct 5 ms 9684 KB Output is correct
31 Correct 249 ms 22144 KB Output is correct
32 Correct 509 ms 30344 KB Output is correct
33 Correct 5 ms 9684 KB Output is correct
34 Correct 419 ms 28380 KB Output is correct
35 Correct 560 ms 30448 KB Output is correct
36 Correct 4 ms 9684 KB Output is correct
37 Correct 4 ms 9648 KB Output is correct
38 Correct 4 ms 9684 KB Output is correct
39 Correct 5 ms 9684 KB Output is correct
40 Correct 7 ms 9684 KB Output is correct
41 Correct 5 ms 9684 KB Output is correct
42 Correct 5 ms 9684 KB Output is correct
43 Correct 5 ms 9684 KB Output is correct
44 Correct 5 ms 9624 KB Output is correct
45 Correct 5 ms 9684 KB Output is correct
46 Correct 6 ms 9684 KB Output is correct
47 Correct 5 ms 9684 KB Output is correct
48 Correct 4 ms 9684 KB Output is correct
49 Correct 4 ms 9684 KB Output is correct
50 Correct 5 ms 9684 KB Output is correct
51 Correct 5 ms 9684 KB Output is correct
52 Correct 5 ms 9684 KB Output is correct
53 Correct 6 ms 9740 KB Output is correct
54 Correct 5 ms 9684 KB Output is correct
55 Correct 5 ms 9736 KB Output is correct
56 Correct 4 ms 9684 KB Output is correct
57 Correct 4 ms 9684 KB Output is correct
58 Correct 10 ms 9812 KB Output is correct
59 Correct 14 ms 9812 KB Output is correct
60 Correct 13 ms 9812 KB Output is correct
61 Correct 11 ms 9892 KB Output is correct
62 Correct 12 ms 9932 KB Output is correct
63 Correct 9 ms 9908 KB Output is correct
64 Correct 14 ms 9872 KB Output is correct
65 Correct 13 ms 9916 KB Output is correct
66 Correct 13 ms 9824 KB Output is correct
67 Correct 11 ms 9852 KB Output is correct
68 Correct 11 ms 10048 KB Output is correct
69 Correct 11 ms 10120 KB Output is correct
70 Correct 11 ms 10064 KB Output is correct
71 Correct 13 ms 9892 KB Output is correct
72 Correct 14 ms 9904 KB Output is correct
73 Correct 8 ms 9912 KB Output is correct
74 Correct 4 ms 9684 KB Output is correct
75 Correct 4 ms 9684 KB Output is correct
76 Correct 5 ms 9684 KB Output is correct
77 Correct 5 ms 9684 KB Output is correct
78 Correct 5 ms 9684 KB Output is correct
79 Correct 5 ms 9684 KB Output is correct
80 Correct 5 ms 9684 KB Output is correct
81 Correct 5 ms 9684 KB Output is correct
82 Correct 6 ms 9684 KB Output is correct
83 Correct 5 ms 9684 KB Output is correct
84 Correct 5 ms 9684 KB Output is correct
85 Correct 5 ms 9684 KB Output is correct
86 Correct 5 ms 9684 KB Output is correct
87 Correct 5 ms 9684 KB Output is correct
88 Correct 12 ms 9812 KB Output is correct
89 Correct 14 ms 9892 KB Output is correct
90 Correct 10 ms 9908 KB Output is correct
91 Correct 9 ms 9812 KB Output is correct
92 Correct 9 ms 9812 KB Output is correct
93 Correct 5 ms 9684 KB Output is correct
94 Correct 5 ms 9684 KB Output is correct
95 Correct 5 ms 9684 KB Output is correct
96 Correct 4 ms 9684 KB Output is correct
97 Correct 6 ms 9684 KB Output is correct
98 Correct 4 ms 9684 KB Output is correct
99 Correct 14 ms 9892 KB Output is correct
100 Correct 14 ms 9896 KB Output is correct
101 Correct 9 ms 9900 KB Output is correct
102 Correct 8 ms 9812 KB Output is correct
103 Correct 8 ms 9812 KB Output is correct
104 Correct 804 ms 18140 KB Output is correct
105 Correct 753 ms 18100 KB Output is correct
106 Correct 1883 ms 20628 KB Output is correct
107 Correct 827 ms 18516 KB Output is correct
108 Correct 1047 ms 20644 KB Output is correct
109 Correct 450 ms 19936 KB Output is correct
110 Correct 904 ms 19460 KB Output is correct
111 Correct 292 ms 19608 KB Output is correct
112 Correct 859 ms 23248 KB Output is correct
113 Correct 715 ms 18336 KB Output is correct
114 Correct 1981 ms 20332 KB Output is correct
115 Correct 337 ms 19960 KB Output is correct
116 Correct 5 ms 9684 KB Output is correct
117 Correct 415 ms 28288 KB Output is correct
118 Correct 528 ms 30412 KB Output is correct
119 Correct 13 ms 9812 KB Output is correct
120 Correct 14 ms 9812 KB Output is correct
121 Correct 8 ms 9812 KB Output is correct
122 Correct 8 ms 9896 KB Output is correct
123 Correct 8 ms 9812 KB Output is correct
124 Correct 303 ms 19420 KB Output is correct
125 Correct 4 ms 9684 KB Output is correct
126 Correct 4 ms 9684 KB Output is correct
127 Correct 4 ms 9684 KB Output is correct
128 Correct 643 ms 17280 KB Output is correct
129 Correct 568 ms 16556 KB Output is correct
130 Correct 1014 ms 18572 KB Output is correct
131 Execution timed out 2053 ms 20556 KB Time limit exceeded
132 Halted 0 ms 0 KB -