Submission #386288

# Submission time Handle Problem Language Result Execution time Memory
386288 2021-04-06T09:42:25 Z model_code Food Court (JOI21_foodcourt) C++17
100 / 100
509 ms 52640 KB
// https://raw.githubusercontent.com/koosaga/olympiad/master/JOI/camp21_foodcourt.cpp

#include <bits/stdc++.h>
#define sz(v) ((int)(v).size())
#define all(v) (v).begin(), (v).end()
using namespace std;
using lint = long long;
using pi = pair<lint, lint>;
const int MAXN = 250005;
const int MAXT = 530000;

struct fen{
	lint tree[MAXN];
	void add(int x, lint v){
		for(int i = x; i < MAXN; i += i & -i) tree[i] += v;
	}
	lint query(int x){
		lint ret = 0;
		for(int i = x; i; i -= i & -i) ret += tree[i];
		return ret;
	}
	int kth(lint val){
		int pos = 0;
		for(int i = 17; i >= 0; i--){
			if(pos + (1<<i) < MAXN && tree[pos + (1<<i)] < val){
				pos += (1<<i);
				val -= tree[pos];
			}
		}
		return pos + 1;
	}
}fen;

struct seg{
	struct node{
		lint smax, sum;
		node operator+(const node &n)const{
			node ret = {max(smax + n.sum, n.smax), sum + n.sum};
			return ret;
		}
	}tree[MAXT];
	int lim;
	void init(int n){
		for(lim = 1; lim <= n; lim <<= 1);
	}
	void upd(int x, lint v){
		x += lim;
		tree[x] = (node){max(0ll, v), v};
		while(x > 1){
			x >>= 1;
			tree[x] = tree[2*x] + tree[2*x+1];
		}
	}
	node query(int s, int e){
		s += lim;
		e += lim;
		node l = {0, 0}, r = {0, 0};
		while(s < e){
			if(s%2 == 1) l = l + tree[s++];
			if(e%2 == 0) r = tree[e--] + r;
			s >>= 1;
			e >>= 1;
		}
		if(s == e) l = l + tree[s];
		return l + r;
	}
}seg;

int n, q;

vector<pi> quer[MAXN], upd[MAXN], fwupd[MAXN];
lint mp[MAXN];
lint ret[MAXN];
lint prv[MAXN];

int main(){
	memset(ret, -1, sizeof(ret));
	scanf("%d %*d %d",&n,&q);
	for(int i = 1; i <= q; i++){
		int t; scanf("%d",&t);
		if(t == 3){
			lint a, b;
			scanf("%lld %lld",&a,&b);
			quer[a].emplace_back(i, b);
		}
		if(t == 2){
			lint l, r, k;
			scanf("%lld %lld %lld",&l,&r,&k);
			upd[l].emplace_back(i, -k);
			upd[r + 1].emplace_back(i, 0);
		}
		if(t == 1){
			lint l, r, c, k;
			scanf("%lld %lld %lld %lld",&l,&r,&c,&k);
			mp[i] = c;
			upd[l].emplace_back(i, k);
			upd[r + 1].emplace_back(i, 0);
			fwupd[l].emplace_back(i, k);
			fwupd[r + 1].emplace_back(i, -k);
		}
	}
	seg.init(q);
	for(int i = 1; i <= n; i++){
		for(auto &[pos, val] : upd[i]){
			seg.upd(pos, val);
		}
		for(auto &[pos, val] : fwupd[i]){
			fen.add(pos, val);
		}
		for(auto &[pos, val] : quer[i]){
			auto cur_ppl = seg.query(1, pos);
			if(cur_ppl.smax >= val){
				lint kth = fen.query(pos) - (cur_ppl.smax - val);
				ret[pos] = mp[fen.kth(kth)];
			}
			else{
				ret[pos] = 0;
			}
		}
	}
	for(int i = 1; i <= q; i++){
		if(~ret[i]) printf("%lld\n", ret[i]);
	}
}

Compilation message

