답안 #688065

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
688065 2023-01-27T06:29:19 Z arnold518 푸드 코트 (JOI21_foodcourt) C++17
100 / 100
775 ms 37992 KB
#include <bits/stdc++.h>
using namespace std;

typedef long long ll;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;

const int MAXN = 25e4;

int N, M, Q;
int ans[MAXN+10];
pll B[MAXN+10];
vector<int> A[MAXN+10];

struct SEG
{
	pll tree[MAXN*4+10];
	void busy(int node, int tl, int tr)
	{
		if(tl!=tr)
		{
			tree[node*2].second=min(tree[node*2].second, tree[node*2].first+tree[node].second);
			tree[node*2].first+=tree[node].first;
			tree[node*2+1].second=min(tree[node*2+1].second, tree[node*2+1].first+tree[node].second);
			tree[node*2+1].first+=tree[node].first;
			tree[node]=pll(0, 0);
		}
	}
	void update(int node, int tl, int tr, int l, int r, ll k)
	{
		busy(node, tl, tr);
		if(l<=tl && tr<=r)
		{
			if(tl!=tr) tree[node]=pll(k, min(0ll, k));
			else
			{
				tree[node].second=min(tree[node].second, tree[node].first+k);
				tree[node].first+=k;
			}
			return;
		}
		if(r<tl || tr<l) return;
		int mid=tl+tr>>1;
		update(node*2, tl, mid, l, r, k);
		update(node*2+1, mid+1, tr, l, r, k);
	}
	ll query(int node, int tl, int tr, int pos)
	{
		busy(node, tl, tr);
		if(tl==tr) return tree[node].first-tree[node].second;
		int mid=tl+tr>>1;
		if(pos<=mid) return query(node*2, tl, mid, pos);
		else return query(node*2+1, mid+1, tr, pos);
	}
}seg, seg2;

struct SEG2
{
	ll tree[MAXN*4+10];
	void update(int node, int tl, int tr, int p, ll k)
	{
		if(tl==tr)
		{
			tree[node]+=k;
			return;
		}
		int mid=tl+tr>>1;
		if(p<=mid) update(node*2, tl, mid, p, k);
		else update(node*2+1, mid+1, tr, p, k);
		tree[node]=tree[node*2]+tree[node*2+1];
	}
	int query(int node, int tl, int tr, ll k)
	{
		if(tl==tr) return tl;
		int mid=tl+tr>>1;
		if(tree[node*2]>=k) return query(node*2, tl, mid, k);
		else return query(node*2+1, mid+1, tr, k-tree[node*2]);
	}
}seg3;

int main()
{
	scanf("%d%d%d", &N, &M, &Q);
	for(int i=1; i<=Q; i++)
	{
		int t, a, b, c, d; ll e;
		scanf("%d", &t);
		ans[i]=-1;
		if(t==1)
		{
			scanf("%d%d%d%d", &a, &b, &c, &d);
			seg.update(1, 1, N, a, b, d);
			seg2.update(1, 1, N, a, b, d);
			B[i]=pll(c, d);
			A[a].push_back(i);
			A[b+1].push_back(-i);
		}
		else if(t==2)
		{
			scanf("%d%d%d", &a, &b, &c);
			seg.update(1, 1, N, a, b, -c);
		}
		else
		{
			scanf("%d%lld", &a, &e);
			ans[i]=0;
			ll t=seg.query(1, 1, N, a);
			if(t>=e)
			{
				B[i]=pll(-1, seg2.query(1, 1, N, a)-(t-e));
				A[a].push_back(i+Q);
			}
		}
	}

	for(int i=1; i<=N; i++)
	{
		sort(A[i].begin(), A[i].end());

		for(auto it : A[i])
		{
			if(it<0) seg3.update(1, 1, Q, -it, -B[-it].second);
			else if(it<=Q) seg3.update(1, 1, Q, it, B[it].second);
			else ans[it-Q]=B[seg3.query(1, 1, Q, B[it-Q].second)].first;
		}
	}

	for(int i=1; i<=Q; i++) if(ans[i]>=0) printf("%d\n", ans[i]);
}

Compilation message

