답안 #1041513

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
1041513 2024-08-02T05:01:59 Z 이종영(#11053) Brought Down the Grading Server? (CEOI23_balance) C++17
100 / 100
1057 ms 41916 KB
#include <bits/stdc++.h>
using namespace std;
using ll=long long;
using ti4=array<int,4>;
#ifdef LOCAL
#include "debug.h"
#else
#define debug(...) 42
#endif
const int N=1e5+5;
int n,s,t;
vector<int> a[N],b[N];
void solve(int l,int r){
	debug(l,r);
	if(l==r) return;
	int m=(l+r)>>1;
	map<int,int> mp;
	vector<int> k1(n+1,l),k2(n+1,m+1);
	vector<vector<int>> S(n+1);
	vector<bool> vis;
	vector<ti4> e;
	for(int i=1;i<=n;i++){
		for(int j=l;j<=r;j++){
			debug(i,j,a[i][j],mp.count(a[i][j]));
			if(mp.count(a[i][j])){
				if(mp[a[i][j]]==i){
					b[i][k1[i]++]=a[i][j];
					b[i][k2[i]++]=a[i][j];
				} else{
					S[mp[a[i][j]]].emplace_back(e.size());
					S[i].emplace_back(e.size());
					e.push_back({mp[a[i][j]],i,a[i][j],a[i][j]});
					vis.emplace_back(false);
				}
				mp.erase(a[i][j]);
			} else{
				mp[a[i][j]]=i;
			}
		}
	}
	assert(mp.size()%2==0);
	int j=0,w=0;
	for(auto [v,i]: mp){
		if(w){
			S[i].emplace_back(e.size());
			S[j].emplace_back(e.size());
			e.push_back({i,j,v,w});
			vis.emplace_back(false);
			w=0;
		} else{
			j=i;
			w=v;
		}
	}
	debug(e);
	for(int t=1;t<=n;t++){
		while(S[t].size()){
			while(S[t].size()&&vis[S[t].back()]) S[t].pop_back();
			if(!S[t].size()) break;
			int i=t;
			do{
				debug(i,t,S[i].size());
				int c=S[i].back(); S[i].pop_back();
				while(vis[c]){
					debug(i,t,S[i].size());
					c=S[i].back(); S[i].pop_back();
				}
				int j=e[c][0]^e[c][1]^i;
				int v1=e[c][2],v2=e[c][3];
				if(i==e[c][1]) swap(v1,v2);
				debug(c,i,j);
				b[i][k1[i]++]=v1;
				b[j][k2[j]++]=v2;
				vis[c]=true;
				i=j;
			}while(i!=t);
		}
	}
	for(int i=1;i<=n;i++) for(int j=l;j<=r;j++) a[i][j]=b[i][j];
	solve(l,m);
	solve(m+1,r);
}
int main(){
	ios::sync_with_stdio(false); cin.tie(0);
	cin>>n>>s>>t;
	for(int i=1;i<=n;i++){
		a[i].resize(s);
		b[i].resize(s);
		for(int &v: a[i]) cin>>v;
	}
	solve(0,s-1);
	for(int i=1;i<=n;i++){
		for(int j=0;j<s;j++) cout<<a[i][j]<<" \n"[j==s-1];
	}
	return 0;
}

Compilation message

balance.cpp: In function 'void solve(int, int)':
balance.cpp:8:20: warning: statement has no effect [-Wunused-value]
    8 | #define debug(...) 42
      |                    ^~
balance.cpp:14:2: note: in expansion of macro 'debug'
   14 |  debug(l,r);
      |  ^~~~~
balance.cpp:8:20: warning: statement has no effect [-Wunused-value]
    8 | #define debug(...) 42
      |                    ^~
balance.cpp:24:4: note: in expansion of macro 'debug'
   24 |    debug(i,j,a[i][j],mp.count(a[i][j]));
      |    ^~~~~
balance.cpp:8:20: warning: statement has no effect [-Wunused-value]
    8 | #define debug(...) 42
      |                    ^~
balance.cpp:55:2: note: in expansion of macro 'debug'
   55 |  debug(e);
      |  ^~~~~
balance.cpp:8:20: warning: statement has no effect [-Wunused-value]
    8 | #define debug(...) 42
      |                    ^~
balance.cpp:62:5: note: in expansion of macro 'debug'
   62 |     debug(i,t,S[i].size());
      |     ^~~~~
balance.cpp:8:20: warning: statement has no effect [-Wunused-value]
    8 | #define debug(...) 42
      |                    ^~
balance.cpp:65:6: note: in expansion of macro 'debug'
   65 |      debug(i,t,S[i].size());
      |      ^~~~~
balance.cpp:8:20: warning: statement has no effect [-Wunused-value]
    8 | #define debug(...) 42
      |                    ^~
balance.cpp:71:5: note: in expansion of macro 'debug'
   71 |     debug(c,i,j);
      |     ^~~~~
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 4952 KB Correct
2 Correct 1 ms 4956 KB Correct
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 4956 KB Correct
2 Correct 1 ms 4952 KB Correct
3 Correct 1 ms 4956 KB Correct
4 Correct 1 ms 4956 KB Correct
5 Correct 1 ms 4956 KB Correct
6 Correct 1 ms 4956 KB Correct
7 Correct 1 ms 4956 KB Correct
# 결과 실행 시간 메모리 Grader output
1 Correct 113 ms 20004 KB Correct
2 Correct 85 ms 20172 KB Correct
3 Correct 82 ms 18120 KB Correct
4 Correct 37 ms 18884 KB Correct
5 Correct 75 ms 19656 KB Correct
6 Correct 112 ms 20676 KB Correct
7 Correct 111 ms 20556 KB Correct
8 Correct 105 ms 21448 KB Correct
9 Correct 105 ms 21472 KB Correct
10 Correct 35 ms 19052 KB Correct
11 Correct 38 ms 19144 KB Correct
# 결과 실행 시간 메모리 Grader output
1 Correct 113 ms 20004 KB Correct
2 Correct 85 ms 20172 KB Correct
3 Correct 82 ms 18120 KB Correct
4 Correct 37 ms 18884 KB Correct
5 Correct 75 ms 19656 KB Correct
6 Correct 112 ms 20676 KB Correct
7 Correct 111 ms 20556 KB Correct
8 Correct 105 ms 21448 KB Correct
9 Correct 105 ms 21472 KB Correct
10 Correct 35 ms 19052 KB Correct
11 Correct 38 ms 19144 KB Correct
12 Correct 112 ms 20164 KB Correct
13 Correct 77 ms 20164 KB Correct
14 Correct 83 ms 18120 KB Correct
15 Correct 37 ms 18888 KB Correct
16 Correct 83 ms 19656 KB Correct
17 Correct 109 ms 20676 KB Correct
18 Correct 107 ms 20556 KB Correct
19 Correct 103 ms 21260 KB Correct
20 Correct 101 ms 21448 KB Correct
21 Correct 35 ms 19148 KB Correct
22 Correct 34 ms 19140 KB Correct
23 Correct 118 ms 21448 KB Correct
24 Correct 50 ms 18892 KB Correct
25 Correct 108 ms 19904 KB Correct
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 4956 KB Correct
2 Correct 1 ms 4952 KB Correct
3 Correct 1 ms 4956 KB Correct
4 Correct 1 ms 4956 KB Correct
5 Correct 1 ms 4956 KB Correct
6 Correct 1 ms 4956 KB Correct
7 Correct 1 ms 4956 KB Correct
8 Correct 113 ms 20004 KB Correct
9 Correct 85 ms 20172 KB Correct
10 Correct 82 ms 18120 KB Correct
11 Correct 37 ms 18884 KB Correct
12 Correct 75 ms 19656 KB Correct
13 Correct 112 ms 20676 KB Correct
14 Correct 111 ms 20556 KB Correct
15 Correct 105 ms 21448 KB Correct
16 Correct 105 ms 21472 KB Correct
17 Correct 35 ms 19052 KB Correct
18 Correct 38 ms 19144 KB Correct
19 Correct 112 ms 20164 KB Correct
20 Correct 77 ms 20164 KB Correct
21 Correct 83 ms 18120 KB Correct
22 Correct 37 ms 18888 KB Correct
23 Correct 83 ms 19656 KB Correct
24 Correct 109 ms 20676 KB Correct
25 Correct 107 ms 20556 KB Correct
26 Correct 103 ms 21260 KB Correct
27 Correct 101 ms 21448 KB Correct
28 Correct 35 ms 19148 KB Correct
29 Correct 34 ms 19140 KB Correct
30 Correct 118 ms 21448 KB Correct
31 Correct 50 ms 18892 KB Correct
32 Correct 108 ms 19904 KB Correct
33 Correct 1 ms 4956 KB Correct
34 Correct 1 ms 4956 KB Correct
35 Correct 1 ms 4956 KB Correct
36 Correct 1 ms 4952 KB Correct
37 Correct 1 ms 4956 KB Correct
38 Correct 1 ms 4956 KB Correct
39 Correct 1 ms 4956 KB Correct
40 Correct 112 ms 20092 KB Correct
41 Correct 91 ms 20164 KB Correct
42 Correct 88 ms 18116 KB Correct
43 Correct 37 ms 18888 KB Correct
44 Correct 75 ms 19652 KB Correct
45 Correct 112 ms 20672 KB Correct
46 Correct 115 ms 20552 KB Correct
47 Correct 98 ms 21460 KB Correct
48 Correct 104 ms 21448 KB Correct
49 Correct 34 ms 19148 KB Correct
50 Correct 43 ms 19140 KB Correct
51 Correct 111 ms 21444 KB Correct
52 Correct 58 ms 18852 KB Correct
53 Correct 109 ms 19916 KB Correct
54 Correct 55 ms 14196 KB Correct
55 Correct 2 ms 5212 KB Correct
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 4956 KB Correct
2 Correct 9 ms 5468 KB Correct
3 Correct 5 ms 5212 KB Correct
4 Correct 4 ms 5724 KB Correct
5 Correct 3 ms 5720 KB Correct
6 Correct 4 ms 5896 KB Correct
7 Correct 4 ms 5724 KB Correct
8 Correct 8 ms 5564 KB Correct
9 Correct 9 ms 5724 KB Correct
10 Correct 7 ms 5724 KB Correct
11 Correct 3 ms 5724 KB Correct
12 Correct 5 ms 5980 KB Correct
13 Correct 2 ms 5724 KB Correct
14 Correct 2 ms 5724 KB Correct
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 4956 KB Correct
2 Correct 9 ms 5468 KB Correct
3 Correct 5 ms 5212 KB Correct
4 Correct 4 ms 5724 KB Correct
5 Correct 3 ms 5720 KB Correct
6 Correct 4 ms 5896 KB Correct
7 Correct 4 ms 5724 KB Correct
8 Correct 8 ms 5564 KB Correct
9 Correct 9 ms 5724 KB Correct
10 Correct 7 ms 5724 KB Correct
11 Correct 3 ms 5724 KB Correct
12 Correct 5 ms 5980 KB Correct
13 Correct 2 ms 5724 KB Correct
14 Correct 2 ms 5724 KB Correct
15 Correct 1 ms 4956 KB Correct
16 Correct 9 ms 5468 KB Correct
17 Correct 6 ms 5240 KB Correct
18 Correct 5 ms 5560 KB Correct
19 Correct 2 ms 5724 KB Correct
20 Correct 4 ms 5900 KB Correct
21 Correct 5 ms 5724 KB Correct
22 Correct 8 ms 5724 KB Correct
23 Correct 8 ms 5724 KB Correct
24 Correct 6 ms 5836 KB Correct
25 Correct 3 ms 5720 KB Correct
26 Correct 5 ms 5980 KB Correct
27 Correct 3 ms 5724 KB Correct
28 Correct 4 ms 5724 KB Correct
29 Correct 8 ms 5468 KB Correct
30 Correct 7 ms 5724 KB Correct
31 Correct 8 ms 5724 KB Correct
32 Correct 7 ms 5836 KB Correct
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 4956 KB Correct
2 Correct 9 ms 5468 KB Correct
3 Correct 5 ms 5212 KB Correct
4 Correct 4 ms 5724 KB Correct
5 Correct 3 ms 5720 KB Correct
6 Correct 4 ms 5896 KB Correct
7 Correct 4 ms 5724 KB Correct
8 Correct 8 ms 5564 KB Correct
9 Correct 9 ms 5724 KB Correct
10 Correct 7 ms 5724 KB Correct
11 Correct 3 ms 5724 KB Correct
12 Correct 5 ms 5980 KB Correct
13 Correct 2 ms 5724 KB Correct
14 Correct 2 ms 5724 KB Correct
15 Correct 1 ms 4956 KB Correct
16 Correct 9 ms 5468 KB Correct
17 Correct 6 ms 5240 KB Correct
18 Correct 5 ms 5560 KB Correct
19 Correct 2 ms 5724 KB Correct
20 Correct 4 ms 5900 KB Correct
21 Correct 5 ms 5724 KB Correct
22 Correct 8 ms 5724 KB Correct
23 Correct 8 ms 5724 KB Correct
24 Correct 6 ms 5836 KB Correct
25 Correct 3 ms 5720 KB Correct
26 Correct 5 ms 5980 KB Correct
27 Correct 3 ms 5724 KB Correct
28 Correct 4 ms 5724 KB Correct
29 Correct 8 ms 5468 KB Correct
30 Correct 7 ms 5724 KB Correct
31 Correct 8 ms 5724 KB Correct
32 Correct 7 ms 5836 KB Correct
33 Correct 1 ms 4956 KB Correct
34 Correct 9 ms 5532 KB Correct
35 Correct 5 ms 5212 KB Correct
36 Correct 4 ms 5636 KB Correct
37 Correct 2 ms 5724 KB Correct
38 Correct 4 ms 5900 KB Correct
39 Correct 5 ms 5724 KB Correct
40 Correct 8 ms 5724 KB Correct
41 Correct 8 ms 5776 KB Correct
42 Correct 7 ms 5724 KB Correct
43 Correct 3 ms 5724 KB Correct
44 Correct 5 ms 6016 KB Correct
45 Correct 3 ms 5720 KB Correct
46 Correct 3 ms 5720 KB Correct
47 Correct 8 ms 5468 KB Correct
48 Correct 7 ms 5724 KB Correct
49 Correct 8 ms 5720 KB Correct
50 Correct 7 ms 5900 KB Correct
51 Correct 1 ms 4956 KB Correct
52 Correct 1 ms 4956 KB Correct
53 Correct 1 ms 4956 KB Correct
54 Correct 1 ms 4956 KB Correct
55 Correct 1 ms 4956 KB Correct
56 Correct 1 ms 4956 KB Correct
57 Correct 1 ms 4956 KB Correct
58 Correct 15 ms 6492 KB Correct
59 Correct 13 ms 5980 KB Correct
60 Correct 9 ms 6152 KB Correct
61 Correct 9 ms 5900 KB Correct
# 결과 실행 시간 메모리 Grader output
1 Correct 113 ms 20004 KB Correct
2 Correct 85 ms 20172 KB Correct
3 Correct 82 ms 18120 KB Correct
4 Correct 37 ms 18884 KB Correct
5 Correct 75 ms 19656 KB Correct
6 Correct 112 ms 20676 KB Correct
7 Correct 111 ms 20556 KB Correct
8 Correct 105 ms 21448 KB Correct
9 Correct 105 ms 21472 KB Correct
10 Correct 35 ms 19052 KB Correct
11 Correct 38 ms 19144 KB Correct
12 Correct 1 ms 4956 KB Correct
13 Correct 9 ms 5468 KB Correct
14 Correct 5 ms 5212 KB Correct
15 Correct 4 ms 5724 KB Correct
16 Correct 3 ms 5720 KB Correct
17 Correct 4 ms 5896 KB Correct
18 Correct 4 ms 5724 KB Correct
19 Correct 8 ms 5564 KB Correct
20 Correct 9 ms 5724 KB Correct
21 Correct 7 ms 5724 KB Correct
22 Correct 3 ms 5724 KB Correct
23 Correct 5 ms 5980 KB Correct
24 Correct 2 ms 5724 KB Correct
25 Correct 2 ms 5724 KB Correct
26 Correct 108 ms 20164 KB Correct
27 Correct 79 ms 19912 KB Correct
28 Correct 93 ms 18116 KB Correct
29 Correct 37 ms 18884 KB Correct
30 Correct 78 ms 19652 KB Correct
31 Correct 109 ms 20680 KB Correct
32 Correct 117 ms 20552 KB Correct
33 Correct 120 ms 21256 KB Correct
34 Correct 103 ms 21448 KB Correct
35 Correct 34 ms 19148 KB Correct
36 Correct 35 ms 19140 KB Correct
37 Correct 1 ms 4956 KB Correct
38 Correct 9 ms 5452 KB Correct
39 Correct 5 ms 5212 KB Correct
40 Correct 5 ms 5724 KB Correct
41 Correct 2 ms 5724 KB Correct
42 Correct 4 ms 5900 KB Correct
43 Correct 4 ms 5724 KB Correct
44 Correct 8 ms 5560 KB Correct
45 Correct 10 ms 5724 KB Correct
46 Correct 7 ms 5724 KB Correct
47 Correct 4 ms 5720 KB Correct
48 Correct 5 ms 5976 KB Correct
49 Correct 2 ms 5724 KB Correct
50 Correct 2 ms 5772 KB Correct
51 Correct 659 ms 32444 KB Correct
52 Correct 776 ms 16864 KB Correct
53 Correct 54 ms 5928 KB Correct
54 Correct 163 ms 11016 KB Correct
55 Correct 542 ms 13456 KB Correct
56 Correct 488 ms 30500 KB Correct
57 Correct 719 ms 32920 KB Correct
58 Correct 314 ms 10636 KB Correct
59 Correct 229 ms 9556 KB Correct
60 Correct 443 ms 28204 KB Correct
61 Correct 647 ms 30904 KB Correct
62 Correct 166 ms 26728 KB Correct
63 Correct 125 ms 27504 KB Correct
64 Correct 121 ms 26736 KB Correct
65 Correct 114 ms 27516 KB Correct
66 Correct 109 ms 26708 KB Correct
67 Correct 107 ms 26872 KB Correct
68 Correct 115 ms 26680 KB Correct
69 Correct 110 ms 26828 KB Correct
70 Correct 141 ms 23500 KB Correct
71 Correct 145 ms 23604 KB Correct
# 결과 실행 시간 메모리 Grader output
1 Correct 113 ms 20004 KB Correct
2 Correct 85 ms 20172 KB Correct
3 Correct 82 ms 18120 KB Correct
4 Correct 37 ms 18884 KB Correct
5 Correct 75 ms 19656 KB Correct
6 Correct 112 ms 20676 KB Correct
7 Correct 111 ms 20556 KB Correct
8 Correct 105 ms 21448 KB Correct
9 Correct 105 ms 21472 KB Correct
10 Correct 35 ms 19052 KB Correct
11 Correct 38 ms 19144 KB Correct
12 Correct 112 ms 20164 KB Correct
13 Correct 77 ms 20164 KB Correct
14 Correct 83 ms 18120 KB Correct
15 Correct 37 ms 18888 KB Correct
16 Correct 83 ms 19656 KB Correct
17 Correct 109 ms 20676 KB Correct
18 Correct 107 ms 20556 KB Correct
19 Correct 103 ms 21260 KB Correct
20 Correct 101 ms 21448 KB Correct
21 Correct 35 ms 19148 KB Correct
22 Correct 34 ms 19140 KB Correct
23 Correct 118 ms 21448 KB Correct
24 Correct 50 ms 18892 KB Correct
25 Correct 108 ms 19904 KB Correct
26 Correct 1 ms 4956 KB Correct
27 Correct 9 ms 5468 KB Correct
28 Correct 5 ms 5212 KB Correct
29 Correct 4 ms 5724 KB Correct
30 Correct 3 ms 5720 KB Correct
31 Correct 4 ms 5896 KB Correct
32 Correct 4 ms 5724 KB Correct
33 Correct 8 ms 5564 KB Correct
34 Correct 9 ms 5724 KB Correct
35 Correct 7 ms 5724 KB Correct
36 Correct 3 ms 5724 KB Correct
37 Correct 5 ms 5980 KB Correct
38 Correct 2 ms 5724 KB Correct
39 Correct 2 ms 5724 KB Correct
40 Correct 1 ms 4956 KB Correct
41 Correct 9 ms 5468 KB Correct
42 Correct 6 ms 5240 KB Correct
43 Correct 5 ms 5560 KB Correct
44 Correct 2 ms 5724 KB Correct
45 Correct 4 ms 5900 KB Correct
46 Correct 5 ms 5724 KB Correct
47 Correct 8 ms 5724 KB Correct
48 Correct 8 ms 5724 KB Correct
49 Correct 6 ms 5836 KB Correct
50 Correct 3 ms 5720 KB Correct
51 Correct 5 ms 5980 KB Correct
52 Correct 3 ms 5724 KB Correct
53 Correct 4 ms 5724 KB Correct
54 Correct 8 ms 5468 KB Correct
55 Correct 7 ms 5724 KB Correct
56 Correct 8 ms 5724 KB Correct
57 Correct 7 ms 5836 KB Correct
58 Correct 108 ms 20164 KB Correct
59 Correct 79 ms 19912 KB Correct
60 Correct 93 ms 18116 KB Correct
61 Correct 37 ms 18884 KB Correct
62 Correct 78 ms 19652 KB Correct
63 Correct 109 ms 20680 KB Correct
64 Correct 117 ms 20552 KB Correct
65 Correct 120 ms 21256 KB Correct
66 Correct 103 ms 21448 KB Correct
67 Correct 34 ms 19148 KB Correct
68 Correct 35 ms 19140 KB Correct
69 Correct 1 ms 4956 KB Correct
70 Correct 9 ms 5452 KB Correct
71 Correct 5 ms 5212 KB Correct
72 Correct 5 ms 5724 KB Correct
73 Correct 2 ms 5724 KB Correct
74 Correct 4 ms 5900 KB Correct
75 Correct 4 ms 5724 KB Correct
76 Correct 8 ms 5560 KB Correct
77 Correct 10 ms 5724 KB Correct
78 Correct 7 ms 5724 KB Correct
79 Correct 4 ms 5720 KB Correct
80 Correct 5 ms 5976 KB Correct
81 Correct 2 ms 5724 KB Correct
82 Correct 2 ms 5772 KB Correct
83 Correct 659 ms 32444 KB Correct
84 Correct 776 ms 16864 KB Correct
85 Correct 54 ms 5928 KB Correct
86 Correct 163 ms 11016 KB Correct
87 Correct 542 ms 13456 KB Correct
88 Correct 488 ms 30500 KB Correct
89 Correct 719 ms 32920 KB Correct
90 Correct 314 ms 10636 KB Correct
91 Correct 229 ms 9556 KB Correct
92 Correct 443 ms 28204 KB Correct
93 Correct 647 ms 30904 KB Correct
94 Correct 166 ms 26728 KB Correct
95 Correct 125 ms 27504 KB Correct
96 Correct 121 ms 26736 KB Correct
97 Correct 114 ms 27516 KB Correct
98 Correct 109 ms 26708 KB Correct
99 Correct 107 ms 26872 KB Correct
100 Correct 115 ms 26680 KB Correct
101 Correct 110 ms 26828 KB Correct
102 Correct 141 ms 23500 KB Correct
103 Correct 145 ms 23604 KB Correct
104 Correct 113 ms 20168 KB Correct
105 Correct 80 ms 19912 KB Correct
106 Correct 96 ms 18120 KB Correct
107 Correct 38 ms 18888 KB Correct
108 Correct 89 ms 19652 KB Correct
109 Correct 134 ms 20736 KB Correct
110 Correct 121 ms 20552 KB Correct
111 Correct 103 ms 21256 KB Correct
112 Correct 105 ms 21444 KB Correct
113 Correct 43 ms 19136 KB Correct
114 Correct 34 ms 19144 KB Correct
115 Correct 1 ms 4956 KB Correct
116 Correct 9 ms 5468 KB Correct
117 Correct 5 ms 5212 KB Correct
118 Correct 7 ms 5724 KB Correct
119 Correct 2 ms 5720 KB Correct
120 Correct 4 ms 5900 KB Correct
121 Correct 8 ms 5724 KB Correct
122 Correct 9 ms 5724 KB Correct
123 Correct 8 ms 5724 KB Correct
124 Correct 6 ms 5724 KB Correct
125 Correct 3 ms 5724 KB Correct
126 Correct 4 ms 5980 KB Correct
127 Correct 2 ms 5724 KB Correct
128 Correct 3 ms 5724 KB Correct
129 Correct 642 ms 32616 KB Correct
130 Correct 750 ms 16852 KB Correct
131 Correct 51 ms 5972 KB Correct
132 Correct 168 ms 11080 KB Correct
133 Correct 522 ms 13552 KB Correct
134 Correct 475 ms 29884 KB Correct
135 Correct 694 ms 32700 KB Correct
136 Correct 311 ms 10576 KB Correct
137 Correct 244 ms 9556 KB Correct
138 Correct 407 ms 28608 KB Correct
139 Correct 646 ms 32012 KB Correct
140 Correct 117 ms 27244 KB Correct
141 Correct 125 ms 27536 KB Correct
142 Correct 117 ms 26716 KB Correct
143 Correct 115 ms 27504 KB Correct
144 Correct 109 ms 26716 KB Correct
145 Correct 104 ms 26744 KB Correct
146 Correct 114 ms 26736 KB Correct
147 Correct 108 ms 27264 KB Correct
148 Correct 133 ms 23384 KB Correct
149 Correct 136 ms 23608 KB Correct
150 Correct 115 ms 21548 KB Correct
151 Correct 53 ms 18888 KB Correct
152 Correct 130 ms 19936 KB Correct
153 Correct 9 ms 5464 KB Correct
154 Correct 7 ms 5720 KB Correct
155 Correct 9 ms 5724 KB Correct
156 Correct 7 ms 5900 KB Correct
157 Correct 681 ms 36024 KB Correct
158 Correct 842 ms 17604 KB Correct
159 Correct 100 ms 9160 KB Correct
160 Correct 661 ms 36192 KB Correct
161 Correct 678 ms 35508 KB Correct
162 Correct 328 ms 10576 KB Correct
163 Correct 660 ms 36768 KB Correct
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 4952 KB Correct
2 Correct 1 ms 4956 KB Correct
3 Correct 1 ms 4956 KB Correct
4 Correct 1 ms 4952 KB Correct
5 Correct 1 ms 4956 KB Correct
6 Correct 1 ms 4956 KB Correct
7 Correct 1 ms 4956 KB Correct
8 Correct 1 ms 4956 KB Correct
9 Correct 1 ms 4956 KB Correct
10 Correct 113 ms 20004 KB Correct
11 Correct 85 ms 20172 KB Correct
12 Correct 82 ms 18120 KB Correct
13 Correct 37 ms 18884 KB Correct
14 Correct 75 ms 19656 KB Correct
15 Correct 112 ms 20676 KB Correct
16 Correct 111 ms 20556 KB Correct
17 Correct 105 ms 21448 KB Correct
18 Correct 105 ms 21472 KB Correct
19 Correct 35 ms 19052 KB Correct
20 Correct 38 ms 19144 KB Correct
21 Correct 112 ms 20164 KB Correct
22 Correct 77 ms 20164 KB Correct
23 Correct 83 ms 18120 KB Correct
24 Correct 37 ms 18888 KB Correct
25 Correct 83 ms 19656 KB Correct
26 Correct 109 ms 20676 KB Correct
27 Correct 107 ms 20556 KB Correct
28 Correct 103 ms 21260 KB Correct
29 Correct 101 ms 21448 KB Correct
30 Correct 35 ms 19148 KB Correct
31 Correct 34 ms 19140 KB Correct
32 Correct 118 ms 21448 KB Correct
33 Correct 50 ms 18892 KB Correct
34 Correct 108 ms 19904 KB Correct
35 Correct 1 ms 4956 KB Correct
36 Correct 1 ms 4956 KB Correct
37 Correct 1 ms 4956 KB Correct
38 Correct 1 ms 4952 KB Correct
39 Correct 1 ms 4956 KB Correct
40 Correct 1 ms 4956 KB Correct
41 Correct 1 ms 4956 KB Correct
42 Correct 112 ms 20092 KB Correct
43 Correct 91 ms 20164 KB Correct
44 Correct 88 ms 18116 KB Correct
45 Correct 37 ms 18888 KB Correct
46 Correct 75 ms 19652 KB Correct
47 Correct 112 ms 20672 KB Correct
48 Correct 115 ms 20552 KB Correct
49 Correct 98 ms 21460 KB Correct
50 Correct 104 ms 21448 KB Correct
51 Correct 34 ms 19148 KB Correct
52 Correct 43 ms 19140 KB Correct
53 Correct 111 ms 21444 KB Correct
54 Correct 58 ms 18852 KB Correct
55 Correct 109 ms 19916 KB Correct
56 Correct 55 ms 14196 KB Correct
57 Correct 2 ms 5212 KB Correct
58 Correct 1 ms 4956 KB Correct
59 Correct 9 ms 5468 KB Correct
60 Correct 5 ms 5212 KB Correct
61 Correct 4 ms 5724 KB Correct
62 Correct 3 ms 5720 KB Correct
63 Correct 4 ms 5896 KB Correct
64 Correct 4 ms 5724 KB Correct
65 Correct 8 ms 5564 KB Correct
66 Correct 9 ms 5724 KB Correct
67 Correct 7 ms 5724 KB Correct
68 Correct 3 ms 5724 KB Correct
69 Correct 5 ms 5980 KB Correct
70 Correct 2 ms 5724 KB Correct
71 Correct 2 ms 5724 KB Correct
72 Correct 1 ms 4956 KB Correct
73 Correct 9 ms 5468 KB Correct
74 Correct 6 ms 5240 KB Correct
75 Correct 5 ms 5560 KB Correct
76 Correct 2 ms 5724 KB Correct
77 Correct 4 ms 5900 KB Correct
78 Correct 5 ms 5724 KB Correct
79 Correct 8 ms 5724 KB Correct
80 Correct 8 ms 5724 KB Correct
81 Correct 6 ms 5836 KB Correct
82 Correct 3 ms 5720 KB Correct
83 Correct 5 ms 5980 KB Correct
84 Correct 3 ms 5724 KB Correct
85 Correct 4 ms 5724 KB Correct
86 Correct 8 ms 5468 KB Correct
87 Correct 7 ms 5724 KB Correct
88 Correct 8 ms 5724 KB Correct
89 Correct 7 ms 5836 KB Correct
90 Correct 1 ms 4956 KB Correct
91 Correct 9 ms 5532 KB Correct
92 Correct 5 ms 5212 KB Correct
93 Correct 4 ms 5636 KB Correct
94 Correct 2 ms 5724 KB Correct
95 Correct 4 ms 5900 KB Correct
96 Correct 5 ms 5724 KB Correct
97 Correct 8 ms 5724 KB Correct
98 Correct 8 ms 5776 KB Correct
99 Correct 7 ms 5724 KB Correct
100 Correct 3 ms 5724 KB Correct
101 Correct 5 ms 6016 KB Correct
102 Correct 3 ms 5720 KB Correct
103 Correct 3 ms 5720 KB Correct
104 Correct 8 ms 5468 KB Correct
105 Correct 7 ms 5724 KB Correct
106 Correct 8 ms 5720 KB Correct
107 Correct 7 ms 5900 KB Correct
108 Correct 1 ms 4956 KB Correct
109 Correct 1 ms 4956 KB Correct
110 Correct 1 ms 4956 KB Correct
111 Correct 1 ms 4956 KB Correct
112 Correct 1 ms 4956 KB Correct
113 Correct 1 ms 4956 KB Correct
114 Correct 1 ms 4956 KB Correct
115 Correct 15 ms 6492 KB Correct
116 Correct 13 ms 5980 KB Correct
117 Correct 9 ms 6152 KB Correct
118 Correct 9 ms 5900 KB Correct
119 Correct 108 ms 20164 KB Correct
120 Correct 79 ms 19912 KB Correct
121 Correct 93 ms 18116 KB Correct
122 Correct 37 ms 18884 KB Correct
123 Correct 78 ms 19652 KB Correct
124 Correct 109 ms 20680 KB Correct
125 Correct 117 ms 20552 KB Correct
126 Correct 120 ms 21256 KB Correct
127 Correct 103 ms 21448 KB Correct
128 Correct 34 ms 19148 KB Correct
129 Correct 35 ms 19140 KB Correct
130 Correct 1 ms 4956 KB Correct
131 Correct 9 ms 5452 KB Correct
132 Correct 5 ms 5212 KB Correct
133 Correct 5 ms 5724 KB Correct
134 Correct 2 ms 5724 KB Correct
135 Correct 4 ms 5900 KB Correct
136 Correct 4 ms 5724 KB Correct
137 Correct 8 ms 5560 KB Correct
138 Correct 10 ms 5724 KB Correct
139 Correct 7 ms 5724 KB Correct
140 Correct 4 ms 5720 KB Correct
141 Correct 5 ms 5976 KB Correct
142 Correct 2 ms 5724 KB Correct
143 Correct 2 ms 5772 KB Correct
144 Correct 659 ms 32444 KB Correct
145 Correct 776 ms 16864 KB Correct
146 Correct 54 ms 5928 KB Correct
147 Correct 163 ms 11016 KB Correct
148 Correct 542 ms 13456 KB Correct
149 Correct 488 ms 30500 KB Correct
150 Correct 719 ms 32920 KB Correct
151 Correct 314 ms 10636 KB Correct
152 Correct 229 ms 9556 KB Correct
153 Correct 443 ms 28204 KB Correct
154 Correct 647 ms 30904 KB Correct
155 Correct 166 ms 26728 KB Correct
156 Correct 125 ms 27504 KB Correct
157 Correct 121 ms 26736 KB Correct
158 Correct 114 ms 27516 KB Correct
159 Correct 109 ms 26708 KB Correct
160 Correct 107 ms 26872 KB Correct
161 Correct 115 ms 26680 KB Correct
162 Correct 110 ms 26828 KB Correct
163 Correct 141 ms 23500 KB Correct
164 Correct 145 ms 23604 KB Correct
165 Correct 113 ms 20168 KB Correct
166 Correct 80 ms 19912 KB Correct
167 Correct 96 ms 18120 KB Correct
168 Correct 38 ms 18888 KB Correct
169 Correct 89 ms 19652 KB Correct
170 Correct 134 ms 20736 KB Correct
171 Correct 121 ms 20552 KB Correct
172 Correct 103 ms 21256 KB Correct
173 Correct 105 ms 21444 KB Correct
174 Correct 43 ms 19136 KB Correct
175 Correct 34 ms 19144 KB Correct
176 Correct 1 ms 4956 KB Correct
177 Correct 9 ms 5468 KB Correct
178 Correct 5 ms 5212 KB Correct
179 Correct 7 ms 5724 KB Correct
180 Correct 2 ms 5720 KB Correct
181 Correct 4 ms 5900 KB Correct
182 Correct 8 ms 5724 KB Correct
183 Correct 9 ms 5724 KB Correct
184 Correct 8 ms 5724 KB Correct
185 Correct 6 ms 5724 KB Correct
186 Correct 3 ms 5724 KB Correct
187 Correct 4 ms 5980 KB Correct
188 Correct 2 ms 5724 KB Correct
189 Correct 3 ms 5724 KB Correct
190 Correct 642 ms 32616 KB Correct
191 Correct 750 ms 16852 KB Correct
192 Correct 51 ms 5972 KB Correct
193 Correct 168 ms 11080 KB Correct
194 Correct 522 ms 13552 KB Correct
195 Correct 475 ms 29884 KB Correct
196 Correct 694 ms 32700 KB Correct
197 Correct 311 ms 10576 KB Correct
198 Correct 244 ms 9556 KB Correct
199 Correct 407 ms 28608 KB Correct
200 Correct 646 ms 32012 KB Correct
201 Correct 117 ms 27244 KB Correct
202 Correct 125 ms 27536 KB Correct
203 Correct 117 ms 26716 KB Correct
204 Correct 115 ms 27504 KB Correct
205 Correct 109 ms 26716 KB Correct
206 Correct 104 ms 26744 KB Correct
207 Correct 114 ms 26736 KB Correct
208 Correct 108 ms 27264 KB Correct
209 Correct 133 ms 23384 KB Correct
210 Correct 136 ms 23608 KB Correct
211 Correct 115 ms 21548 KB Correct
212 Correct 53 ms 18888 KB Correct
213 Correct 130 ms 19936 KB Correct
214 Correct 9 ms 5464 KB Correct
215 Correct 7 ms 5720 KB Correct
216 Correct 9 ms 5724 KB Correct
217 Correct 7 ms 5900 KB Correct
218 Correct 681 ms 36024 KB Correct
219 Correct 842 ms 17604 KB Correct
220 Correct 100 ms 9160 KB Correct
221 Correct 661 ms 36192 KB Correct
222 Correct 678 ms 35508 KB Correct
223 Correct 328 ms 10576 KB Correct
224 Correct 660 ms 36768 KB Correct
225 Correct 119 ms 20152 KB Correct
226 Correct 77 ms 20164 KB Correct
227 Correct 82 ms 18080 KB Correct
228 Correct 38 ms 18880 KB Correct
229 Correct 83 ms 19728 KB Correct
230 Correct 108 ms 20680 KB Correct
231 Correct 111 ms 20556 KB Correct
232 Correct 101 ms 21256 KB Correct
233 Correct 102 ms 21444 KB Correct
234 Correct 35 ms 19144 KB Correct
235 Correct 34 ms 19148 KB Correct
236 Correct 1 ms 4952 KB Correct
237 Correct 9 ms 5528 KB Correct
238 Correct 5 ms 5212 KB Correct
239 Correct 5 ms 5724 KB Correct
240 Correct 3 ms 5824 KB Correct
241 Correct 4 ms 5896 KB Correct
242 Correct 5 ms 5836 KB Correct
243 Correct 10 ms 5720 KB Correct
244 Correct 8 ms 5724 KB Correct
245 Correct 8 ms 5720 KB Correct
246 Correct 4 ms 5720 KB Correct
247 Correct 5 ms 5976 KB Correct
248 Correct 2 ms 5724 KB Correct
249 Correct 2 ms 5724 KB Correct
250 Correct 652 ms 32608 KB Correct
251 Correct 749 ms 16756 KB Correct
252 Correct 47 ms 5968 KB Correct
253 Correct 161 ms 10972 KB Correct
254 Correct 525 ms 13440 KB Correct
255 Correct 473 ms 29372 KB Correct
256 Correct 710 ms 32956 KB Correct
257 Correct 312 ms 10580 KB Correct
258 Correct 239 ms 9556 KB Correct
259 Correct 419 ms 29608 KB Correct
260 Correct 633 ms 31420 KB Correct
261 Correct 119 ms 26728 KB Correct
262 Correct 119 ms 27520 KB Correct
263 Correct 111 ms 26720 KB Correct
264 Correct 112 ms 27508 KB Correct
265 Correct 117 ms 26724 KB Correct
266 Correct 103 ms 26740 KB Correct
267 Correct 117 ms 26716 KB Correct
268 Correct 115 ms 27504 KB Correct
269 Correct 134 ms 23576 KB Correct
270 Correct 144 ms 23552 KB Correct
271 Correct 119 ms 21444 KB Correct
272 Correct 53 ms 18872 KB Correct
273 Correct 118 ms 19908 KB Correct
274 Correct 9 ms 5468 KB Correct
275 Correct 7 ms 5724 KB Correct
276 Correct 8 ms 5724 KB Correct
277 Correct 7 ms 5900 KB Correct
278 Correct 666 ms 36024 KB Correct
279 Correct 833 ms 17680 KB Correct
280 Correct 97 ms 9192 KB Correct
281 Correct 676 ms 36268 KB Correct
282 Correct 676 ms 35516 KB Correct
283 Correct 323 ms 10656 KB Correct
284 Correct 666 ms 36452 KB Correct
285 Correct 1 ms 4956 KB Correct
286 Correct 2 ms 5152 KB Correct
287 Correct 1 ms 4952 KB Correct
288 Correct 1 ms 4956 KB Correct
289 Correct 1 ms 4956 KB Correct
290 Correct 1 ms 4956 KB Correct
291 Correct 1 ms 4956 KB Correct
292 Correct 58 ms 14028 KB Correct
293 Correct 2 ms 5208 KB Correct
294 Correct 16 ms 6340 KB Correct
295 Correct 13 ms 5976 KB Correct
296 Correct 9 ms 6156 KB Correct
297 Correct 9 ms 5856 KB Correct
298 Correct 700 ms 38420 KB Correct
299 Correct 1057 ms 21692 KB Correct
300 Correct 332 ms 11088 KB Correct
301 Correct 318 ms 10832 KB Correct
302 Correct 333 ms 10836 KB Correct
303 Correct 683 ms 36508 KB Correct
304 Correct 689 ms 41916 KB Correct
305 Correct 710 ms 41660 KB Correct
306 Correct 869 ms 34680 KB Correct
307 Correct 667 ms 31748 KB Correct