Submission #878593

# Submission time Handle Problem Language Result Execution time Memory
878593 2023-11-24T20:48:24 Z rainboy Express 20/19 (ROI19_express) C
100 / 100
552 ms 231728 KB
#include <stdio.h>
#include <stdlib.h>
#include <string.h>

#define N	500000
#define Q	500000
#define K	750	/* (20/19)^K > N*10^11 */

long long max(long long a, long long b) { return a > b ? a : b; }

int n, p;
int *ej[N]; long long *ew[N]; int eo[N];
long long *lll[N], *rrr[N]; int kk[N];

void append(int i, int j, long long w) {
	int o = eo[i]++;

	if (o >= 2 && (o & o - 1) == 0) {
		ej[i] = (int *) realloc(ej[i], o * 2 * sizeof *ej[i]);
		ew[i] = (long long *) realloc(ew[i], o * 2 * sizeof *ew[i]);
	}
	ej[i][o] = j, ew[i][o] = w;
}

void push(int i, int j, long long w) {
	static long long ll[K], rr[K];
	int k, hi, hj;
	long long l, r;

	k = 0, hi = 0, hj = 0;
	while (hi < kk[i] || hj < kk[j]) {
		if (hj == kk[j] || hi < kk[i] && lll[i][hi] + w < lll[j][hj])
			l = lll[i][hi] + w, r = rrr[i][hi] + w, hi++;
		else
			l = lll[j][hj], r = rrr[j][hj], hj++;
		if (k == 0 || (rr[k - 1] + 1) * p < l * (p - 1))
			ll[k] = l, rr[k] = r, k++;
		else
			rr[k - 1] = max(rr[k - 1], r);
	}
	free(lll[j]), free(rrr[j]);
	lll[j] = (long long *) malloc(k * sizeof *lll[j]);
	rrr[j] = (long long *) malloc(k * sizeof *rrr[j]);
	memcpy(lll[j], ll, k * sizeof *ll), memcpy(rrr[j], rr, k * sizeof *rr), kk[j] = k;
}

int main() {
	int t;

	scanf("%d", &t);
	while (t--) {
		static char ans[Q + 1];
		int m, q, g, h, i, j, o, lower, upper;
		long long w;

		scanf("%d%d%d%d", &n, &m, &q, &p);
		for (i = 0; i < n; i++) {
			ej[i] = (int *) malloc(2 * sizeof *ej[i]);
			ew[i] = (long long *) malloc(2 * sizeof *ew[i]);
			eo[i] = 0;
		}
		for (h = 0; h < m; h++) {
			scanf("%d%d%lld", &i, &j, &w), i--, j--;
			append(i, j, w);
		}
		memset(kk, 0, n * sizeof *kk);
		for (i = 0; i < n; i++) {
			lll[i] = (long long *) malloc(sizeof *lll[i]);
			rrr[i] = (long long *) malloc(sizeof *rrr[i]);
		}
		lll[0][0] = 0, rrr[0][0] = 0, kk[0] = 1;
		for (i = 0; i < n; i++)
			for (o = eo[i]; o--; ) {
				j = ej[i][o], w = ew[i][o];
				push(i, j, w);
			}
		for (g = 0; g < q; g++) {
			long long d;

			scanf("%d%lld", &i, &d), i--;
			lower = -1, upper = kk[i];
			while (upper - lower > 1) {
				h = (lower + upper) / 2;
				if (rrr[i][h] >= d)
					upper = h;
				else
					lower = h;
			}
			ans[g] = upper < kk[i] && lll[i][upper] * (p - 1) <= d * p ? '1' : '0';
		}
		ans[q] = 0;
		printf("%s\n", ans);
		for (i = 0; i < n; i++) {
			free(ej[i]), free(ew[i]);
			free(lll[i]), free(rrr[i]);
		}
	}
	return 0;
}

Compilation message