foodcourt.cpp: In member function 'void SEG::update(int, int, int, int, int, ll)':
foodcourt.cpp:43:13: warning: suggest parentheses around '+' inside '>>' [-Wparentheses]
   43 |   int mid=tl+tr>>1;
      |           ~~^~~
foodcourt.cpp: In member function 'll SEG::query(int, int, int, int)':
foodcourt.cpp:51:13: warning: suggest parentheses around '+' inside '>>' [-Wparentheses]
   51 |   int mid=tl+tr>>1;
      |           ~~^~~
foodcourt.cpp: In member function 'void SEG2::update(int, int, int, int, ll)':
foodcourt.cpp:67:13: warning: suggest parentheses around '+' inside '>>' [-Wparentheses]
   67 |   int mid=tl+tr>>1;
      |           ~~^~~
foodcourt.cpp: In member function 'int SEG2::query(int, int, int, ll)':
foodcourt.cpp:75:13: warning: suggest parentheses around '+' inside '>>' [-Wparentheses]
   75 |   int mid=tl+tr>>1;
      |           ~~^~~
foodcourt.cpp: In function 'int main()':
foodcourt.cpp:83:7: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
   83 |  scanf("%d%d%d", &N, &M, &Q);
      |  ~~~~~^~~~~~~~~~~~~~~~~~~~~~
foodcourt.cpp:87:8: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
   87 |   scanf("%d", &t);
      |   ~~~~~^~~~~~~~~~
foodcourt.cpp:91:9: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
   91 |    scanf("%d%d%d%d", &a, &b, &c, &d);
      |    ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~
foodcourt.cpp:100:9: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
  100 |    scanf("%d%d%d", &a, &b, &c);
      |    ~~~~~^~~~~~~~~~~~~~~~~~~~~~
foodcourt.cpp:105:9: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
  105 |    scanf("%d%lld", &a, &e);
      |    ~~~~~^~~~~~~~~~~~~~~~~~
