답안 #597658

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
597658 2022-07-16T13:35:23 Z cfalas 벽 칠하기 (APIO20_paint) C++17
40 / 100
1327 ms 524288 KB
#include<bits/stdc++.h>
using namespace std;
#include "paint.h"
#define mp make_pair
#define INF 10000000
#define MOD 1000000007
#define MID ((l+r)/2)
#define HASHMOD 2305843009213693951
#define ll long long
#define ull unsigned long long
#define F first
#define S second
typedef pair<ll, ll> ii;
typedef pair<ii, int> iii;
typedef vector<int> vi;
typedef vector<ii> vii;
typedef map<int, int> mii;

#define EPS 1e-6
#define FOR(i,n) for(int i=0;i<((int)(n));i++)
#define FORi(i,a,b) for(int i=((int)(a));i<((int)(b));i++)
#define FOA(v, a) for(auto v : a)

int M, N;
vi c;
map<int, vector<int>> f;
struct seg{
	set<int> val;
	seg *L, *R;

	set<int> merge(set<int> &a, int as, set<int> &b){
		set<int> ans;
		FOA(v,a){
			if(b.count((v + as)%M)) ans.insert(v);
		}
		return ans;
	}

	void build(int l=0, int r=N-1){
		if(l==r){
			FOA(v, f[c[l]]){
				val.insert(v);
			}
		}
		else{
			L = new seg;
			R = new seg;

			L->build(l,MID);
			R->build(MID+1,r);

			val = merge(L->val, MID-l+1, R->val);
		}
	}

	set<int> query(int rl, int rr, int l=0, int r=N-1){
		if(rl<=l && r<=rr) return val;
		else if(rr<l || r<rl) return set<int>();
		else{
			set<int> sl = L->query(rl,rr,l,MID);
			set<int> sr = R->query(rl,rr,MID+1,r);
			if(rr<=MID){
				/*
				cout<<"Return left "<<l<<" "<<r<<": ";
				FOA(v,sl) cout<<v<<" ";
				cout<<endl;*/
				return sl;
			}
			if(rl>MID){
				/*
				cout<<"Return right "<<l<<" "<<r<<": ";
				FOA(v,sr) cout<<v<<" ";
				cout<<endl;*/
				return sr;
			}
			//cout<<"merge "<<l<<" "<<r<<": ";
			set<int> qq;
			if(l<=rl) qq = merge(sl, MID-rl+1, sr);
			else qq = merge(sl, MID-l+1, sr);
			/*
			FOA(v, sl) cout<<v<<" ";
			cout<<" | ";
			FOA(v, sr) cout<<v<<" ";
			cout<<" | ";
			FOA(v, qq) cout<<v<<" ";
			cout<<endl;*/
			return qq;
		}
	}

	void print(int l=0, int r=N-1){
		cout<<l<<" "<<r<<": ";
		FOA(v, val) cout<<v<<" ";
		cout<<endl;
		if(l!=r){
			L->print(l, MID);
			R->print(MID+1,r);
		}
	}
};