foodcourt.cpp: In function 'int main()':
foodcourt.cpp:78:7: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
   78 |  scanf("%d %*d %d",&n,&q);
      |  ~~~~~^~~~~~~~~~~~~~~~~~~
foodcourt.cpp:80:15: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
   80 |   int t; scanf("%d",&t);
      |          ~~~~~^~~~~~~~~
foodcourt.cpp:83:9: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
   83 |    scanf("%lld %lld",&a,&b);
      |    ~~~~~^~~~~~~~~~~~~~~~~~~
foodcourt.cpp:88:9: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
   88 |    scanf("%lld %lld %lld",&l,&r,&k);
      |    ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~
foodcourt.cpp:94:9: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
   94 |    scanf("%lld %lld %lld %lld",&l,&r,&c,&k);
      |    ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# Verdict Execution time Memory Grader output
1 Correct 15 ms 20076 KB Output is correct
2 Correct 14 ms 20204 KB Output is correct
3 Correct 14 ms 20076 KB Output is correct
4 Correct 14 ms 20204 KB Output is correct
5 Correct 13 ms 20204 KB Output is correct
6 Correct 13 ms 20076 KB Output is correct
7 Correct 14 ms 20204 KB Output is correct
8 Correct 15 ms 20204 KB Output is correct
9 Correct 14 ms 20204 KB Output is correct
10 Correct 14 ms 20204 KB Output is correct
11 Correct 14 ms 20204 KB Output is correct
12 Correct 14 ms 20204 KB Output is correct
13 Correct 14 ms 20204 KB Output is correct
14 Correct 14 ms 20204 KB Output is correct
15 Correct 13 ms 20076 KB Output is correct
16 Correct 14 ms 20204 KB Output is correct
17 Correct 14 ms 20076 KB Output is correct
18 Correct 15 ms 20204 KB Output is correct
19 Correct 14 ms 20204 KB Output is correct
20 Correct 14 ms 20204 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 15 ms 20076 KB Output is correct
2 Correct 14 ms 20204 KB Output is correct
3 Correct 14 ms 20076 KB Output is correct
4 Correct 14 ms 20204 KB Output is correct
5 Correct 13 ms 20204 KB Output is correct
6 Correct 13 ms 20076 KB Output is correct
7 Correct 14 ms 20204 KB Output is correct
8 Correct 15 ms 20204 KB Output is correct
9 Correct 14 ms 20204 KB Output is correct
10 Correct 14 ms 20204 KB Output is correct
11 Correct 14 ms 20204 KB Output is correct
12 Correct 14 ms 20204 KB Output is correct
13 Correct 14 ms 20204 KB Output is correct
14 Correct 14 ms 20204 KB Output is correct
15 Correct 13 ms 20076 KB Output is correct
16 Correct 14 ms 20204 KB Output is correct
17 Correct 14 ms 20076 KB Output is correct
18 Correct 15 ms 20204 KB Output is correct
19 Correct 14 ms 20204 KB Output is correct
20 Correct 14 ms 20204 KB Output is correct
21 Correct 14 ms 20204 KB Output is correct
22 Correct 14 ms 20204 KB Output is correct
23 Correct 14 ms 20204 KB Output is correct
24 Correct 15 ms 20204 KB Output is correct
25 Correct 14 ms 20204 KB Output is correct
26 Correct 14 ms 20204 KB Output is correct
27 Correct 14 ms 20204 KB Output is correct
28 Correct 14 ms 20204 KB Output is correct
29 Correct 15 ms 20204 KB Output is correct
30 Correct 17 ms 20204 KB Output is correct
31 Correct 17 ms 20204 KB Output is correct
32 Correct 14 ms 20204 KB Output is correct
33 Correct 14 ms 20076 KB Output is correct
34 Correct 14 ms 20204 KB Output is correct
35 Correct 14 ms 20204 KB Output is correct
36 Correct 15 ms 20204 KB Output is correct
37 Correct 14 ms 20204 KB Output is correct
38 Correct 15 ms 20204 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 95 ms 27116 KB Output is correct
2 Correct 96 ms 27756 KB Output is correct
3 Correct 92 ms 27136 KB Output is correct
4 Correct 86 ms 27116 KB Output is correct
5 Correct 95 ms 27756 KB Output is correct
6 Correct 92 ms 27736 KB Output is correct
7 Correct 50 ms 25408 KB Output is correct
8 Correct 51 ms 25808 KB Output is correct
9 Correct 97 ms 27116 KB Output is correct
10 Correct 97 ms 27372 KB Output is correct
11 Correct 99 ms 27192 KB Output is correct
12 Correct 89 ms 27392 KB Output is correct
13 Correct 80 ms 26860 KB Output is correct
14 Correct 95 ms 27756 KB Output is correct
15 Correct 103 ms 28780 KB Output is correct
16 Correct 102 ms 28908 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 419 ms 45292 KB Output is correct
2 Correct 341 ms 40428 KB Output is correct
3 Correct 445 ms 47660 KB Output is correct
4 Correct 355 ms 42092 KB Output is correct
5 Correct 359 ms 42176 KB Output is correct
6 Correct 479 ms 49900 KB Output is correct
7 Correct 178 ms 42856 KB Output is correct
8 Correct 187 ms 43452 KB Output is correct
9 Correct 482 ms 48616 KB Output is correct
10 Correct 509 ms 48640 KB Output is correct
11 Correct 458 ms 46464 KB Output is correct
12 Correct 468 ms 48364 KB Output is correct
13 Correct 493 ms 46792 KB Output is correct
14 Correct 478 ms 48456 KB Output is correct
15 Correct 489 ms 48352 KB Output is correct
16 Correct 466 ms 48364 KB Output is correct
17 Correct 466 ms 48492 KB Output is correct
18 Correct 480 ms 47340 KB Output is correct
19 Correct 469 ms 48364 KB Output is correct
20 Correct 461 ms 47584 KB Output is correct
21 Correct 463 ms 48364 KB Output is correct
22 Correct 452 ms 48492 KB Output is correct
23 Correct 476 ms 48364 KB Output is correct
24 Correct 455 ms 48492 KB Output is correct
25 Correct 311 ms 47208 KB Output is correct
26 Correct 329 ms 47852 KB Output is correct
27 Correct 381 ms 52388 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 15 ms 20076 KB Output is correct
2 Correct 14 ms 20204 KB Output is correct
3 Correct 14 ms 20076 KB Output is correct
4 Correct 14 ms 20204 KB Output is correct
5 Correct 13 ms 20204 KB Output is correct
6 Correct 13 ms 20076 KB Output is correct
7 Correct 14 ms 20204 KB Output is correct
8 Correct 15 ms 20204 KB Output is correct
9 Correct 14 ms 20204 KB Output is correct
10 Correct 14 ms 20204 KB Output is correct
11 Correct 14 ms 20204 KB Output is correct
12 Correct 14 ms 20204 KB Output is correct
13 Correct 14 ms 20204 KB Output is correct
14 Correct 14 ms 20204 KB Output is correct
15 Correct 13 ms 20076 KB Output is correct
16 Correct 14 ms 20204 KB Output is correct
17 Correct 14 ms 20076 KB Output is correct
18 Correct 15 ms 20204 KB Output is correct
19 Correct 14 ms 20204 KB Output is correct
20 Correct 14 ms 20204 KB Output is correct
21 Correct 95 ms 27116 KB Output is correct
22 Correct 96 ms 27756 KB Output is correct
23 Correct 92 ms 27136 KB Output is correct
24 Correct 86 ms 27116 KB Output is correct
25 Correct 95 ms 27756 KB Output is correct
26 Correct 92 ms 27736 KB Output is correct
27 Correct 50 ms 25408 KB Output is correct
28 Correct 51 ms 25808 KB Output is correct
29 Correct 97 ms 27116 KB Output is correct
30 Correct 97 ms 27372 KB Output is correct
31 Correct 99 ms 27192 KB Output is correct
32 Correct 89 ms 27392 KB Output is correct
33 Correct 80 ms 26860 KB Output is correct
34 Correct 95 ms 27756 KB Output is correct
35 Correct 103 ms 28780 KB Output is correct
36 Correct 102 ms 28908 KB Output is correct
37 Correct 86 ms 26440 KB Output is correct
38 Correct 83 ms 26220 KB Output is correct
39 Correct 44 ms 24872 KB Output is correct
40 Correct 50 ms 25736 KB Output is correct
41 Correct 96 ms 26988 KB Output is correct
42 Correct 91 ms 27372 KB Output is correct
43 Correct 102 ms 27328 KB Output is correct
44 Correct 103 ms 27080 KB Output is correct
45 Correct 107 ms 27372 KB Output is correct
46 Correct 96 ms 27372 KB Output is correct
47 Correct 62 ms 26196 KB Output is correct
48 Correct 73 ms 27244 KB Output is correct
49 Correct 70 ms 25324 KB Output is correct
50 Correct 82 ms 26348 KB Output is correct
51 Correct 100 ms 27500 KB Output is correct
52 Correct 118 ms 27628 KB Output is correct
53 Correct 87 ms 27244 KB Output is correct
54 Correct 113 ms 28908 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 94 ms 26736 KB Output is correct
2 Correct 100 ms 27400 KB Output is correct
3 Correct 107 ms 27684 KB Output is correct
4 Correct 76 ms 25452 KB Output is correct
5 Correct 107 ms 26604 KB Output is correct
6 Correct 111 ms 27520 KB Output is correct
7 Correct 55 ms 25412 KB Output is correct
8 Correct 59 ms 25032 KB Output is correct
9 Correct 72 ms 26064 KB Output is correct
10 Correct 73 ms 25200 KB Output is correct
11 Correct 82 ms 26860 KB Output is correct
12 Correct 88 ms 26860 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 15 ms 20076 KB Output is correct
2 Correct 14 ms 20204 KB Output is correct
3 Correct 14 ms 20076 KB Output is correct
4 Correct 14 ms 20204 KB Output is correct
5 Correct 13 ms 20204 KB Output is correct
6 Correct 13 ms 20076 KB Output is correct
7 Correct 14 ms 20204 KB Output is correct
8 Correct 15 ms 20204 KB Output is correct
9 Correct 14 ms 20204 KB Output is correct
10 Correct 14 ms 20204 KB Output is correct
11 Correct 14 ms 20204 KB Output is correct
12 Correct 14 ms 20204 KB Output is correct
13 Correct 14 ms 20204 KB Output is correct
14 Correct 14 ms 20204 KB Output is correct
15 Correct 13 ms 20076 KB Output is correct
16 Correct 14 ms 20204 KB Output is correct
17 Correct 14 ms 20076 KB Output is correct
18 Correct 15 ms 20204 KB Output is correct
19 Correct 14 ms 20204 KB Output is correct
20 Correct 14 ms 20204 KB Output is correct
21 Correct 14 ms 20204 KB Output is correct
22 Correct 14 ms 20204 KB Output is correct
23 Correct 14 ms 20204 KB Output is correct
24 Correct 15 ms 20204 KB Output is correct
25 Correct 14 ms 20204 KB Output is correct
26 Correct 14 ms 20204 KB Output is correct
27 Correct 14 ms 20204 KB Output is correct
28 Correct 14 ms 20204 KB Output is correct
29 Correct 15 ms 20204 KB Output is correct
30 Correct 17 ms 20204 KB Output is correct
31 Correct 17 ms 20204 KB Output is correct
32 Correct 14 ms 20204 KB Output is correct
33 Correct 14 ms 20076 KB Output is correct
34 Correct 14 ms 20204 KB Output is correct
35 Correct 14 ms 20204 KB Output is correct
36 Correct 15 ms 20204 KB Output is correct
37 Correct 14 ms 20204 KB Output is correct
38 Correct 15 ms 20204 KB Output is correct
39 Correct 95 ms 27116 KB Output is correct
40 Correct 96 ms 27756 KB Output is correct
41 Correct 92 ms 27136 KB Output is correct
42 Correct 86 ms 27116 KB Output is correct
43 Correct 95 ms 27756 KB Output is correct
44 Correct 92 ms 27736 KB Output is correct
45 Correct 50 ms 25408 KB Output is correct
46 Correct 51 ms 25808 KB Output is correct
47 Correct 97 ms 27116 KB Output is correct
48 Correct 97 ms 27372 KB Output is correct
49 Correct 99 ms 27192 KB Output is correct
50 Correct 89 ms 27392 KB Output is correct
51 Correct 80 ms 26860 KB Output is correct
52 Correct 95 ms 27756 KB Output is correct
53 Correct 103 ms 28780 KB Output is correct
54 Correct 102 ms 28908 KB Output is correct
55 Correct 86 ms 26440 KB Output is correct
56 Correct 83 ms 26220 KB Output is correct
57 Correct 44 ms 24872 KB Output is correct
58 Correct 50 ms 25736 KB Output is correct
59 Correct 96 ms 26988 KB Output is correct
60 Correct 91 ms 27372 KB Output is correct
61 Correct 102 ms 27328 KB Output is correct
62 Correct 103 ms 27080 KB Output is correct
63 Correct 107 ms 27372 KB Output is correct
64 Correct 96 ms 27372 KB Output is correct
65 Correct 62 ms 26196 KB Output is correct
66 Correct 73 ms 27244 KB Output is correct
67 Correct 70 ms 25324 KB Output is correct
68 Correct 82 ms 26348 KB Output is correct
69 Correct 100 ms 27500 KB Output is correct
70 Correct 118 ms 27628 KB Output is correct
71 Correct 87 ms 27244 KB Output is correct
72 Correct 113 ms 28908 KB Output is correct
73 Correct 94 ms 26736 KB Output is correct
74 Correct 100 ms 27400 KB Output is correct
75 Correct 107 ms 27684 KB Output is correct
76 Correct 76 ms 25452 KB Output is correct
77 Correct 107 ms 26604 KB Output is correct
78 Correct 111 ms 27520 KB Output is correct
79 Correct 55 ms 25412 KB Output is correct
80 Correct 59 ms 25032 KB Output is correct
81 Correct 72 ms 26064 KB Output is correct
82 Correct 73 ms 25200 KB Output is correct
83 Correct 82 ms 26860 KB Output is correct
84 Correct 88 ms 26860 KB Output is correct
85 Correct 110 ms 26476 KB Output is correct
86 Correct 114 ms 27176 KB Output is correct
87 Correct 92 ms 26860 KB Output is correct
88 Correct 116 ms 27756 KB Output is correct
89 Correct 62 ms 24684 KB Output is correct
90 Correct 121 ms 27440 KB Output is correct
91 Correct 76 ms 26092 KB Output is correct
92 Correct 73 ms 25708 KB Output is correct
93 Correct 113 ms 27344 KB Output is correct
94 Correct 107 ms 27244 KB Output is correct
95 Correct 107 ms 27244 KB Output is correct
96 Correct 97 ms 27372 KB Output is correct
97 Correct 108 ms 27372 KB Output is correct
98 Correct 81 ms 26280 KB Output is correct
99 Correct 64 ms 25800 KB Output is correct
100 Correct 68 ms 25708 KB Output is correct
101 Correct 77 ms 27244 KB Output is correct
102 Correct 103 ms 28416 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 15 ms 20076 KB Output is correct
2 Correct 14 ms 20204 KB Output is correct
3 Correct 14 ms 20076 KB Output is correct
4 Correct 14 ms 20204 KB Output is correct
5 Correct 13 ms 20204 KB Output is correct
6 Correct 13 ms 20076 KB Output is correct
7 Correct 14 ms 20204 KB Output is correct
8 Correct 15 ms 20204 KB Output is correct
9 Correct 14 ms 20204 KB Output is correct
10 Correct 14 ms 20204 KB Output is correct
11 Correct 14 ms 20204 KB Output is correct
12 Correct 14 ms 20204 KB Output is correct
13 Correct 14 ms 20204 KB Output is correct
14 Correct 14 ms 20204 KB Output is correct
15 Correct 13 ms 20076 KB Output is correct
16 Correct 14 ms 20204 KB Output is correct
17 Correct 14 ms 20076 KB Output is correct
18 Correct 15 ms 20204 KB Output is correct
19 Correct 14 ms 20204 KB Output is correct
20 Correct 14 ms 20204 KB Output is correct
21 Correct 14 ms 20204 KB Output is correct
22 Correct 14 ms 20204 KB Output is correct
23 Correct 14 ms 20204 KB Output is correct
24 Correct 15 ms 20204 KB Output is correct
25 Correct 14 ms 20204 KB Output is correct
26 Correct 14 ms 20204 KB Output is correct
27 Correct 14 ms 20204 KB Output is correct
28 Correct 14 ms 20204 KB Output is correct
29 Correct 15 ms 20204 KB Output is correct
30 Correct 17 ms 20204 KB Output is correct
31 Correct 17 ms 20204 KB Output is correct
32 Correct 14 ms 20204 KB Output is correct
33 Correct 14 ms 20076 KB Output is correct
34 Correct 14 ms 20204 KB Output is correct
35 Correct 14 ms 20204 KB Output is correct
36 Correct 15 ms 20204 KB Output is correct
37 Correct 14 ms 20204 KB Output is correct
38 Correct 15 ms 20204 KB Output is correct
39 Correct 95 ms 27116 KB Output is correct
40 Correct 96 ms 27756 KB Output is correct
41 Correct 92 ms 27136 KB Output is correct
42 Correct 86 ms 27116 KB Output is correct
43 Correct 95 ms 27756 KB Output is correct
44 Correct 92 ms 27736 KB Output is correct
45 Correct 50 ms 25408 KB Output is correct
46 Correct 51 ms 25808 KB Output is correct
47 Correct 97 ms 27116 KB Output is correct
48 Correct 97 ms 27372 KB Output is correct
49 Correct 99 ms 27192 KB Output is correct
50 Correct 89 ms 27392 KB Output is correct
51 Correct 80 ms 26860 KB Output is correct
52 Correct 95 ms 27756 KB Output is correct
53 Correct 103 ms 28780 KB Output is correct
54 Correct 102 ms 28908 KB Output is correct
55 Correct 419 ms 45292 KB Output is correct
56 Correct 341 ms 40428 KB Output is correct
57 Correct 445 ms 47660 KB Output is correct
58 Correct 355 ms 42092 KB Output is correct
59 Correct 359 ms 42176 KB Output is correct
60 Correct 479 ms 49900 KB Output is correct
61 Correct 178 ms 42856 KB Output is correct
62 Correct 187 ms 43452 KB Output is correct
63 Correct 482 ms 48616 KB Output is correct
64 Correct 509 ms 48640 KB Output is correct
65 Correct 458 ms 46464 KB Output is correct
66 Correct 468 ms 48364 KB Output is correct
67 Correct 493 ms 46792 KB Output is correct
68 Correct 478 ms 48456 KB Output is correct
69 Correct 489 ms 48352 KB Output is correct
70 Correct 466 ms 48364 KB Output is correct
71 Correct 466 ms 48492 KB Output is correct
72 Correct 480 ms 47340 KB Output is correct
73 Correct 469 ms 48364 KB Output is correct
74 Correct 461 ms 47584 KB Output is correct
75 Correct 463 ms 48364 KB Output is correct
76 Correct 452 ms 48492 KB Output is correct
77 Correct 476 ms 48364 KB Output is correct
78 Correct 455 ms 48492 KB Output is correct
79 Correct 311 ms 47208 KB Output is correct
80 Correct 329 ms 47852 KB Output is correct
81 Correct 381 ms 52388 KB Output is correct
82 Correct 86 ms 26440 KB Output is correct
83 Correct 83 ms 26220 KB Output is correct
84 Correct 44 ms 24872 KB Output is correct
85 Correct 50 ms 25736 KB Output is correct
86 Correct 96 ms 26988 KB Output is correct
87 Correct 91 ms 27372 KB Output is correct
88 Correct 102 ms 27328 KB Output is correct
89 Correct 103 ms 27080 KB Output is correct
90 Correct 107 ms 27372 KB Output is correct
91 Correct 96 ms 27372 KB Output is correct
92 Correct 62 ms 26196 KB Output is correct
93 Correct 73 ms 27244 KB Output is correct
94 Correct 70 ms 25324 KB Output is correct
95 Correct 82 ms 26348 KB Output is correct
96 Correct 100 ms 27500 KB Output is correct
97 Correct 118 ms 27628 KB Output is correct
98 Correct 87 ms 27244 KB Output is correct
99 Correct 113 ms 28908 KB Output is correct
100 Correct 94 ms 26736 KB Output is correct
101 Correct 100 ms 27400 KB Output is correct
102 Correct 107 ms 27684 KB Output is correct
103 Correct 76 ms 25452 KB Output is correct
104 Correct 107 ms 26604 KB Output is correct
105 Correct 111 ms 27520 KB Output is correct
106 Correct 55 ms 25412 KB Output is correct
107 Correct 59 ms 25032 KB Output is correct
108 Correct 72 ms 26064 KB Output is correct
109 Correct 73 ms 25200 KB Output is correct
110 Correct 82 ms 26860 KB Output is correct
111 Correct 88 ms 26860 KB Output is correct
112 Correct 110 ms 26476 KB Output is correct
113 Correct 114 ms 27176 KB Output is correct
114 Correct 92 ms 26860 KB Output is correct
115 Correct 116 ms 27756 KB Output is correct
116 Correct 62 ms 24684 KB Output is correct
117 Correct 121 ms 27440 KB Output is correct
118 Correct 76 ms 26092 KB Output is correct
119 Correct 73 ms 25708 KB Output is correct
120 Correct 113 ms 27344 KB Output is correct
121 Correct 107 ms 27244 KB Output is correct
122 Correct 107 ms 27244 KB Output is correct
123 Correct 97 ms 27372 KB Output is correct
124 Correct 108 ms 27372 KB Output is correct
125 Correct 81 ms 26280 KB Output is correct
126 Correct 64 ms 25800 KB Output is correct
127 Correct 68 ms 25708 KB Output is correct
128 Correct 77 ms 27244 KB Output is correct
129 Correct 103 ms 28416 KB Output is correct
130 Correct 467 ms 47724 KB Output is correct
131 Correct 324 ms 40300 KB Output is correct
132 Correct 449 ms 47852 KB Output is correct
133 Correct 456 ms 48748 KB Output is correct
134 Correct 428 ms 45748 KB Output is correct
135 Correct 497 ms 50128 KB Output is correct
136 Correct 492 ms 49092 KB Output is correct
137 Correct 503 ms 49152 KB Output is correct
138 Correct 470 ms 46644 KB Output is correct
139 Correct 468 ms 48472 KB Output is correct
140 Correct 486 ms 47128 KB Output is correct
141 Correct 502 ms 48548 KB Output is correct
142 Correct 480 ms 48640 KB Output is correct
143 Correct 487 ms 48548 KB Output is correct
144 Correct 453 ms 47596 KB Output is correct
145 Correct 460 ms 48616 KB Output is correct
146 Correct 488 ms 47956 KB Output is correct
147 Correct 483 ms 48576 KB Output is correct
148 Correct 486 ms 48492 KB Output is correct
149 Correct 468 ms 48512 KB Output is correct
150 Correct 252 ms 44096 KB Output is correct
151 Correct 346 ms 47984 KB Output is correct
152 Correct 365 ms 47980 KB Output is correct
153 Correct 386 ms 52640 KB Output is correct