express.c: In function 'append':
express.c:18:23: warning: suggest parentheses around '-' in operand of '&' [-Wparentheses]
   18 |  if (o >= 2 && (o & o - 1) == 0) {
      |                     ~~^~~
express.c: In function 'push':
express.c:32:33: warning: suggest parentheses around '&&' within '||' [-Wparentheses]
   32 |   if (hj == kk[j] || hi < kk[i] && lll[i][hi] + w < lll[j][hj])
      |                      ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
express.c: In function 'main':
express.c:50:2: warning: ignoring return value of 'scanf' declared with attribute 'warn_unused_result' [-Wunused-result]
   50 |  scanf("%d", &t);
      |  ^~~~~~~~~~~~~~~
express.c:56:3: warning: ignoring return value of 'scanf' declared with attribute 'warn_unused_result' [-Wunused-result]
   56 |   scanf("%d%d%d%d", &n, &m, &q, &p);
      |   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
express.c:63:4: warning: ignoring return value of 'scanf' declared with attribute 'warn_unused_result' [-Wunused-result]
   63 |    scanf("%d%d%lld", &i, &j, &w), i--, j--;
      |    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
express.c:80:4: warning: ignoring return value of 'scanf' declared with attribute 'warn_unused_result' [-Wunused-result]
   80 |    scanf("%d%lld", &i, &d), i--;
      |    ^~~~~~~~~~~~~~~~~~~~~~~
# Verdict Execution time Memory Grader output
1 Correct 5 ms 12632 KB Output is correct
2 Correct 2 ms 12636 KB Output is correct
3 Correct 1 ms 12636 KB Output is correct
4 Correct 1 ms 12636 KB Output is correct
5 Correct 5 ms 12636 KB Output is correct
6 Correct 2 ms 12636 KB Output is correct
7 Correct 1 ms 12748 KB Output is correct
8 Correct 3 ms 12636 KB Output is correct
9 Correct 2 ms 12632 KB Output is correct
10 Correct 2 ms 12632 KB Output is correct
11 Correct 1 ms 12636 KB Output is correct
12 Correct 7 ms 12728 KB Output is correct
13 Correct 6 ms 12636 KB Output is correct
14 Correct 6 ms 12764 KB Output is correct
15 Correct 5 ms 12752 KB Output is correct
16 Correct 6 ms 12636 KB Output is correct
17 Correct 6 ms 12636 KB Output is correct
18 Correct 6 ms 12636 KB Output is correct
19 Correct 6 ms 12636 KB Output is correct
20 Correct 6 ms 12632 KB Output is correct
21 Correct 7 ms 12636 KB Output is correct
22 Correct 6 ms 12636 KB Output is correct
23 Correct 6 ms 12764 KB Output is correct
24 Correct 5 ms 12636 KB Output is correct
25 Correct 6 ms 12764 KB Output is correct
26 Correct 5 ms 12636 KB Output is correct
27 Correct 5 ms 12636 KB Output is correct
28 Correct 5 ms 12636 KB Output is correct
29 Correct 5 ms 12636 KB Output is correct
30 Correct 5 ms 12636 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 2 ms 12636 KB Output is correct
2 Correct 2 ms 12636 KB Output is correct
3 Correct 1 ms 12636 KB Output is correct
4 Correct 1 ms 12636 KB Output is correct
5 Correct 1 ms 12636 KB Output is correct
6 Correct 2 ms 12636 KB Output is correct
7 Correct 1 ms 12636 KB Output is correct
8 Correct 1 ms 12636 KB Output is correct
9 Correct 1 ms 12636 KB Output is correct
10 Correct 4 ms 12836 KB Output is correct
11 Correct 3 ms 12720 KB Output is correct
12 Correct 4 ms 13148 KB Output is correct
13 Correct 5 ms 12992 KB Output is correct
14 Correct 4 ms 12636 KB Output is correct
15 Correct 3 ms 12636 KB Output is correct
16 Correct 4 ms 12636 KB Output is correct
17 Correct 4 ms 12636 KB Output is correct
18 Correct 3 ms 12636 KB Output is correct
19 Correct 4 ms 12636 KB Output is correct
20 Correct 4 ms 12636 KB Output is correct
21 Correct 4 ms 12636 KB Output is correct
22 Correct 4 ms 13148 KB Output is correct
23 Correct 4 ms 13148 KB Output is correct
24 Correct 3 ms 12892 KB Output is correct
25 Correct 3 ms 12892 KB Output is correct
26 Correct 3 ms 12892 KB Output is correct
27 Correct 3 ms 12892 KB Output is correct
28 Correct 3 ms 12792 KB Output is correct
29 Correct 3 ms 12892 KB Output is correct
30 Correct 3 ms 12636 KB Output is correct
31 Correct 3 ms 12704 KB Output is correct
32 Correct 4 ms 12892 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 12636 KB Output is correct
2 Correct 233 ms 51184 KB Output is correct
3 Correct 158 ms 30544 KB Output is correct
4 Correct 157 ms 26964 KB Output is correct
5 Correct 158 ms 23828 KB Output is correct
6 Correct 176 ms 34256 KB Output is correct
7 Correct 154 ms 28500 KB Output is correct
8 Correct 158 ms 33976 KB Output is correct
9 Correct 155 ms 28588 KB Output is correct
10 Correct 151 ms 31144 KB Output is correct
11 Correct 146 ms 25648 KB Output is correct
12 Correct 51 ms 15276 KB Output is correct
13 Correct 4 ms 12892 KB Output is correct
14 Correct 5 ms 12892 KB Output is correct
15 Correct 6 ms 12920 KB Output is correct
16 Correct 7 ms 12892 KB Output is correct
17 Correct 15 ms 13148 KB Output is correct
18 Correct 77 ms 16184 KB Output is correct
19 Correct 11 ms 12892 KB Output is correct
20 Correct 26 ms 13400 KB Output is correct
21 Correct 21 ms 13404 KB Output is correct
22 Correct 21 ms 13404 KB Output is correct
23 Correct 63 ms 29268 KB Output is correct
24 Correct 196 ms 61076 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 12636 KB Output is correct
2 Correct 233 ms 51184 KB Output is correct
3 Correct 158 ms 30544 KB Output is correct
4 Correct 157 ms 26964 KB Output is correct
5 Correct 158 ms 23828 KB Output is correct
6 Correct 176 ms 34256 KB Output is correct
7 Correct 154 ms 28500 KB Output is correct
8 Correct 158 ms 33976 KB Output is correct
9 Correct 155 ms 28588 KB Output is correct
10 Correct 151 ms 31144 KB Output is correct
11 Correct 146 ms 25648 KB Output is correct
12 Correct 51 ms 15276 KB Output is correct
13 Correct 4 ms 12892 KB Output is correct
14 Correct 5 ms 12892 KB Output is correct
15 Correct 6 ms 12920 KB Output is correct
16 Correct 7 ms 12892 KB Output is correct
17 Correct 15 ms 13148 KB Output is correct
18 Correct 77 ms 16184 KB Output is correct
19 Correct 11 ms 12892 KB Output is correct
20 Correct 26 ms 13400 KB Output is correct
21 Correct 21 ms 13404 KB Output is correct
22 Correct 21 ms 13404 KB Output is correct
23 Correct 63 ms 29268 KB Output is correct
24 Correct 196 ms 61076 KB Output is correct
25 Correct 323 ms 76280 KB Output is correct
26 Correct 274 ms 42872 KB Output is correct
27 Correct 249 ms 39392 KB Output is correct
28 Correct 245 ms 35568 KB Output is correct
29 Correct 215 ms 31828 KB Output is correct
30 Correct 231 ms 35044 KB Output is correct
31 Correct 159 ms 34088 KB Output is correct
32 Correct 148 ms 28500 KB Output is correct
33 Correct 157 ms 33876 KB Output is correct
34 Correct 161 ms 29012 KB Output is correct
35 Correct 143 ms 31060 KB Output is correct
36 Correct 158 ms 25852 KB Output is correct
37 Correct 51 ms 15188 KB Output is correct
38 Correct 4 ms 12892 KB Output is correct
39 Correct 5 ms 12988 KB Output is correct
40 Correct 192 ms 84944 KB Output is correct
41 Correct 185 ms 85844 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 12636 KB Output is correct
2 Correct 2 ms 12636 KB Output is correct
3 Correct 2 ms 12888 KB Output is correct
4 Correct 2 ms 12632 KB Output is correct
5 Correct 2 ms 12888 KB Output is correct
6 Correct 2 ms 12636 KB Output is correct
7 Correct 2 ms 12752 KB Output is correct
8 Correct 3 ms 13116 KB Output is correct
9 Correct 2 ms 12636 KB Output is correct
10 Correct 2 ms 12636 KB Output is correct
11 Correct 2 ms 12636 KB Output is correct
12 Correct 3 ms 12888 KB Output is correct
13 Correct 2 ms 12636 KB Output is correct
14 Correct 3 ms 12636 KB Output is correct
15 Correct 3 ms 12732 KB Output is correct
16 Correct 3 ms 12728 KB Output is correct
17 Correct 3 ms 12892 KB Output is correct
18 Correct 2 ms 12892 KB Output is correct
19 Correct 2 ms 12892 KB Output is correct
20 Correct 2 ms 12892 KB Output is correct
21 Correct 2 ms 12732 KB Output is correct
22 Correct 3 ms 12892 KB Output is correct
23 Correct 3 ms 12892 KB Output is correct
24 Correct 3 ms 12892 KB Output is correct
25 Correct 3 ms 12892 KB Output is correct
26 Correct 2 ms 12636 KB Output is correct
27 Correct 2 ms 12636 KB Output is correct
28 Correct 2 ms 12636 KB Output is correct
29 Correct 2 ms 12636 KB Output is correct
30 Correct 2 ms 12728 KB Output is correct
31 Correct 2 ms 12636 KB Output is correct
32 Correct 2 ms 12636 KB Output is correct
33 Correct 2 ms 12636 KB Output is correct
34 Correct 2 ms 12636 KB Output is correct
35 Correct 2 ms 12636 KB Output is correct
36 Correct 2 ms 12788 KB Output is correct
37 Correct 2 ms 12636 KB Output is correct
38 Correct 3 ms 12732 KB Output is correct
39 Correct 2 ms 12636 KB Output is correct
40 Correct 2 ms 12636 KB Output is correct
41 Correct 2 ms 12636 KB Output is correct
42 Correct 2 ms 12636 KB Output is correct
43 Correct 2 ms 12892 KB Output is correct
44 Correct 2 ms 12892 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 12636 KB Output is correct
2 Correct 2 ms 12636 KB Output is correct
3 Correct 2 ms 12888 KB Output is correct
4 Correct 2 ms 12632 KB Output is correct
5 Correct 2 ms 12888 KB Output is correct
6 Correct 2 ms 12636 KB Output is correct
7 Correct 2 ms 12752 KB Output is correct
8 Correct 3 ms 13116 KB Output is correct
9 Correct 2 ms 12636 KB Output is correct
10 Correct 2 ms 12636 KB Output is correct
11 Correct 2 ms 12636 KB Output is correct
12 Correct 3 ms 12888 KB Output is correct
13 Correct 2 ms 12636 KB Output is correct
14 Correct 3 ms 12636 KB Output is correct
15 Correct 3 ms 12732 KB Output is correct
16 Correct 3 ms 12728 KB Output is correct
17 Correct 3 ms 12892 KB Output is correct
18 Correct 2 ms 12892 KB Output is correct
19 Correct 2 ms 12892 KB Output is correct
20 Correct 2 ms 12892 KB Output is correct
21 Correct 2 ms 12732 KB Output is correct
22 Correct 3 ms 12892 KB Output is correct
23 Correct 3 ms 12892 KB Output is correct
24 Correct 3 ms 12892 KB Output is correct
25 Correct 3 ms 12892 KB Output is correct
26 Correct 2 ms 12636 KB Output is correct
27 Correct 2 ms 12636 KB Output is correct
28 Correct 2 ms 12636 KB Output is correct
29 Correct 2 ms 12636 KB Output is correct
30 Correct 2 ms 12728 KB Output is correct
31 Correct 2 ms 12636 KB Output is correct
32 Correct 2 ms 12636 KB Output is correct
33 Correct 2 ms 12636 KB Output is correct
34 Correct 2 ms 12636 KB Output is correct
35 Correct 2 ms 12636 KB Output is correct
36 Correct 2 ms 12788 KB Output is correct
37 Correct 2 ms 12636 KB Output is correct
38 Correct 3 ms 12732 KB Output is correct
39 Correct 2 ms 12636 KB Output is correct
40 Correct 2 ms 12636 KB Output is correct
41 Correct 2 ms 12636 KB Output is correct
42 Correct 2 ms 12636 KB Output is correct
43 Correct 2 ms 12892 KB Output is correct
44 Correct 2 ms 12892 KB Output is correct
45 Correct 357 ms 45652 KB Output is correct
46 Correct 346 ms 53332 KB Output is correct
47 Correct 552 ms 98388 KB Output is correct
48 Correct 295 ms 34644 KB Output is correct
49 Correct 200 ms 30644 KB Output is correct
50 Correct 194 ms 28956 KB Output is correct
51 Correct 2 ms 12636 KB Output is correct
52 Correct 2 ms 12636 KB Output is correct
53 Correct 16 ms 13148 KB Output is correct
54 Correct 8 ms 13132 KB Output is correct
55 Correct 217 ms 27412 KB Output is correct
56 Correct 204 ms 27220 KB Output is correct
57 Correct 231 ms 27220 KB Output is correct
58 Correct 222 ms 27620 KB Output is correct
59 Correct 221 ms 26452 KB Output is correct
60 Correct 245 ms 32596 KB Output is correct
61 Correct 308 ms 39884 KB Output is correct
62 Correct 149 ms 30804 KB Output is correct
63 Correct 119 ms 29436 KB Output is correct
64 Correct 160 ms 23344 KB Output is correct
65 Correct 333 ms 62048 KB Output is correct
66 Correct 356 ms 81964 KB Output is correct
67 Correct 404 ms 93436 KB Output is correct
68 Correct 385 ms 107092 KB Output is correct
69 Correct 375 ms 92500 KB Output is correct
70 Correct 487 ms 102616 KB Output is correct
71 Correct 256 ms 128040 KB Output is correct
72 Correct 81 ms 16408 KB Output is correct
73 Correct 368 ms 108116 KB Output is correct
74 Correct 279 ms 68688 KB Output is correct
75 Correct 28 ms 13916 KB Output is correct
76 Correct 33 ms 13916 KB Output is correct
77 Correct 28 ms 13916 KB Output is correct
78 Correct 38 ms 14568 KB Output is correct
79 Correct 116 ms 25188 KB Output is correct
80 Correct 116 ms 25176 KB Output is correct
81 Correct 116 ms 25172 KB Output is correct
82 Correct 119 ms 25424 KB Output is correct
83 Correct 201 ms 86992 KB Output is correct
84 Correct 183 ms 84820 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 5 ms 12632 KB Output is correct
2 Correct 2 ms 12636 KB Output is correct
3 Correct 1 ms 12636 KB Output is correct
4 Correct 1 ms 12636 KB Output is correct
5 Correct 5 ms 12636 KB Output is correct
6 Correct 2 ms 12636 KB Output is correct
7 Correct 1 ms 12748 KB Output is correct
8 Correct 3 ms 12636 KB Output is correct
9 Correct 2 ms 12632 KB Output is correct
10 Correct 2 ms 12632 KB Output is correct
11 Correct 1 ms 12636 KB Output is correct
12 Correct 7 ms 12728 KB Output is correct
13 Correct 6 ms 12636 KB Output is correct
14 Correct 6 ms 12764 KB Output is correct
15 Correct 5 ms 12752 KB Output is correct
16 Correct 6 ms 12636 KB Output is correct
17 Correct 6 ms 12636 KB Output is correct
18 Correct 6 ms 12636 KB Output is correct
19 Correct 6 ms 12636 KB Output is correct
20 Correct 6 ms 12632 KB Output is correct
21 Correct 7 ms 12636 KB Output is correct
22 Correct 6 ms 12636 KB Output is correct
23 Correct 6 ms 12764 KB Output is correct
24 Correct 5 ms 12636 KB Output is correct
25 Correct 6 ms 12764 KB Output is correct
26 Correct 5 ms 12636 KB Output is correct
27 Correct 5 ms 12636 KB Output is correct
28 Correct 5 ms 12636 KB Output is correct
29 Correct 5 ms 12636 KB Output is correct
30 Correct 5 ms 12636 KB Output is correct
31 Correct 2 ms 12636 KB Output is correct
32 Correct 2 ms 12636 KB Output is correct
33 Correct 1 ms 12636 KB Output is correct
34 Correct 1 ms 12636 KB Output is correct
35 Correct 1 ms 12636 KB Output is correct
36 Correct 2 ms 12636 KB Output is correct
37 Correct 1 ms 12636 KB Output is correct
38 Correct 1 ms 12636 KB Output is correct
39 Correct 1 ms 12636 KB Output is correct
40 Correct 4 ms 12836 KB Output is correct
41 Correct 3 ms 12720 KB Output is correct
42 Correct 4 ms 13148 KB Output is correct
43 Correct 5 ms 12992 KB Output is correct
44 Correct 4 ms 12636 KB Output is correct
45 Correct 3 ms 12636 KB Output is correct
46 Correct 4 ms 12636 KB Output is correct
47 Correct 4 ms 12636 KB Output is correct
48 Correct 3 ms 12636 KB Output is correct
49 Correct 4 ms 12636 KB Output is correct
50 Correct 4 ms 12636 KB Output is correct
51 Correct 4 ms 12636 KB Output is correct
52 Correct 4 ms 13148 KB Output is correct
53 Correct 4 ms 13148 KB Output is correct
54 Correct 3 ms 12892 KB Output is correct
55 Correct 3 ms 12892 KB Output is correct
56 Correct 3 ms 12892 KB Output is correct
57 Correct 3 ms 12892 KB Output is correct
58 Correct 3 ms 12792 KB Output is correct
59 Correct 3 ms 12892 KB Output is correct
60 Correct 3 ms 12636 KB Output is correct
61 Correct 3 ms 12704 KB Output is correct
62 Correct 4 ms 12892 KB Output is correct
63 Correct 1 ms 12636 KB Output is correct
64 Correct 233 ms 51184 KB Output is correct
65 Correct 158 ms 30544 KB Output is correct
66 Correct 157 ms 26964 KB Output is correct
67 Correct 158 ms 23828 KB Output is correct
68 Correct 176 ms 34256 KB Output is correct
69 Correct 154 ms 28500 KB Output is correct
70 Correct 158 ms 33976 KB Output is correct
71 Correct 155 ms 28588 KB Output is correct
72 Correct 151 ms 31144 KB Output is correct
73 Correct 146 ms 25648 KB Output is correct
74 Correct 51 ms 15276 KB Output is correct
75 Correct 4 ms 12892 KB Output is correct
76 Correct 5 ms 12892 KB Output is correct
77 Correct 6 ms 12920 KB Output is correct
78 Correct 7 ms 12892 KB Output is correct
79 Correct 15 ms 13148 KB Output is correct
80 Correct 77 ms 16184 KB Output is correct
81 Correct 11 ms 12892 KB Output is correct
82 Correct 26 ms 13400 KB Output is correct
83 Correct 21 ms 13404 KB Output is correct
84 Correct 21 ms 13404 KB Output is correct
85 Correct 63 ms 29268 KB Output is correct
86 Correct 196 ms 61076 KB Output is correct
87 Correct 323 ms 76280 KB Output is correct
88 Correct 274 ms 42872 KB Output is correct
89 Correct 249 ms 39392 KB Output is correct
90 Correct 245 ms 35568 KB Output is correct
91 Correct 215 ms 31828 KB Output is correct
92 Correct 231 ms 35044 KB Output is correct
93 Correct 159 ms 34088 KB Output is correct
94 Correct 148 ms 28500 KB Output is correct
95 Correct 157 ms 33876 KB Output is correct
96 Correct 161 ms 29012 KB Output is correct
97 Correct 143 ms 31060 KB Output is correct
98 Correct 158 ms 25852 KB Output is correct
99 Correct 51 ms 15188 KB Output is correct
100 Correct 4 ms 12892 KB Output is correct
101 Correct 5 ms 12988 KB Output is correct
102 Correct 192 ms 84944 KB Output is correct
103 Correct 185 ms 85844 KB Output is correct
104 Correct 1 ms 12636 KB Output is correct
105 Correct 2 ms 12636 KB Output is correct
106 Correct 2 ms 12888 KB Output is correct
107 Correct 2 ms 12632 KB Output is correct
108 Correct 2 ms 12888 KB Output is correct
109 Correct 2 ms 12636 KB Output is correct
110 Correct 2 ms 12752 KB Output is correct
111 Correct 3 ms 13116 KB Output is correct
112 Correct 2 ms 12636 KB Output is correct
113 Correct 2 ms 12636 KB Output is correct
114 Correct 2 ms 12636 KB Output is correct
115 Correct 3 ms 12888 KB Output is correct
116 Correct 2 ms 12636 KB Output is correct
117 Correct 3 ms 12636 KB Output is correct
118 Correct 3 ms 12732 KB Output is correct
119 Correct 3 ms 12728 KB Output is correct
120 Correct 3 ms 12892 KB Output is correct
121 Correct 2 ms 12892 KB Output is correct
122 Correct 2 ms 12892 KB Output is correct
123 Correct 2 ms 12892 KB Output is correct
124 Correct 2 ms 12732 KB Output is correct
125 Correct 3 ms 12892 KB Output is correct
126 Correct 3 ms 12892 KB Output is correct
127 Correct 3 ms 12892 KB Output is correct
128 Correct 3 ms 12892 KB Output is correct
129 Correct 2 ms 12636 KB Output is correct
130 Correct 2 ms 12636 KB Output is correct
131 Correct 2 ms 12636 KB Output is correct
132 Correct 2 ms 12636 KB Output is correct
133 Correct 2 ms 12728 KB Output is correct
134 Correct 2 ms 12636 KB Output is correct
135 Correct 2 ms 12636 KB Output is correct
136 Correct 2 ms 12636 KB Output is correct
137 Correct 2 ms 12636 KB Output is correct
138 Correct 2 ms 12636 KB Output is correct
139 Correct 2 ms 12788 KB Output is correct
140 Correct 2 ms 12636 KB Output is correct
141 Correct 3 ms 12732 KB Output is correct
142 Correct 2 ms 12636 KB Output is correct
143 Correct 2 ms 12636 KB Output is correct
144 Correct 2 ms 12636 KB Output is correct
145 Correct 2 ms 12636 KB Output is correct
146 Correct 2 ms 12892 KB Output is correct
147 Correct 2 ms 12892 KB Output is correct
148 Correct 357 ms 45652 KB Output is correct
149 Correct 346 ms 53332 KB Output is correct
150 Correct 552 ms 98388 KB Output is correct
151 Correct 295 ms 34644 KB Output is correct
152 Correct 200 ms 30644 KB Output is correct
153 Correct 194 ms 28956 KB Output is correct
154 Correct 2 ms 12636 KB Output is correct
155 Correct 2 ms 12636 KB Output is correct
156 Correct 16 ms 13148 KB Output is correct
157 Correct 8 ms 13132 KB Output is correct
158 Correct 217 ms 27412 KB Output is correct
159 Correct 204 ms 27220 KB Output is correct
160 Correct 231 ms 27220 KB Output is correct
161 Correct 222 ms 27620 KB Output is correct
162 Correct 221 ms 26452 KB Output is correct
163 Correct 245 ms 32596 KB Output is correct
164 Correct 308 ms 39884 KB Output is correct
165 Correct 149 ms 30804 KB Output is correct
166 Correct 119 ms 29436 KB Output is correct
167 Correct 160 ms 23344 KB Output is correct
168 Correct 333 ms 62048 KB Output is correct
169 Correct 356 ms 81964 KB Output is correct
170 Correct 404 ms 93436 KB Output is correct
171 Correct 385 ms 107092 KB Output is correct
172 Correct 375 ms 92500 KB Output is correct
173 Correct 487 ms 102616 KB Output is correct
174 Correct 256 ms 128040 KB Output is correct
175 Correct 81 ms 16408 KB Output is correct
176 Correct 368 ms 108116 KB Output is correct
177 Correct 279 ms 68688 KB Output is correct
178 Correct 28 ms 13916 KB Output is correct
179 Correct 33 ms 13916 KB Output is correct
180 Correct 28 ms 13916 KB Output is correct
181 Correct 38 ms 14568 KB Output is correct
182 Correct 116 ms 25188 KB Output is correct
183 Correct 116 ms 25176 KB Output is correct
184 Correct 116 ms 25172 KB Output is correct
185 Correct 119 ms 25424 KB Output is correct
186 Correct 201 ms 86992 KB Output is correct
187 Correct 183 ms 84820 KB Output is correct
188 Correct 334 ms 43092 KB Output is correct
189 Correct 337 ms 50836 KB Output is correct
190 Correct 535 ms 96276 KB Output is correct
191 Correct 294 ms 33152 KB Output is correct
192 Correct 257 ms 30956 KB Output is correct
193 Correct 251 ms 30584 KB Output is correct
194 Correct 223 ms 30036 KB Output is correct
195 Correct 206 ms 28040 KB Output is correct
196 Correct 326 ms 46104 KB Output is correct
197 Correct 330 ms 42644 KB Output is correct
198 Correct 333 ms 45908 KB Output is correct
199 Correct 305 ms 41148 KB Output is correct
200 Correct 310 ms 40628 KB Output is correct
201 Correct 344 ms 37300 KB Output is correct
202 Correct 109 ms 17748 KB Output is correct
203 Correct 104 ms 17460 KB Output is correct
204 Correct 98 ms 17076 KB Output is correct
205 Correct 39 ms 14420 KB Output is correct
206 Correct 190 ms 21340 KB Output is correct
207 Correct 232 ms 22868 KB Output is correct
208 Correct 218 ms 22120 KB Output is correct
209 Correct 314 ms 230996 KB Output is correct
210 Correct 328 ms 231728 KB Output is correct
211 Correct 272 ms 34248 KB Output is correct
212 Correct 187 ms 89684 KB Output is correct
213 Correct 191 ms 91476 KB Output is correct
214 Correct 3 ms 12888 KB Output is correct
215 Correct 8 ms 13404 KB Output is correct
216 Correct 16 ms 14096 KB Output is correct
217 Correct 27 ms 14952 KB Output is correct
218 Correct 41 ms 16112 KB Output is correct
219 Correct 58 ms 17868 KB Output is correct
220 Correct 81 ms 19716 KB Output is correct
221 Correct 4 ms 13404 KB Output is correct
222 Correct 11 ms 14428 KB Output is correct
223 Correct 21 ms 15708 KB Output is correct
224 Correct 36 ms 17112 KB Output is correct
225 Correct 55 ms 18772 KB Output is correct
226 Correct 76 ms 20896 KB Output is correct
227 Correct 100 ms 23488 KB Output is correct
228 Correct 106 ms 23972 KB Output is correct