int minimumInstructions(int n, int m, int K, std::vector<int> C, 
						vector<int> A, vector<std::vector<int>> B) {
	M = m;
	N = n;
	c = C;
	FOR(i,M){
		FOA(v, B[i]){
			f[v].push_back(i);
		}
	}
	seg s;
	s.build();
	//s.print();
	set<int> ok;
	unordered_set<int> poss;
	FOR(j,N-M+1){
		set<int> cc = s.query(j, j+M-1);
		/*cout<<j<<" "<<j+M-1<<": ";
		FOA(v, cc) cout<<v<<" ";
		cout<<endl;*/

		/*
		set<int> poss;
		FOA(v, f[C[j]]) poss.insert(v);
		FORi(i,1,M){
			set<int> npos;
			FOA(v, f[C[j+i]]){
				int pp = (v-i + M)%M;
				if(poss.count(pp)) npos.insert(pp);
			}
			poss = npos;
		}
		FOA(v, poss) cout<<v<<" ";
		cout<<endl;
		if(cc!=poss) return -1;*/
		if(!cc.empty()){
			ok.insert(j);
		}
	}
	if(!ok.count(0)) return -1;
	int p=0;
	int cp=M;
	int ans = 1;
	while(cp<N){
		//cout<<p<<" "<<cp<<endl;
		while(!ok.count(cp)) cp--;
		if(cp<=p) return -1;
		p = cp;
		cp+=M;
		ans++;
	}
  return ans;
}
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 212 KB Output is correct
2 Correct 0 ms 212 KB Output is correct
3 Correct 0 ms 212 KB Output is correct
4 Correct 0 ms 212 KB Output is correct
5 Correct 1 ms 212 KB Output is correct
6 Correct 0 ms 212 KB Output is correct
7 Correct 1 ms 340 KB Output is correct
8 Correct 1 ms 340 KB Output is correct
9 Correct 1 ms 340 KB Output is correct
10 Correct 1 ms 340 KB Output is correct
11 Correct 1 ms 340 KB Output is correct
12 Correct 1 ms 340 KB Output is correct
13 Correct 1 ms 468 KB Output is correct
14 Correct 1 ms 468 KB Output is correct
15 Correct 1 ms 468 KB Output is correct
16 Correct 1 ms 468 KB Output is correct
17 Correct 3 ms 468 KB Output is correct
18 Correct 1 ms 468 KB Output is correct
19 Correct 1 ms 468 KB Output is correct
20 Correct 1 ms 468 KB Output is correct
21 Correct 1 ms 468 KB Output is correct
22 Correct 51 ms 12108 KB Output is correct
23 Correct 51 ms 12140 KB Output is correct
24 Correct 49 ms 12028 KB Output is correct
25 Correct 17 ms 6428 KB Output is correct
26 Correct 18 ms 6368 KB Output is correct
27 Correct 15 ms 5264 KB Output is correct
28 Correct 20 ms 4840 KB Output is correct
29 Correct 14 ms 4692 KB Output is correct
30 Correct 16 ms 4692 KB Output is correct
31 Correct 51 ms 8796 KB Output is correct
32 Correct 43 ms 9084 KB Output is correct
33 Correct 43 ms 9036 KB Output is correct
34 Correct 43 ms 9020 KB Output is correct
35 Correct 44 ms 9052 KB Output is correct
36 Correct 44 ms 9088 KB Output is correct
37 Correct 113 ms 17100 KB Output is correct
38 Correct 112 ms 17152 KB Output is correct
39 Correct 107 ms 17072 KB Output is correct
40 Correct 84 ms 28424 KB Output is correct
41 Correct 53 ms 17880 KB Output is correct
42 Correct 73 ms 25164 KB Output is correct
43 Correct 43 ms 15368 KB Output is correct
44 Correct 46 ms 13576 KB Output is correct
45 Correct 88 ms 22272 KB Output is correct
46 Correct 184 ms 40880 KB Output is correct
47 Correct 126 ms 25816 KB Output is correct
48 Correct 99 ms 27428 KB Output is correct
49 Correct 119 ms 28056 KB Output is correct
50 Correct 131 ms 29784 KB Output is correct
51 Correct 144 ms 27132 KB Output is correct
52 Correct 122 ms 31320 KB Output is correct
53 Correct 99 ms 31460 KB Output is correct
54 Correct 79 ms 25508 KB Output is correct
55 Correct 68 ms 23200 KB Output is correct
56 Correct 90 ms 22544 KB Output is correct
57 Correct 97 ms 22348 KB Output is correct
58 Correct 233 ms 46864 KB Output is correct
59 Correct 228 ms 46924 KB Output is correct
60 Correct 246 ms 47072 KB Output is correct
61 Correct 239 ms 46928 KB Output is correct
62 Correct 228 ms 46860 KB Output is correct
63 Correct 316 ms 46936 KB Output is correct
64 Correct 198 ms 39108 KB Output is correct
65 Correct 181 ms 39100 KB Output is correct
66 Correct 205 ms 39076 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 212 KB Output is correct
2 Correct 0 ms 212 KB Output is correct
3 Correct 0 ms 212 KB Output is correct
4 Correct 0 ms 212 KB Output is correct
5 Correct 1 ms 212 KB Output is correct
6 Correct 0 ms 212 KB Output is correct
7 Correct 1 ms 340 KB Output is correct
8 Correct 1 ms 340 KB Output is correct
9 Correct 1 ms 340 KB Output is correct
10 Correct 1 ms 340 KB Output is correct
11 Correct 1 ms 340 KB Output is correct
12 Correct 1 ms 340 KB Output is correct
13 Correct 1 ms 468 KB Output is correct
14 Correct 1 ms 468 KB Output is correct
15 Correct 1 ms 468 KB Output is correct
16 Correct 1 ms 468 KB Output is correct
17 Correct 3 ms 468 KB Output is correct
18 Correct 1 ms 468 KB Output is correct
19 Correct 1 ms 468 KB Output is correct
20 Correct 1 ms 468 KB Output is correct
21 Correct 1 ms 468 KB Output is correct
22 Correct 0 ms 212 KB Output is correct
23 Correct 1 ms 212 KB Output is correct
24 Correct 0 ms 212 KB Output is correct
25 Correct 1 ms 212 KB Output is correct
26 Correct 0 ms 212 KB Output is correct
27 Correct 1 ms 340 KB Output is correct
28 Correct 6 ms 1204 KB Output is correct
29 Correct 1 ms 596 KB Output is correct
30 Correct 2 ms 596 KB Output is correct
31 Correct 2 ms 724 KB Output is correct
32 Correct 1 ms 596 KB Output is correct
33 Correct 1 ms 468 KB Output is correct
34 Correct 1 ms 468 KB Output is correct
35 Correct 1 ms 340 KB Output is correct
36 Correct 1 ms 340 KB Output is correct
37 Correct 1 ms 340 KB Output is correct
38 Correct 1 ms 468 KB Output is correct
39 Correct 1 ms 340 KB Output is correct
40 Correct 1 ms 468 KB Output is correct
41 Correct 1 ms 340 KB Output is correct
42 Correct 2 ms 468 KB Output is correct
43 Correct 1 ms 340 KB Output is correct
44 Correct 1 ms 468 KB Output is correct
45 Correct 11 ms 1876 KB Output is correct
46 Correct 3 ms 980 KB Output is correct
47 Correct 2 ms 852 KB Output is correct
48 Correct 2 ms 724 KB Output is correct
49 Correct 1 ms 724 KB Output is correct
50 Correct 1 ms 468 KB Output is correct
51 Correct 1 ms 468 KB Output is correct
52 Correct 1 ms 468 KB Output is correct
53 Correct 1 ms 468 KB Output is correct
54 Correct 1 ms 468 KB Output is correct
55 Correct 1 ms 468 KB Output is correct
56 Correct 1 ms 468 KB Output is correct
57 Correct 1 ms 468 KB Output is correct
58 Correct 1 ms 468 KB Output is correct
59 Correct 1 ms 468 KB Output is correct
60 Correct 1 ms 468 KB Output is correct
61 Correct 1 ms 468 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 212 KB Output is correct
2 Correct 1 ms 212 KB Output is correct
3 Correct 1 ms 212 KB Output is correct
4 Correct 0 ms 212 KB Output is correct
5 Correct 0 ms 212 KB Output is correct
6 Correct 0 ms 212 KB Output is correct
7 Correct 1 ms 212 KB Output is correct
8 Correct 0 ms 212 KB Output is correct
9 Correct 1 ms 340 KB Output is correct
10 Correct 1 ms 340 KB Output is correct
11 Correct 1 ms 340 KB Output is correct
12 Correct 1 ms 340 KB Output is correct
13 Correct 1 ms 340 KB Output is correct
14 Correct 1 ms 340 KB Output is correct
15 Correct 1 ms 468 KB Output is correct
16 Correct 1 ms 468 KB Output is correct
17 Correct 1 ms 468 KB Output is correct
18 Correct 1 ms 468 KB Output is correct
19 Correct 3 ms 468 KB Output is correct
20 Correct 1 ms 468 KB Output is correct
21 Correct 1 ms 468 KB Output is correct
22 Correct 1 ms 468 KB Output is correct
23 Correct 1 ms 468 KB Output is correct
24 Correct 51 ms 12108 KB Output is correct
25 Correct 51 ms 12140 KB Output is correct
26 Correct 49 ms 12028 KB Output is correct
27 Correct 0 ms 212 KB Output is correct
28 Correct 1 ms 212 KB Output is correct
29 Correct 0 ms 212 KB Output is correct
30 Correct 1 ms 340 KB Output is correct
31 Correct 6 ms 1204 KB Output is correct
32 Correct 1 ms 596 KB Output is correct
33 Correct 2 ms 596 KB Output is correct
34 Correct 2 ms 724 KB Output is correct
35 Correct 1 ms 596 KB Output is correct
36 Correct 1 ms 468 KB Output is correct
37 Correct 1 ms 468 KB Output is correct
38 Correct 1 ms 340 KB Output is correct
39 Correct 1 ms 340 KB Output is correct
40 Correct 1 ms 340 KB Output is correct
41 Correct 1 ms 468 KB Output is correct
42 Correct 1 ms 340 KB Output is correct
43 Correct 1 ms 468 KB Output is correct
44 Correct 1 ms 340 KB Output is correct
45 Correct 2 ms 468 KB Output is correct
46 Correct 1 ms 340 KB Output is correct
47 Correct 1 ms 468 KB Output is correct
48 Correct 11 ms 1876 KB Output is correct
49 Correct 3 ms 980 KB Output is correct
50 Correct 2 ms 852 KB Output is correct
51 Correct 2 ms 724 KB Output is correct
52 Correct 1 ms 724 KB Output is correct
53 Correct 1 ms 468 KB Output is correct
54 Correct 1 ms 468 KB Output is correct
55 Correct 1 ms 468 KB Output is correct
56 Correct 1 ms 468 KB Output is correct
57 Correct 1 ms 468 KB Output is correct
58 Correct 1 ms 468 KB Output is correct
59 Correct 1 ms 468 KB Output is correct
60 Correct 1 ms 468 KB Output is correct
61 Correct 1 ms 468 KB Output is correct
62 Correct 1 ms 468 KB Output is correct
63 Correct 1 ms 468 KB Output is correct
64 Correct 1 ms 468 KB Output is correct
65 Correct 26 ms 4820 KB Output is correct
66 Correct 18 ms 2132 KB Output is correct
67 Correct 57 ms 6108 KB Output is correct
68 Correct 29 ms 3736 KB Output is correct
69 Correct 48 ms 5404 KB Output is correct
70 Correct 7 ms 1492 KB Output is correct
71 Correct 8 ms 1748 KB Output is correct
72 Correct 9 ms 1620 KB Output is correct
73 Correct 4 ms 1108 KB Output is correct
74 Correct 9 ms 1596 KB Output is correct
75 Correct 6 ms 1268 KB Output is correct
76 Correct 34 ms 7624 KB Output is correct
77 Correct 37 ms 8928 KB Output is correct
78 Correct 55 ms 10056 KB Output is correct
79 Correct 115 ms 9856 KB Output is correct
80 Correct 101 ms 9816 KB Output is correct
81 Correct 90 ms 9856 KB Output is correct
82 Correct 86 ms 9860 KB Output is correct
83 Correct 94 ms 9960 KB Output is correct
84 Correct 11 ms 2004 KB Output is correct
85 Correct 10 ms 2032 KB Output is correct
86 Correct 11 ms 1976 KB Output is correct
87 Correct 13 ms 2004 KB Output is correct
88 Correct 10 ms 1952 KB Output is correct
89 Correct 10 ms 2020 KB Output is correct
90 Correct 63 ms 10628 KB Output is correct
91 Correct 62 ms 10636 KB Output is correct
92 Correct 68 ms 10656 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 212 KB Output is correct
2 Correct 1 ms 212 KB Output is correct
3 Correct 1 ms 212 KB Output is correct
4 Correct 0 ms 212 KB Output is correct
5 Correct 0 ms 212 KB Output is correct
6 Correct 0 ms 212 KB Output is correct
7 Correct 1 ms 212 KB Output is correct
8 Correct 0 ms 212 KB Output is correct
9 Correct 1 ms 340 KB Output is correct
10 Correct 1 ms 340 KB Output is correct
11 Correct 1 ms 340 KB Output is correct
12 Correct 1 ms 340 KB Output is correct
13 Correct 1 ms 340 KB Output is correct
14 Correct 1 ms 340 KB Output is correct
15 Correct 1 ms 468 KB Output is correct
16 Correct 1 ms 468 KB Output is correct
17 Correct 1 ms 468 KB Output is correct
18 Correct 1 ms 468 KB Output is correct
19 Correct 3 ms 468 KB Output is correct
20 Correct 1 ms 468 KB Output is correct
21 Correct 1 ms 468 KB Output is correct
22 Correct 1 ms 468 KB Output is correct
23 Correct 1 ms 468 KB Output is correct
24 Correct 51 ms 12108 KB Output is correct
25 Correct 51 ms 12140 KB Output is correct
26 Correct 49 ms 12028 KB Output is correct
27 Correct 17 ms 6428 KB Output is correct
28 Correct 18 ms 6368 KB Output is correct
29 Correct 15 ms 5264 KB Output is correct
30 Correct 20 ms 4840 KB Output is correct
31 Correct 14 ms 4692 KB Output is correct
32 Correct 16 ms 4692 KB Output is correct
33 Correct 51 ms 8796 KB Output is correct
34 Correct 43 ms 9084 KB Output is correct
35 Correct 43 ms 9036 KB Output is correct
36 Correct 43 ms 9020 KB Output is correct
37 Correct 44 ms 9052 KB Output is correct
38 Correct 44 ms 9088 KB Output is correct
39 Correct 113 ms 17100 KB Output is correct
40 Correct 112 ms 17152 KB Output is correct
41 Correct 107 ms 17072 KB Output is correct
42 Correct 0 ms 212 KB Output is correct
43 Correct 1 ms 212 KB Output is correct
44 Correct 0 ms 212 KB Output is correct
45 Correct 1 ms 340 KB Output is correct
46 Correct 6 ms 1204 KB Output is correct
47 Correct 1 ms 596 KB Output is correct
48 Correct 2 ms 596 KB Output is correct
49 Correct 2 ms 724 KB Output is correct
50 Correct 1 ms 596 KB Output is correct
51 Correct 1 ms 468 KB Output is correct
52 Correct 1 ms 468 KB Output is correct
53 Correct 1 ms 340 KB Output is correct
54 Correct 1 ms 340 KB Output is correct
55 Correct 1 ms 340 KB Output is correct
56 Correct 1 ms 468 KB Output is correct
57 Correct 1 ms 340 KB Output is correct
58 Correct 1 ms 468 KB Output is correct
59 Correct 1 ms 340 KB Output is correct
60 Correct 2 ms 468 KB Output is correct
61 Correct 1 ms 340 KB Output is correct
62 Correct 1 ms 468 KB Output is correct
63 Correct 11 ms 1876 KB Output is correct
64 Correct 3 ms 980 KB Output is correct
65 Correct 2 ms 852 KB Output is correct
66 Correct 2 ms 724 KB Output is correct
67 Correct 1 ms 724 KB Output is correct
68 Correct 1 ms 468 KB Output is correct
69 Correct 1 ms 468 KB Output is correct
70 Correct 1 ms 468 KB Output is correct
71 Correct 1 ms 468 KB Output is correct
72 Correct 1 ms 468 KB Output is correct
73 Correct 1 ms 468 KB Output is correct
74 Correct 1 ms 468 KB Output is correct
75 Correct 1 ms 468 KB Output is correct
76 Correct 1 ms 468 KB Output is correct
77 Correct 1 ms 468 KB Output is correct
78 Correct 1 ms 468 KB Output is correct
79 Correct 1 ms 468 KB Output is correct
80 Correct 26 ms 4820 KB Output is correct
81 Correct 18 ms 2132 KB Output is correct
82 Correct 57 ms 6108 KB Output is correct
83 Correct 29 ms 3736 KB Output is correct
84 Correct 48 ms 5404 KB Output is correct
85 Correct 7 ms 1492 KB Output is correct
86 Correct 8 ms 1748 KB Output is correct
87 Correct 9 ms 1620 KB Output is correct
88 Correct 4 ms 1108 KB Output is correct
89 Correct 9 ms 1596 KB Output is correct
90 Correct 6 ms 1268 KB Output is correct
91 Correct 34 ms 7624 KB Output is correct
92 Correct 37 ms 8928 KB Output is correct
93 Correct 55 ms 10056 KB Output is correct
94 Correct 115 ms 9856 KB Output is correct
95 Correct 101 ms 9816 KB Output is correct
96 Correct 90 ms 9856 KB Output is correct
97 Correct 86 ms 9860 KB Output is correct
98 Correct 94 ms 9960 KB Output is correct
99 Correct 11 ms 2004 KB Output is correct
100 Correct 10 ms 2032 KB Output is correct
101 Correct 11 ms 1976 KB Output is correct
102 Correct 13 ms 2004 KB Output is correct
103 Correct 10 ms 1952 KB Output is correct
104 Correct 10 ms 2020 KB Output is correct
105 Correct 63 ms 10628 KB Output is correct
106 Correct 62 ms 10636 KB Output is correct
107 Correct 68 ms 10656 KB Output is correct
108 Correct 22 ms 8400 KB Output is correct
109 Runtime error 1327 ms 524288 KB Execution killed with signal 9
110 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 212 KB Output is correct
2 Correct 1 ms 212 KB Output is correct
3 Correct 1 ms 212 KB Output is correct
4 Correct 0 ms 212 KB Output is correct
5 Correct 0 ms 212 KB Output is correct
6 Correct 0 ms 212 KB Output is correct
7 Correct 1 ms 212 KB Output is correct
8 Correct 0 ms 212 KB Output is correct
9 Correct 1 ms 340 KB Output is correct
10 Correct 1 ms 340 KB Output is correct
11 Correct 1 ms 340 KB Output is correct
12 Correct 1 ms 340 KB Output is correct
13 Correct 1 ms 340 KB Output is correct
14 Correct 1 ms 340 KB Output is correct
15 Correct 1 ms 468 KB Output is correct
16 Correct 1 ms 468 KB Output is correct
17 Correct 1 ms 468 KB Output is correct
18 Correct 1 ms 468 KB Output is correct
19 Correct 3 ms 468 KB Output is correct
20 Correct 1 ms 468 KB Output is correct
21 Correct 1 ms 468 KB Output is correct
22 Correct 1 ms 468 KB Output is correct
23 Correct 1 ms 468 KB Output is correct
24 Correct 51 ms 12108 KB Output is correct
25 Correct 51 ms 12140 KB Output is correct
26 Correct 49 ms 12028 KB Output is correct
27 Correct 17 ms 6428 KB Output is correct
28 Correct 18 ms 6368 KB Output is correct
29 Correct 15 ms 5264 KB Output is correct
30 Correct 20 ms 4840 KB Output is correct
31 Correct 14 ms 4692 KB Output is correct
32 Correct 16 ms 4692 KB Output is correct
33 Correct 51 ms 8796 KB Output is correct
34 Correct 43 ms 9084 KB Output is correct
35 Correct 43 ms 9036 KB Output is correct
36 Correct 43 ms 9020 KB Output is correct
37 Correct 44 ms 9052 KB Output is correct
38 Correct 44 ms 9088 KB Output is correct
39 Correct 113 ms 17100 KB Output is correct
40 Correct 112 ms 17152 KB Output is correct
41 Correct 107 ms 17072 KB Output is correct
42 Correct 84 ms 28424 KB Output is correct
43 Correct 53 ms 17880 KB Output is correct
44 Correct 73 ms 25164 KB Output is correct
45 Correct 43 ms 15368 KB Output is correct
46 Correct 46 ms 13576 KB Output is correct
47 Correct 88 ms 22272 KB Output is correct
48 Correct 184 ms 40880 KB Output is correct
49 Correct 126 ms 25816 KB Output is correct
50 Correct 99 ms 27428 KB Output is correct
51 Correct 119 ms 28056 KB Output is correct
52 Correct 131 ms 29784 KB Output is correct
53 Correct 144 ms 27132 KB Output is correct
54 Correct 122 ms 31320 KB Output is correct
55 Correct 99 ms 31460 KB Output is correct
56 Correct 79 ms 25508 KB Output is correct
57 Correct 68 ms 23200 KB Output is correct
58 Correct 90 ms 22544 KB Output is correct
59 Correct 97 ms 22348 KB Output is correct
60 Correct 233 ms 46864 KB Output is correct
61 Correct 228 ms 46924 KB Output is correct
62 Correct 246 ms 47072 KB Output is correct
63 Correct 239 ms 46928 KB Output is correct
64 Correct 228 ms 46860 KB Output is correct
65 Correct 316 ms 46936 KB Output is correct
66 Correct 198 ms 39108 KB Output is correct
67 Correct 181 ms 39100 KB Output is correct
68 Correct 205 ms 39076 KB Output is correct
69 Correct 0 ms 212 KB Output is correct
70 Correct 1 ms 212 KB Output is correct
71 Correct 0 ms 212 KB Output is correct
72 Correct 1 ms 340 KB Output is correct
73 Correct 6 ms 1204 KB Output is correct
74 Correct 1 ms 596 KB Output is correct
75 Correct 2 ms 596 KB Output is correct
76 Correct 2 ms 724 KB Output is correct
77 Correct 1 ms 596 KB Output is correct
78 Correct 1 ms 468 KB Output is correct
79 Correct 1 ms 468 KB Output is correct
80 Correct 1 ms 340 KB Output is correct
81 Correct 1 ms 340 KB Output is correct
82 Correct 1 ms 340 KB Output is correct
83 Correct 1 ms 468 KB Output is correct
84 Correct 1 ms 340 KB Output is correct
85 Correct 1 ms 468 KB Output is correct
86 Correct 1 ms 340 KB Output is correct
87 Correct 2 ms 468 KB Output is correct
88 Correct 1 ms 340 KB Output is correct
89 Correct 1 ms 468 KB Output is correct
90 Correct 11 ms 1876 KB Output is correct
91 Correct 3 ms 980 KB Output is correct
92 Correct 2 ms 852 KB Output is correct
93 Correct 2 ms 724 KB Output is correct
94 Correct 1 ms 724 KB Output is correct
95 Correct 1 ms 468 KB Output is correct
96 Correct 1 ms 468 KB Output is correct
97 Correct 1 ms 468 KB Output is correct
98 Correct 1 ms 468 KB Output is correct
99 Correct 1 ms 468 KB Output is correct
100 Correct 1 ms 468 KB Output is correct
101 Correct 1 ms 468 KB Output is correct
102 Correct 1 ms 468 KB Output is correct
103 Correct 1 ms 468 KB Output is correct
104 Correct 1 ms 468 KB Output is correct
105 Correct 1 ms 468 KB Output is correct
106 Correct 1 ms 468 KB Output is correct
107 Correct 26 ms 4820 KB Output is correct
108 Correct 18 ms 2132 KB Output is correct
109 Correct 57 ms 6108 KB Output is correct
110 Correct 29 ms 3736 KB Output is correct
111 Correct 48 ms 5404 KB Output is correct
112 Correct 7 ms 1492 KB Output is correct
113 Correct 8 ms 1748 KB Output is correct
114 Correct 9 ms 1620 KB Output is correct
115 Correct 4 ms 1108 KB Output is correct
116 Correct 9 ms 1596 KB Output is correct
117 Correct 6 ms 1268 KB Output is correct
118 Correct 34 ms 7624 KB Output is correct
119 Correct 37 ms 8928 KB Output is correct
120 Correct 55 ms 10056 KB Output is correct
121 Correct 115 ms 9856 KB Output is correct
122 Correct 101 ms 9816 KB Output is correct
123 Correct 90 ms 9856 KB Output is correct
124 Correct 86 ms 9860 KB Output is correct
125 Correct 94 ms 9960 KB Output is correct
126 Correct 11 ms 2004 KB Output is correct
127 Correct 10 ms 2032 KB Output is correct
128 Correct 11 ms 1976 KB Output is correct
129 Correct 13 ms 2004 KB Output is correct
130 Correct 10 ms 1952 KB Output is correct
131 Correct 10 ms 2020 KB Output is correct
132 Correct 63 ms 10628 KB Output is correct
133 Correct 62 ms 10636 KB Output is correct
134 Correct 68 ms 10656 KB Output is correct
135 Correct 22 ms 8400 KB Output is correct
136 Runtime error 1327 ms 524288 KB Execution killed with signal 9
137 Halted 0 ms 0 KB -