# 결과 실행 시간 메모리 Grader output
1 Correct 5 ms 6356 KB Output is correct
2 Correct 6 ms 6364 KB Output is correct
3 Correct 5 ms 6356 KB Output is correct
4 Correct 5 ms 6356 KB Output is correct
5 Correct 6 ms 6228 KB Output is correct
6 Correct 4 ms 6228 KB Output is correct
7 Correct 5 ms 6440 KB Output is correct
8 Correct 6 ms 6356 KB Output is correct
9 Correct 5 ms 6356 KB Output is correct
10 Correct 6 ms 6356 KB Output is correct
11 Correct 5 ms 6368 KB Output is correct
12 Correct 5 ms 6356 KB Output is correct
13 Correct 4 ms 6360 KB Output is correct
14 Correct 6 ms 6360 KB Output is correct
15 Correct 4 ms 6356 KB Output is correct
16 Correct 5 ms 6356 KB Output is correct
17 Correct 5 ms 6356 KB Output is correct
18 Correct 5 ms 6356 KB Output is correct
19 Correct 5 ms 6460 KB Output is correct
20 Correct 8 ms 6376 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 5 ms 6356 KB Output is correct
2 Correct 6 ms 6364 KB Output is correct
3 Correct 5 ms 6356 KB Output is correct
4 Correct 5 ms 6356 KB Output is correct
5 Correct 6 ms 6228 KB Output is correct
6 Correct 4 ms 6228 KB Output is correct
7 Correct 5 ms 6440 KB Output is correct
8 Correct 6 ms 6356 KB Output is correct
9 Correct 5 ms 6356 KB Output is correct
10 Correct 6 ms 6356 KB Output is correct
11 Correct 5 ms 6368 KB Output is correct
12 Correct 5 ms 6356 KB Output is correct
13 Correct 4 ms 6360 KB Output is correct
14 Correct 6 ms 6360 KB Output is correct
15 Correct 4 ms 6356 KB Output is correct
16 Correct 5 ms 6356 KB Output is correct
17 Correct 5 ms 6356 KB Output is correct
18 Correct 5 ms 6356 KB Output is correct
19 Correct 5 ms 6460 KB Output is correct
20 Correct 8 ms 6376 KB Output is correct
21 Correct 5 ms 6372 KB Output is correct
22 Correct 8 ms 6356 KB Output is correct
23 Correct 8 ms 6484 KB Output is correct
24 Correct 7 ms 6436 KB Output is correct
25 Correct 5 ms 6292 KB Output is correct
26 Correct 4 ms 6228 KB Output is correct
27 Correct 6 ms 6408 KB Output is correct
28 Correct 6 ms 6384 KB Output is correct
29 Correct 5 ms 6356 KB Output is correct
30 Correct 6 ms 6344 KB Output is correct
31 Correct 9 ms 6352 KB Output is correct
32 Correct 5 ms 6356 KB Output is correct
33 Correct 4 ms 6416 KB Output is correct
34 Correct 6 ms 6356 KB Output is correct
35 Correct 6 ms 6388 KB Output is correct
36 Correct 6 ms 6356 KB Output is correct
37 Correct 5 ms 6356 KB Output is correct
38 Correct 6 ms 6356 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 89 ms 13620 KB Output is correct
2 Correct 98 ms 13876 KB Output is correct
3 Correct 95 ms 13616 KB Output is correct
4 Correct 77 ms 13544 KB Output is correct
5 Correct 84 ms 13920 KB Output is correct
6 Correct 96 ms 13884 KB Output is correct
7 Correct 30 ms 8704 KB Output is correct
8 Correct 28 ms 8912 KB Output is correct
9 Correct 80 ms 12876 KB Output is correct
10 Correct 115 ms 13608 KB Output is correct
11 Correct 88 ms 13340 KB Output is correct
12 Correct 91 ms 13704 KB Output is correct
13 Correct 75 ms 13516 KB Output is correct
14 Correct 82 ms 13976 KB Output is correct
15 Correct 106 ms 13872 KB Output is correct
16 Correct 104 ms 14252 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 418 ms 35516 KB Output is correct
2 Correct 319 ms 33812 KB Output is correct
3 Correct 444 ms 36352 KB Output is correct
4 Correct 362 ms 34584 KB Output is correct
5 Correct 439 ms 34272 KB Output is correct
6 Correct 775 ms 37016 KB Output is correct
7 Correct 109 ms 16344 KB Output is correct
8 Correct 113 ms 16364 KB Output is correct
9 Correct 572 ms 37504 KB Output is correct
10 Correct 517 ms 37520 KB Output is correct
11 Correct 539 ms 34188 KB Output is correct
12 Correct 545 ms 36308 KB Output is correct
13 Correct 475 ms 34460 KB Output is correct
14 Correct 660 ms 36280 KB Output is correct
15 Correct 528 ms 36316 KB Output is correct
16 Correct 535 ms 36292 KB Output is correct
17 Correct 513 ms 36232 KB Output is correct
18 Correct 495 ms 35208 KB Output is correct
19 Correct 476 ms 36308 KB Output is correct
20 Correct 469 ms 35504 KB Output is correct
21 Correct 464 ms 36324 KB Output is correct
22 Correct 441 ms 36312 KB Output is correct
23 Correct 479 ms 36240 KB Output is correct
24 Correct 434 ms 36272 KB Output is correct
25 Correct 316 ms 34356 KB Output is correct
26 Correct 321 ms 34436 KB Output is correct
27 Correct 353 ms 36976 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 5 ms 6356 KB Output is correct
2 Correct 6 ms 6364 KB Output is correct
3 Correct 5 ms 6356 KB Output is correct
4 Correct 5 ms 6356 KB Output is correct
5 Correct 6 ms 6228 KB Output is correct
6 Correct 4 ms 6228 KB Output is correct
7 Correct 5 ms 6440 KB Output is correct
8 Correct 6 ms 6356 KB Output is correct
9 Correct 5 ms 6356 KB Output is correct
10 Correct 6 ms 6356 KB Output is correct
11 Correct 5 ms 6368 KB Output is correct
12 Correct 5 ms 6356 KB Output is correct
13 Correct 4 ms 6360 KB Output is correct
14 Correct 6 ms 6360 KB Output is correct
15 Correct 4 ms 6356 KB Output is correct
16 Correct 5 ms 6356 KB Output is correct
17 Correct 5 ms 6356 KB Output is correct
18 Correct 5 ms 6356 KB Output is correct
19 Correct 5 ms 6460 KB Output is correct
20 Correct 8 ms 6376 KB Output is correct
21 Correct 89 ms 13620 KB Output is correct
22 Correct 98 ms 13876 KB Output is correct
23 Correct 95 ms 13616 KB Output is correct
24 Correct 77 ms 13544 KB Output is correct
25 Correct 84 ms 13920 KB Output is correct
26 Correct 96 ms 13884 KB Output is correct
27 Correct 30 ms 8704 KB Output is correct
28 Correct 28 ms 8912 KB Output is correct
29 Correct 80 ms 12876 KB Output is correct
30 Correct 115 ms 13608 KB Output is correct
31 Correct 88 ms 13340 KB Output is correct
32 Correct 91 ms 13704 KB Output is correct
33 Correct 75 ms 13516 KB Output is correct
34 Correct 82 ms 13976 KB Output is correct
35 Correct 106 ms 13872 KB Output is correct
36 Correct 104 ms 14252 KB Output is correct
37 Correct 77 ms 13620 KB Output is correct
38 Correct 70 ms 13500 KB Output is correct
39 Correct 23 ms 8616 KB Output is correct
40 Correct 28 ms 8900 KB Output is correct
41 Correct 81 ms 13320 KB Output is correct
42 Correct 85 ms 13764 KB Output is correct
43 Correct 81 ms 13788 KB Output is correct
44 Correct 81 ms 13584 KB Output is correct
45 Correct 88 ms 13820 KB Output is correct
46 Correct 89 ms 13792 KB Output is correct
47 Correct 37 ms 13312 KB Output is correct
48 Correct 76 ms 13336 KB Output is correct
49 Correct 60 ms 13156 KB Output is correct
50 Correct 77 ms 13516 KB Output is correct
51 Correct 85 ms 13876 KB Output is correct
52 Correct 84 ms 13772 KB Output is correct
53 Correct 70 ms 13696 KB Output is correct
54 Correct 110 ms 14256 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 85 ms 14004 KB Output is correct
2 Correct 94 ms 14012 KB Output is correct
3 Correct 104 ms 14232 KB Output is correct
4 Correct 68 ms 13512 KB Output is correct
5 Correct 89 ms 13900 KB Output is correct
6 Correct 94 ms 14212 KB Output is correct
7 Correct 32 ms 8908 KB Output is correct
8 Correct 31 ms 8880 KB Output is correct
9 Correct 48 ms 13608 KB Output is correct
10 Correct 57 ms 13044 KB Output is correct
11 Correct 82 ms 13632 KB Output is correct
12 Correct 87 ms 13644 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 5 ms 6356 KB Output is correct
2 Correct 6 ms 6364 KB Output is correct
3 Correct 5 ms 6356 KB Output is correct
4 Correct 5 ms 6356 KB Output is correct
5 Correct 6 ms 6228 KB Output is correct
6 Correct 4 ms 6228 KB Output is correct
7 Correct 5 ms 6440 KB Output is correct
8 Correct 6 ms 6356 KB Output is correct
9 Correct 5 ms 6356 KB Output is correct
10 Correct 6 ms 6356 KB Output is correct
11 Correct 5 ms 6368 KB Output is correct
12 Correct 5 ms 6356 KB Output is correct
13 Correct 4 ms 6360 KB Output is correct
14 Correct 6 ms 6360 KB Output is correct
15 Correct 4 ms 6356 KB Output is correct
16 Correct 5 ms 6356 KB Output is correct
17 Correct 5 ms 6356 KB Output is correct
18 Correct 5 ms 6356 KB Output is correct
19 Correct 5 ms 6460 KB Output is correct
20 Correct 8 ms 6376 KB Output is correct
21 Correct 5 ms 6372 KB Output is correct
22 Correct 8 ms 6356 KB Output is correct
23 Correct 8 ms 6484 KB Output is correct
24 Correct 7 ms 6436 KB Output is correct
25 Correct 5 ms 6292 KB Output is correct
26 Correct 4 ms 6228 KB Output is correct
27 Correct 6 ms 6408 KB Output is correct
28 Correct 6 ms 6384 KB Output is correct
29 Correct 5 ms 6356 KB Output is correct
30 Correct 6 ms 6344 KB Output is correct
31 Correct 9 ms 6352 KB Output is correct
32 Correct 5 ms 6356 KB Output is correct
33 Correct 4 ms 6416 KB Output is correct
34 Correct 6 ms 6356 KB Output is correct
35 Correct 6 ms 6388 KB Output is correct
36 Correct 6 ms 6356 KB Output is correct
37 Correct 5 ms 6356 KB Output is correct
38 Correct 6 ms 6356 KB Output is correct
39 Correct 89 ms 13620 KB Output is correct
40 Correct 98 ms 13876 KB Output is correct
41 Correct 95 ms 13616 KB Output is correct
42 Correct 77 ms 13544 KB Output is correct
43 Correct 84 ms 13920 KB Output is correct
44 Correct 96 ms 13884 KB Output is correct
45 Correct 30 ms 8704 KB Output is correct
46 Correct 28 ms 8912 KB Output is correct
47 Correct 80 ms 12876 KB Output is correct
48 Correct 115 ms 13608 KB Output is correct
49 Correct 88 ms 13340 KB Output is correct
50 Correct 91 ms 13704 KB Output is correct
51 Correct 75 ms 13516 KB Output is correct
52 Correct 82 ms 13976 KB Output is correct
53 Correct 106 ms 13872 KB Output is correct
54 Correct 104 ms 14252 KB Output is correct
55 Correct 77 ms 13620 KB Output is correct
56 Correct 70 ms 13500 KB Output is correct
57 Correct 23 ms 8616 KB Output is correct
58 Correct 28 ms 8900 KB Output is correct
59 Correct 81 ms 13320 KB Output is correct
60 Correct 85 ms 13764 KB Output is correct
61 Correct 81 ms 13788 KB Output is correct
62 Correct 81 ms 13584 KB Output is correct
63 Correct 88 ms 13820 KB Output is correct
64 Correct 89 ms 13792 KB Output is correct
65 Correct 37 ms 13312 KB Output is correct
66 Correct 76 ms 13336 KB Output is correct
67 Correct 60 ms 13156 KB Output is correct
68 Correct 77 ms 13516 KB Output is correct
69 Correct 85 ms 13876 KB Output is correct
70 Correct 84 ms 13772 KB Output is correct
71 Correct 70 ms 13696 KB Output is correct
72 Correct 110 ms 14256 KB Output is correct
73 Correct 85 ms 14004 KB Output is correct
74 Correct 94 ms 14012 KB Output is correct
75 Correct 104 ms 14232 KB Output is correct
76 Correct 68 ms 13512 KB Output is correct
77 Correct 89 ms 13900 KB Output is correct
78 Correct 94 ms 14212 KB Output is correct
79 Correct 32 ms 8908 KB Output is correct
80 Correct 31 ms 8880 KB Output is correct
81 Correct 48 ms 13608 KB Output is correct
82 Correct 57 ms 13044 KB Output is correct
83 Correct 82 ms 13632 KB Output is correct
84 Correct 87 ms 13644 KB Output is correct
85 Correct 98 ms 13596 KB Output is correct
86 Correct 84 ms 13892 KB Output is correct
87 Correct 81 ms 13664 KB Output is correct
88 Correct 93 ms 13944 KB Output is correct
89 Correct 64 ms 12552 KB Output is correct
90 Correct 92 ms 13792 KB Output is correct
91 Correct 67 ms 13300 KB Output is correct
92 Correct 64 ms 13268 KB Output is correct
93 Correct 86 ms 13816 KB Output is correct
94 Correct 88 ms 13556 KB Output is correct
95 Correct 98 ms 13684 KB Output is correct
96 Correct 92 ms 13884 KB Output is correct
97 Correct 86 ms 13768 KB Output is correct
98 Correct 72 ms 13416 KB Output is correct
99 Correct 41 ms 13208 KB Output is correct
100 Correct 61 ms 13092 KB Output is correct
101 Correct 74 ms 13360 KB Output is correct
102 Correct 79 ms 14024 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 5 ms 6356 KB Output is correct
2 Correct 6 ms 6364 KB Output is correct
3 Correct 5 ms 6356 KB Output is correct
4 Correct 5 ms 6356 KB Output is correct
5 Correct 6 ms 6228 KB Output is correct
6 Correct 4 ms 6228 KB Output is correct
7 Correct 5 ms 6440 KB Output is correct
8 Correct 6 ms 6356 KB Output is correct
9 Correct 5 ms 6356 KB Output is correct
10 Correct 6 ms 6356 KB Output is correct
11 Correct 5 ms 6368 KB Output is correct
12 Correct 5 ms 6356 KB Output is correct
13 Correct 4 ms 6360 KB Output is correct
14 Correct 6 ms 6360 KB Output is correct
15 Correct 4 ms 6356 KB Output is correct
16 Correct 5 ms 6356 KB Output is correct
17 Correct 5 ms 6356 KB Output is correct
18 Correct 5 ms 6356 KB Output is correct
19 Correct 5 ms 6460 KB Output is correct
20 Correct 8 ms 6376 KB Output is correct
21 Correct 5 ms 6372 KB Output is correct
22 Correct 8 ms 6356 KB Output is correct
23 Correct 8 ms 6484 KB Output is correct
24 Correct 7 ms 6436 KB Output is correct
25 Correct 5 ms 6292 KB Output is correct
26 Correct 4 ms 6228 KB Output is correct
27 Correct 6 ms 6408 KB Output is correct
28 Correct 6 ms 6384 KB Output is correct
29 Correct 5 ms 6356 KB Output is correct
30 Correct 6 ms 6344 KB Output is correct
31 Correct 9 ms 6352 KB Output is correct
32 Correct 5 ms 6356 KB Output is correct
33 Correct 4 ms 6416 KB Output is correct
34 Correct 6 ms 6356 KB Output is correct
35 Correct 6 ms 6388 KB Output is correct
36 Correct 6 ms 6356 KB Output is correct
37 Correct 5 ms 6356 KB Output is correct
38 Correct 6 ms 6356 KB Output is correct
39 Correct 89 ms 13620 KB Output is correct
40 Correct 98 ms 13876 KB Output is correct
41 Correct 95 ms 13616 KB Output is correct
42 Correct 77 ms 13544 KB Output is correct
43 Correct 84 ms 13920 KB Output is correct
44 Correct 96 ms 13884 KB Output is correct
45 Correct 30 ms 8704 KB Output is correct
46 Correct 28 ms 8912 KB Output is correct
47 Correct 80 ms 12876 KB Output is correct
48 Correct 115 ms 13608 KB Output is correct
49 Correct 88 ms 13340 KB Output is correct
50 Correct 91 ms 13704 KB Output is correct
51 Correct 75 ms 13516 KB Output is correct
52 Correct 82 ms 13976 KB Output is correct
53 Correct 106 ms 13872 KB Output is correct
54 Correct 104 ms 14252 KB Output is correct
55 Correct 418 ms 35516 KB Output is correct
56 Correct 319 ms 33812 KB Output is correct
57 Correct 444 ms 36352 KB Output is correct
58 Correct 362 ms 34584 KB Output is correct
59 Correct 439 ms 34272 KB Output is correct
60 Correct 775 ms 37016 KB Output is correct
61 Correct 109 ms 16344 KB Output is correct
62 Correct 113 ms 16364 KB Output is correct
63 Correct 572 ms 37504 KB Output is correct
64 Correct 517 ms 37520 KB Output is correct
65 Correct 539 ms 34188 KB Output is correct
66 Correct 545 ms 36308 KB Output is correct
67 Correct 475 ms 34460 KB Output is correct
68 Correct 660 ms 36280 KB Output is correct
69 Correct 528 ms 36316 KB Output is correct
70 Correct 535 ms 36292 KB Output is correct
71 Correct 513 ms 36232 KB Output is correct
72 Correct 495 ms 35208 KB Output is correct
73 Correct 476 ms 36308 KB Output is correct
74 Correct 469 ms 35504 KB Output is correct
75 Correct 464 ms 36324 KB Output is correct
76 Correct 441 ms 36312 KB Output is correct
77 Correct 479 ms 36240 KB Output is correct
78 Correct 434 ms 36272 KB Output is correct
79 Correct 316 ms 34356 KB Output is correct
80 Correct 321 ms 34436 KB Output is correct
81 Correct 353 ms 36976 KB Output is correct
82 Correct 77 ms 13620 KB Output is correct
83 Correct 70 ms 13500 KB Output is correct
84 Correct 23 ms 8616 KB Output is correct
85 Correct 28 ms 8900 KB Output is correct
86 Correct 81 ms 13320 KB Output is correct
87 Correct 85 ms 13764 KB Output is correct
88 Correct 81 ms 13788 KB Output is correct
89 Correct 81 ms 13584 KB Output is correct
90 Correct 88 ms 13820 KB Output is correct
91 Correct 89 ms 13792 KB Output is correct
92 Correct 37 ms 13312 KB Output is correct
93 Correct 76 ms 13336 KB Output is correct
94 Correct 60 ms 13156 KB Output is correct
95 Correct 77 ms 13516 KB Output is correct
96 Correct 85 ms 13876 KB Output is correct
97 Correct 84 ms 13772 KB Output is correct
98 Correct 70 ms 13696 KB Output is correct
99 Correct 110 ms 14256 KB Output is correct
100 Correct 85 ms 14004 KB Output is correct
101 Correct 94 ms 14012 KB Output is correct
102 Correct 104 ms 14232 KB Output is correct
103 Correct 68 ms 13512 KB Output is correct
104 Correct 89 ms 13900 KB Output is correct
105 Correct 94 ms 14212 KB Output is correct
106 Correct 32 ms 8908 KB Output is correct
107 Correct 31 ms 8880 KB Output is correct
108 Correct 48 ms 13608 KB Output is correct
109 Correct 57 ms 13044 KB Output is correct
110 Correct 82 ms 13632 KB Output is correct
111 Correct 87 ms 13644 KB Output is correct
112 Correct 98 ms 13596 KB Output is correct
113 Correct 84 ms 13892 KB Output is correct
114 Correct 81 ms 13664 KB Output is correct
115 Correct 93 ms 13944 KB Output is correct
116 Correct 64 ms 12552 KB Output is correct
117 Correct 92 ms 13792 KB Output is correct
118 Correct 67 ms 13300 KB Output is correct
119 Correct 64 ms 13268 KB Output is correct
120 Correct 86 ms 13816 KB Output is correct
121 Correct 88 ms 13556 KB Output is correct
122 Correct 98 ms 13684 KB Output is correct
123 Correct 92 ms 13884 KB Output is correct
124 Correct 86 ms 13768 KB Output is correct
125 Correct 72 ms 13416 KB Output is correct
126 Correct 41 ms 13208 KB Output is correct
127 Correct 61 ms 13092 KB Output is correct
128 Correct 74 ms 13360 KB Output is correct
129 Correct 79 ms 14024 KB Output is correct
130 Correct 439 ms 36492 KB Output is correct
131 Correct 318 ms 33940 KB Output is correct
132 Correct 407 ms 36536 KB Output is correct
133 Correct 484 ms 36700 KB Output is correct
134 Correct 454 ms 35860 KB Output is correct
135 Correct 527 ms 37128 KB Output is correct
136 Correct 535 ms 37992 KB Output is correct
137 Correct 486 ms 37768 KB Output is correct
138 Correct 422 ms 34408 KB Output is correct
139 Correct 442 ms 36524 KB Output is correct
140 Correct 418 ms 35000 KB Output is correct
141 Correct 449 ms 36532 KB Output is correct
142 Correct 442 ms 36464 KB Output is correct
143 Correct 439 ms 36464 KB Output is correct
144 Correct 474 ms 35484 KB Output is correct
145 Correct 454 ms 36480 KB Output is correct
146 Correct 459 ms 36084 KB Output is correct
147 Correct 465 ms 36492 KB Output is correct
148 Correct 461 ms 36456 KB Output is correct
149 Correct 439 ms 36408 KB Output is correct
150 Correct 179 ms 34268 KB Output is correct
151 Correct 321 ms 34724 KB Output is correct
152 Correct 335 ms 34728 KB Output is correct
153 Correct 361 ms 37068 KB Output is correct