Submission #535873

# Submission time Handle Problem Language Result Execution time Memory
535873 2022-03-11T15:13:40 Z mario05092929 Painting Walls (APIO20_paint) C++17
100 / 100
949 ms 505672 KB
#include "paint.h"
#include <bits/stdc++.h>
#define x first
#define y second
using namespace std;
typedef long long ll;
typedef pair <int,int> pi;
typedef vector <int> vec;
const int INF = 1e9;
int n,m,k;
int a[100005],d[100005],ok;
vector <int> rc[100005];
vector <pi> c[100005];
vector <int> id[100005];
multiset <int> s;
pi ch[100005];
int cnt;

int minimumInstructions(int N,int M,int K,vec C,vec A,vector<vec> B) {
    n = N, m = M, k = K;
    int i,ok,wh,j,it;
    for(i = 1;i <= n;i++) a[i] = C[i-1];
    for(i = 0;i < m;i++) {
        for(j = 0;j < B[i].size();j++) {
            rc[B[i][j]].push_back(i);
            cnt++;
        }
    }
    for(i = 1;i <= n;i++) {
        c[i].resize(rc[a[i]].size());
        for(j = 0;j < rc[a[i]].size();j++) {
            c[i][j] = {rc[a[i]][j],0};
            cnt += 2;
        }
    }
    if(cnt >= 200000000) while(1);
    for(i = 1;i <= n;i++) {
        ok = 0;
        for(j = 0;j < c[i].size();j++) {
            wh = (c[i][j].x+m-1)%m;
            if(ch[wh].x == i) c[i][j].y = c[i-1][ch[wh].y].y+1;
            else c[i][j].y = 1;
            if(c[i][j].y >= m) ok = 1;
        }
        for(j = 0;j < c[i].size();j++) {
            ch[c[i][j].x] = {i+1,j};
        }
        d[i] = INF;
        if(ok) {
            if(i-m < 1) d[i] = 1;
            else {
                it = *s.begin();
                d[i] = it+1;
                if(d[i] >= INF) return -1;
            }
        }
        if(i-m >= 1) s.erase(s.find(d[i-m]));
        s.insert(d[i]);
    }
    if(d[n] >= INF) return -1;
    return d[n];
}

Compilation message

paint.cpp: In function 'int minimumInstructions(int, int, int, vec, vec, std::vector<std::vector<int> >)':
paint.cpp:24:21: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   24 |         for(j = 0;j < B[i].size();j++) {
      |                   ~~^~~~~~~~~~~~~
paint.cpp:31:21: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   31 |         for(j = 0;j < rc[a[i]].size();j++) {
      |                   ~~^~~~~~~~~~~~~~~~~
paint.cpp:39:21: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<std::pair<int, int> >::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   39 |         for(j = 0;j < c[i].size();j++) {
      |                   ~~^~~~~~~~~~~~~
paint.cpp:45:21: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<std::pair<int, int> >::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   45 |         for(j = 0;j < c[i].size();j++) {
      |                   ~~^~~~~~~~~~~~~
# Verdict Execution time Memory Grader output
1 Correct 4 ms 7380 KB Output is correct
2 Correct 4 ms 7252 KB Output is correct
3 Correct 4 ms 7252 KB Output is correct
4 Correct 4 ms 7252 KB Output is correct
5 Correct 4 ms 7380 KB Output is correct
6 Correct 4 ms 7252 KB Output is correct
7 Correct 5 ms 7380 KB Output is correct
8 Correct 4 ms 7364 KB Output is correct
9 Correct 4 ms 7380 KB Output is correct
10 Correct 6 ms 7308 KB Output is correct
11 Correct 4 ms 7380 KB Output is correct
12 Correct 4 ms 7368 KB Output is correct
13 Correct 4 ms 7380 KB Output is correct
14 Correct 4 ms 7380 KB Output is correct
15 Correct 4 ms 7420 KB Output is correct
16 Correct 5 ms 7380 KB Output is correct
17 Correct 5 ms 7380 KB Output is correct
18 Correct 4 ms 7380 KB Output is correct
19 Correct 4 ms 7380 KB Output is correct
20 Correct 5 ms 7380 KB Output is correct
21 Correct 4 ms 7376 KB Output is correct
22 Correct 23 ms 11804 KB Output is correct
23 Correct 24 ms 11824 KB Output is correct
24 Correct 23 ms 11784 KB Output is correct
25 Correct 7 ms 8276 KB Output is correct
26 Correct 7 ms 8276 KB Output is correct
27 Correct 7 ms 8144 KB Output is correct
28 Correct 7 ms 8148 KB Output is correct
29 Correct 7 ms 8152 KB Output is correct
30 Correct 7 ms 8144 KB Output is correct
31 Correct 15 ms 9556 KB Output is correct
32 Correct 16 ms 9568 KB Output is correct
33 Correct 14 ms 9548 KB Output is correct
34 Correct 15 ms 9552 KB Output is correct
35 Correct 15 ms 9480 KB Output is correct
36 Correct 15 ms 9556 KB Output is correct
37 Correct 31 ms 13156 KB Output is correct
38 Correct 31 ms 13124 KB Output is correct
39 Correct 30 ms 13064 KB Output is correct
40 Correct 19 ms 11728 KB Output is correct
41 Correct 13 ms 10068 KB Output is correct
42 Correct 20 ms 11732 KB Output is correct
43 Correct 15 ms 10320 KB Output is correct
44 Correct 12 ms 10028 KB Output is correct
45 Correct 18 ms 11864 KB Output is correct
46 Correct 65 ms 23544 KB Output is correct
47 Correct 44 ms 16460 KB Output is correct
48 Correct 49 ms 20244 KB Output is correct
49 Correct 54 ms 20460 KB Output is correct
50 Correct 57 ms 20172 KB Output is correct
51 Correct 52 ms 17244 KB Output is correct
52 Correct 21 ms 12244 KB Output is correct
53 Correct 20 ms 12240 KB Output is correct
54 Correct 21 ms 11848 KB Output is correct
55 Correct 19 ms 11804 KB Output is correct
56 Correct 19 ms 11840 KB Output is correct
57 Correct 17 ms 11860 KB Output is correct
58 Correct 73 ms 25036 KB Output is correct
59 Correct 82 ms 25000 KB Output is correct
60 Correct 78 ms 24936 KB Output is correct
61 Correct 82 ms 24920 KB Output is correct
62 Correct 100 ms 24980 KB Output is correct
63 Correct 95 ms 25036 KB Output is correct
64 Correct 77 ms 23868 KB Output is correct
65 Correct 76 ms 23884 KB Output is correct
66 Correct 76 ms 23760 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 4 ms 7380 KB Output is correct
2 Correct 4 ms 7252 KB Output is correct
3 Correct 4 ms 7252 KB Output is correct
4 Correct 4 ms 7252 KB Output is correct
5 Correct 4 ms 7380 KB Output is correct
6 Correct 4 ms 7252 KB Output is correct
7 Correct 5 ms 7380 KB Output is correct
8 Correct 4 ms 7364 KB Output is correct
9 Correct 4 ms 7380 KB Output is correct
10 Correct 6 ms 7308 KB Output is correct
11 Correct 4 ms 7380 KB Output is correct
12 Correct 4 ms 7368 KB Output is correct
13 Correct 4 ms 7380 KB Output is correct
14 Correct 4 ms 7380 KB Output is correct
15 Correct 4 ms 7420 KB Output is correct
16 Correct 5 ms 7380 KB Output is correct
17 Correct 5 ms 7380 KB Output is correct
18 Correct 4 ms 7380 KB Output is correct
19 Correct 4 ms 7380 KB Output is correct
20 Correct 5 ms 7380 KB Output is correct
21 Correct 4 ms 7376 KB Output is correct
22 Correct 4 ms 7252 KB Output is correct
23 Correct 4 ms 7252 KB Output is correct
24 Correct 5 ms 7360 KB Output is correct
25 Correct 4 ms 7368 KB Output is correct
26 Correct 4 ms 7252 KB Output is correct
27 Correct 6 ms 7380 KB Output is correct
28 Correct 4 ms 7380 KB Output is correct
29 Correct 4 ms 7380 KB Output is correct
30 Correct 4 ms 7380 KB Output is correct
31 Correct 4 ms 7380 KB Output is correct
32 Correct 4 ms 7380 KB Output is correct
33 Correct 4 ms 7368 KB Output is correct
34 Correct 4 ms 7364 KB Output is correct
35 Correct 4 ms 7368 KB Output is correct
36 Correct 4 ms 7368 KB Output is correct
37 Correct 4 ms 7372 KB Output is correct
38 Correct 4 ms 7380 KB Output is correct
39 Correct 4 ms 7380 KB Output is correct
40 Correct 5 ms 7380 KB Output is correct
41 Correct 4 ms 7380 KB Output is correct
42 Correct 4 ms 7380 KB Output is correct
43 Correct 4 ms 7380 KB Output is correct
44 Correct 4 ms 7368 KB Output is correct
45 Correct 4 ms 7508 KB Output is correct
46 Correct 4 ms 7464 KB Output is correct
47 Correct 4 ms 7380 KB Output is correct
48 Correct 4 ms 7380 KB Output is correct
49 Correct 4 ms 7380 KB Output is correct
50 Correct 5 ms 7380 KB Output is correct
51 Correct 4 ms 7368 KB Output is correct
52 Correct 4 ms 7380 KB Output is correct
53 Correct 5 ms 7380 KB Output is correct
54 Correct 5 ms 7380 KB Output is correct
55 Correct 4 ms 7380 KB Output is correct
56 Correct 4 ms 7372 KB Output is correct
57 Correct 4 ms 7372 KB Output is correct
58 Correct 4 ms 7380 KB Output is correct
59 Correct 5 ms 7380 KB Output is correct
60 Correct 4 ms 7380 KB Output is correct
61 Correct 5 ms 7368 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 4 ms 7252 KB Output is correct
2 Correct 4 ms 7252 KB Output is correct
3 Correct 4 ms 7380 KB Output is correct
4 Correct 4 ms 7252 KB Output is correct
5 Correct 4 ms 7252 KB Output is correct
6 Correct 4 ms 7252 KB Output is correct
7 Correct 4 ms 7380 KB Output is correct
8 Correct 4 ms 7252 KB Output is correct
9 Correct 5 ms 7380 KB Output is correct
10 Correct 4 ms 7364 KB Output is correct
11 Correct 4 ms 7380 KB Output is correct
12 Correct 6 ms 7308 KB Output is correct
13 Correct 4 ms 7380 KB Output is correct
14 Correct 4 ms 7368 KB Output is correct
15 Correct 4 ms 7380 KB Output is correct
16 Correct 4 ms 7380 KB Output is correct
17 Correct 4 ms 7420 KB Output is correct
18 Correct 5 ms 7380 KB Output is correct
19 Correct 5 ms 7380 KB Output is correct
20 Correct 4 ms 7380 KB Output is correct
21 Correct 4 ms 7380 KB Output is correct
22 Correct 5 ms 7380 KB Output is correct
23 Correct 4 ms 7376 KB Output is correct
24 Correct 23 ms 11804 KB Output is correct
25 Correct 24 ms 11824 KB Output is correct
26 Correct 23 ms 11784 KB Output is correct
27 Correct 5 ms 7360 KB Output is correct
28 Correct 4 ms 7368 KB Output is correct
29 Correct 4 ms 7252 KB Output is correct
30 Correct 6 ms 7380 KB Output is correct
31 Correct 4 ms 7380 KB Output is correct
32 Correct 4 ms 7380 KB Output is correct
33 Correct 4 ms 7380 KB Output is correct
34 Correct 4 ms 7380 KB Output is correct
35 Correct 4 ms 7380 KB Output is correct
36 Correct 4 ms 7368 KB Output is correct
37 Correct 4 ms 7364 KB Output is correct
38 Correct 4 ms 7368 KB Output is correct
39 Correct 4 ms 7368 KB Output is correct
40 Correct 4 ms 7372 KB Output is correct
41 Correct 4 ms 7380 KB Output is correct
42 Correct 4 ms 7380 KB Output is correct
43 Correct 5 ms 7380 KB Output is correct
44 Correct 4 ms 7380 KB Output is correct
45 Correct 4 ms 7380 KB Output is correct
46 Correct 4 ms 7380 KB Output is correct
47 Correct 4 ms 7368 KB Output is correct
48 Correct 4 ms 7508 KB Output is correct
49 Correct 4 ms 7464 KB Output is correct
50 Correct 4 ms 7380 KB Output is correct
51 Correct 4 ms 7380 KB Output is correct
52 Correct 4 ms 7380 KB Output is correct
53 Correct 5 ms 7380 KB Output is correct
54 Correct 4 ms 7368 KB Output is correct
55 Correct 4 ms 7380 KB Output is correct
56 Correct 5 ms 7380 KB Output is correct
57 Correct 5 ms 7380 KB Output is correct
58 Correct 4 ms 7380 KB Output is correct
59 Correct 4 ms 7372 KB Output is correct
60 Correct 4 ms 7372 KB Output is correct
61 Correct 4 ms 7380 KB Output is correct
62 Correct 5 ms 7380 KB Output is correct
63 Correct 4 ms 7380 KB Output is correct
64 Correct 5 ms 7368 KB Output is correct
65 Correct 5 ms 7748 KB Output is correct
66 Correct 5 ms 7508 KB Output is correct
67 Correct 5 ms 7804 KB Output is correct
68 Correct 5 ms 7636 KB Output is correct
69 Correct 5 ms 7764 KB Output is correct
70 Correct 6 ms 7636 KB Output is correct
71 Correct 7 ms 7636 KB Output is correct
72 Correct 6 ms 7636 KB Output is correct
73 Correct 5 ms 7504 KB Output is correct
74 Correct 6 ms 7636 KB Output is correct
75 Correct 5 ms 7508 KB Output is correct
76 Correct 23 ms 10664 KB Output is correct
77 Correct 22 ms 11052 KB Output is correct
78 Correct 27 ms 11628 KB Output is correct
79 Correct 7 ms 8148 KB Output is correct
80 Correct 6 ms 8128 KB Output is correct
81 Correct 5 ms 8148 KB Output is correct
82 Correct 6 ms 8148 KB Output is correct
83 Correct 6 ms 8148 KB Output is correct
84 Correct 6 ms 7764 KB Output is correct
85 Correct 7 ms 7760 KB Output is correct
86 Correct 7 ms 7764 KB Output is correct
87 Correct 6 ms 7672 KB Output is correct
88 Correct 6 ms 7764 KB Output is correct
89 Correct 6 ms 7764 KB Output is correct
90 Correct 32 ms 11992 KB Output is correct
91 Correct 30 ms 11988 KB Output is correct
92 Correct 30 ms 12032 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 4 ms 7252 KB Output is correct
2 Correct 4 ms 7252 KB Output is correct
3 Correct 4 ms 7380 KB Output is correct
4 Correct 4 ms 7252 KB Output is correct
5 Correct 4 ms 7252 KB Output is correct
6 Correct 4 ms 7252 KB Output is correct
7 Correct 4 ms 7380 KB Output is correct
8 Correct 4 ms 7252 KB Output is correct
9 Correct 5 ms 7380 KB Output is correct
10 Correct 4 ms 7364 KB Output is correct
11 Correct 4 ms 7380 KB Output is correct
12 Correct 6 ms 7308 KB Output is correct
13 Correct 4 ms 7380 KB Output is correct
14 Correct 4 ms 7368 KB Output is correct
15 Correct 4 ms 7380 KB Output is correct
16 Correct 4 ms 7380 KB Output is correct
17 Correct 4 ms 7420 KB Output is correct
18 Correct 5 ms 7380 KB Output is correct
19 Correct 5 ms 7380 KB Output is correct
20 Correct 4 ms 7380 KB Output is correct
21 Correct 4 ms 7380 KB Output is correct
22 Correct 5 ms 7380 KB Output is correct
23 Correct 4 ms 7376 KB Output is correct
24 Correct 23 ms 11804 KB Output is correct
25 Correct 24 ms 11824 KB Output is correct
26 Correct 23 ms 11784 KB Output is correct
27 Correct 7 ms 8276 KB Output is correct
28 Correct 7 ms 8276 KB Output is correct
29 Correct 7 ms 8144 KB Output is correct
30 Correct 7 ms 8148 KB Output is correct
31 Correct 7 ms 8152 KB Output is correct
32 Correct 7 ms 8144 KB Output is correct
33 Correct 15 ms 9556 KB Output is correct
34 Correct 16 ms 9568 KB Output is correct
35 Correct 14 ms 9548 KB Output is correct
36 Correct 15 ms 9552 KB Output is correct
37 Correct 15 ms 9480 KB Output is correct
38 Correct 15 ms 9556 KB Output is correct
39 Correct 31 ms 13156 KB Output is correct
40 Correct 31 ms 13124 KB Output is correct
41 Correct 30 ms 13064 KB Output is correct
42 Correct 5 ms 7360 KB Output is correct
43 Correct 4 ms 7368 KB Output is correct
44 Correct 4 ms 7252 KB Output is correct
45 Correct 6 ms 7380 KB Output is correct
46 Correct 4 ms 7380 KB Output is correct
47 Correct 4 ms 7380 KB Output is correct
48 Correct 4 ms 7380 KB Output is correct
49 Correct 4 ms 7380 KB Output is correct
50 Correct 4 ms 7380 KB Output is correct
51 Correct 4 ms 7368 KB Output is correct
52 Correct 4 ms 7364 KB Output is correct
53 Correct 4 ms 7368 KB Output is correct
54 Correct 4 ms 7368 KB Output is correct
55 Correct 4 ms 7372 KB Output is correct
56 Correct 4 ms 7380 KB Output is correct
57 Correct 4 ms 7380 KB Output is correct
58 Correct 5 ms 7380 KB Output is correct
59 Correct 4 ms 7380 KB Output is correct
60 Correct 4 ms 7380 KB Output is correct
61 Correct 4 ms 7380 KB Output is correct
62 Correct 4 ms 7368 KB Output is correct
63 Correct 4 ms 7508 KB Output is correct
64 Correct 4 ms 7464 KB Output is correct
65 Correct 4 ms 7380 KB Output is correct
66 Correct 4 ms 7380 KB Output is correct
67 Correct 4 ms 7380 KB Output is correct
68 Correct 5 ms 7380 KB Output is correct
69 Correct 4 ms 7368 KB Output is correct
70 Correct 4 ms 7380 KB Output is correct
71 Correct 5 ms 7380 KB Output is correct
72 Correct 5 ms 7380 KB Output is correct
73 Correct 4 ms 7380 KB Output is correct
74 Correct 4 ms 7372 KB Output is correct
75 Correct 4 ms 7372 KB Output is correct
76 Correct 4 ms 7380 KB Output is correct
77 Correct 5 ms 7380 KB Output is correct
78 Correct 4 ms 7380 KB Output is correct
79 Correct 5 ms 7368 KB Output is correct
80 Correct 5 ms 7748 KB Output is correct
81 Correct 5 ms 7508 KB Output is correct
82 Correct 5 ms 7804 KB Output is correct
83 Correct 5 ms 7636 KB Output is correct
84 Correct 5 ms 7764 KB Output is correct
85 Correct 6 ms 7636 KB Output is correct
86 Correct 7 ms 7636 KB Output is correct
87 Correct 6 ms 7636 KB Output is correct
88 Correct 5 ms 7504 KB Output is correct
89 Correct 6 ms 7636 KB Output is correct
90 Correct 5 ms 7508 KB Output is correct
91 Correct 23 ms 10664 KB Output is correct
92 Correct 22 ms 11052 KB Output is correct
93 Correct 27 ms 11628 KB Output is correct
94 Correct 7 ms 8148 KB Output is correct
95 Correct 6 ms 8128 KB Output is correct
96 Correct 5 ms 8148 KB Output is correct
97 Correct 6 ms 8148 KB Output is correct
98 Correct 6 ms 8148 KB Output is correct
99 Correct 6 ms 7764 KB Output is correct
100 Correct 7 ms 7760 KB Output is correct
101 Correct 7 ms 7764 KB Output is correct
102 Correct 6 ms 7672 KB Output is correct
103 Correct 6 ms 7764 KB Output is correct
104 Correct 6 ms 7764 KB Output is correct
105 Correct 32 ms 11992 KB Output is correct
106 Correct 30 ms 11988 KB Output is correct
107 Correct 30 ms 12032 KB Output is correct
108 Correct 8 ms 8276 KB Output is correct
109 Correct 123 ms 78080 KB Output is correct
110 Correct 76 ms 45776 KB Output is correct
111 Correct 60 ms 35912 KB Output is correct
112 Correct 73 ms 40268 KB Output is correct
113 Correct 53 ms 29160 KB Output is correct
114 Correct 17 ms 9556 KB Output is correct
115 Correct 17 ms 9532 KB Output is correct
116 Correct 20 ms 10248 KB Output is correct
117 Correct 16 ms 9428 KB Output is correct
118 Correct 18 ms 9680 KB Output is correct
119 Correct 16 ms 9284 KB Output is correct
120 Correct 28 ms 10868 KB Output is correct
121 Correct 10 ms 8532 KB Output is correct
122 Correct 28 ms 11224 KB Output is correct
123 Correct 11 ms 8404 KB Output is correct
124 Correct 29 ms 11836 KB Output is correct
125 Correct 12 ms 8912 KB Output is correct
126 Correct 12 ms 8920 KB Output is correct
127 Correct 16 ms 9296 KB Output is correct
128 Correct 12 ms 8788 KB Output is correct
129 Correct 12 ms 8788 KB Output is correct
130 Correct 8 ms 8276 KB Output is correct
131 Correct 171 ms 107068 KB Output is correct
132 Correct 139 ms 78016 KB Output is correct
133 Correct 116 ms 65252 KB Output is correct
134 Correct 109 ms 57592 KB Output is correct
135 Correct 96 ms 52300 KB Output is correct
136 Correct 24 ms 10608 KB Output is correct
137 Correct 23 ms 10708 KB Output is correct
138 Correct 26 ms 10708 KB Output is correct
139 Correct 23 ms 10836 KB Output is correct
140 Correct 23 ms 10628 KB Output is correct
141 Correct 23 ms 10620 KB Output is correct
142 Correct 37 ms 13096 KB Output is correct
143 Correct 14 ms 9300 KB Output is correct
144 Correct 41 ms 13128 KB Output is correct
145 Correct 14 ms 9244 KB Output is correct
146 Correct 42 ms 13192 KB Output is correct
147 Correct 14 ms 9300 KB Output is correct
148 Correct 17 ms 9688 KB Output is correct
149 Correct 16 ms 9556 KB Output is correct
150 Correct 15 ms 9428 KB Output is correct
151 Correct 15 ms 9440 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 4 ms 7252 KB Output is correct
2 Correct 4 ms 7252 KB Output is correct
3 Correct 4 ms 7380 KB Output is correct
4 Correct 4 ms 7252 KB Output is correct
5 Correct 4 ms 7252 KB Output is correct
6 Correct 4 ms 7252 KB Output is correct
7 Correct 4 ms 7380 KB Output is correct
8 Correct 4 ms 7252 KB Output is correct
9 Correct 5 ms 7380 KB Output is correct
10 Correct 4 ms 7364 KB Output is correct
11 Correct 4 ms 7380 KB Output is correct
12 Correct 6 ms 7308 KB Output is correct
13 Correct 4 ms 7380 KB Output is correct
14 Correct 4 ms 7368 KB Output is correct
15 Correct 4 ms 7380 KB Output is correct
16 Correct 4 ms 7380 KB Output is correct
17 Correct 4 ms 7420 KB Output is correct
18 Correct 5 ms 7380 KB Output is correct
19 Correct 5 ms 7380 KB Output is correct
20 Correct 4 ms 7380 KB Output is correct
21 Correct 4 ms 7380 KB Output is correct
22 Correct 5 ms 7380 KB Output is correct
23 Correct 4 ms 7376 KB Output is correct
24 Correct 23 ms 11804 KB Output is correct
25 Correct 24 ms 11824 KB Output is correct
26 Correct 23 ms 11784 KB Output is correct
27 Correct 7 ms 8276 KB Output is correct
28 Correct 7 ms 8276 KB Output is correct
29 Correct 7 ms 8144 KB Output is correct
30 Correct 7 ms 8148 KB Output is correct
31 Correct 7 ms 8152 KB Output is correct
32 Correct 7 ms 8144 KB Output is correct
33 Correct 15 ms 9556 KB Output is correct
34 Correct 16 ms 9568 KB Output is correct
35 Correct 14 ms 9548 KB Output is correct
36 Correct 15 ms 9552 KB Output is correct
37 Correct 15 ms 9480 KB Output is correct
38 Correct 15 ms 9556 KB Output is correct
39 Correct 31 ms 13156 KB Output is correct
40 Correct 31 ms 13124 KB Output is correct
41 Correct 30 ms 13064 KB Output is correct
42 Correct 19 ms 11728 KB Output is correct
43 Correct 13 ms 10068 KB Output is correct
44 Correct 20 ms 11732 KB Output is correct
45 Correct 15 ms 10320 KB Output is correct
46 Correct 12 ms 10028 KB Output is correct
47 Correct 18 ms 11864 KB Output is correct
48 Correct 65 ms 23544 KB Output is correct
49 Correct 44 ms 16460 KB Output is correct
50 Correct 49 ms 20244 KB Output is correct
51 Correct 54 ms 20460 KB Output is correct
52 Correct 57 ms 20172 KB Output is correct
53 Correct 52 ms 17244 KB Output is correct
54 Correct 21 ms 12244 KB Output is correct
55 Correct 20 ms 12240 KB Output is correct
56 Correct 21 ms 11848 KB Output is correct
57 Correct 19 ms 11804 KB Output is correct
58 Correct 19 ms 11840 KB Output is correct
59 Correct 17 ms 11860 KB Output is correct
60 Correct 73 ms 25036 KB Output is correct
61 Correct 82 ms 25000 KB Output is correct
62 Correct 78 ms 24936 KB Output is correct
63 Correct 82 ms 24920 KB Output is correct
64 Correct 100 ms 24980 KB Output is correct
65 Correct 95 ms 25036 KB Output is correct
66 Correct 77 ms 23868 KB Output is correct
67 Correct 76 ms 23884 KB Output is correct
68 Correct 76 ms 23760 KB Output is correct
69 Correct 5 ms 7360 KB Output is correct
70 Correct 4 ms 7368 KB Output is correct
71 Correct 4 ms 7252 KB Output is correct
72 Correct 6 ms 7380 KB Output is correct
73 Correct 4 ms 7380 KB Output is correct
74 Correct 4 ms 7380 KB Output is correct
75 Correct 4 ms 7380 KB Output is correct
76 Correct 4 ms 7380 KB Output is correct
77 Correct 4 ms 7380 KB Output is correct
78 Correct 4 ms 7368 KB Output is correct
79 Correct 4 ms 7364 KB Output is correct
80 Correct 4 ms 7368 KB Output is correct
81 Correct 4 ms 7368 KB Output is correct
82 Correct 4 ms 7372 KB Output is correct
83 Correct 4 ms 7380 KB Output is correct
84 Correct 4 ms 7380 KB Output is correct
85 Correct 5 ms 7380 KB Output is correct
86 Correct 4 ms 7380 KB Output is correct
87 Correct 4 ms 7380 KB Output is correct
88 Correct 4 ms 7380 KB Output is correct
89 Correct 4 ms 7368 KB Output is correct
90 Correct 4 ms 7508 KB Output is correct
91 Correct 4 ms 7464 KB Output is correct
92 Correct 4 ms 7380 KB Output is correct
93 Correct 4 ms 7380 KB Output is correct
94 Correct 4 ms 7380 KB Output is correct
95 Correct 5 ms 7380 KB Output is correct
96 Correct 4 ms 7368 KB Output is correct
97 Correct 4 ms 7380 KB Output is correct
98 Correct 5 ms 7380 KB Output is correct
99 Correct 5 ms 7380 KB Output is correct
100 Correct 4 ms 7380 KB Output is correct
101 Correct 4 ms 7372 KB Output is correct
102 Correct 4 ms 7372 KB Output is correct
103 Correct 4 ms 7380 KB Output is correct
104 Correct 5 ms 7380 KB Output is correct
105 Correct 4 ms 7380 KB Output is correct
106 Correct 5 ms 7368 KB Output is correct
107 Correct 5 ms 7748 KB Output is correct
108 Correct 5 ms 7508 KB Output is correct
109 Correct 5 ms 7804 KB Output is correct
110 Correct 5 ms 7636 KB Output is correct
111 Correct 5 ms 7764 KB Output is correct
112 Correct 6 ms 7636 KB Output is correct
113 Correct 7 ms 7636 KB Output is correct
114 Correct 6 ms 7636 KB Output is correct
115 Correct 5 ms 7504 KB Output is correct
116 Correct 6 ms 7636 KB Output is correct
117 Correct 5 ms 7508 KB Output is correct
118 Correct 23 ms 10664 KB Output is correct
119 Correct 22 ms 11052 KB Output is correct
120 Correct 27 ms 11628 KB Output is correct
121 Correct 7 ms 8148 KB Output is correct
122 Correct 6 ms 8128 KB Output is correct
123 Correct 5 ms 8148 KB Output is correct
124 Correct 6 ms 8148 KB Output is correct
125 Correct 6 ms 8148 KB Output is correct
126 Correct 6 ms 7764 KB Output is correct
127 Correct 7 ms 7760 KB Output is correct
128 Correct 7 ms 7764 KB Output is correct
129 Correct 6 ms 7672 KB Output is correct
130 Correct 6 ms 7764 KB Output is correct
131 Correct 6 ms 7764 KB Output is correct
132 Correct 32 ms 11992 KB Output is correct
133 Correct 30 ms 11988 KB Output is correct
134 Correct 30 ms 12032 KB Output is correct
135 Correct 8 ms 8276 KB Output is correct
136 Correct 123 ms 78080 KB Output is correct
137 Correct 76 ms 45776 KB Output is correct
138 Correct 60 ms 35912 KB Output is correct
139 Correct 73 ms 40268 KB Output is correct
140 Correct 53 ms 29160 KB Output is correct
141 Correct 17 ms 9556 KB Output is correct
142 Correct 17 ms 9532 KB Output is correct
143 Correct 20 ms 10248 KB Output is correct
144 Correct 16 ms 9428 KB Output is correct
145 Correct 18 ms 9680 KB Output is correct
146 Correct 16 ms 9284 KB Output is correct
147 Correct 28 ms 10868 KB Output is correct
148 Correct 10 ms 8532 KB Output is correct
149 Correct 28 ms 11224 KB Output is correct
150 Correct 11 ms 8404 KB Output is correct
151 Correct 29 ms 11836 KB Output is correct
152 Correct 12 ms 8912 KB Output is correct
153 Correct 12 ms 8920 KB Output is correct
154 Correct 16 ms 9296 KB Output is correct
155 Correct 12 ms 8788 KB Output is correct
156 Correct 12 ms 8788 KB Output is correct
157 Correct 8 ms 8276 KB Output is correct
158 Correct 171 ms 107068 KB Output is correct
159 Correct 139 ms 78016 KB Output is correct
160 Correct 116 ms 65252 KB Output is correct
161 Correct 109 ms 57592 KB Output is correct
162 Correct 96 ms 52300 KB Output is correct
163 Correct 24 ms 10608 KB Output is correct
164 Correct 23 ms 10708 KB Output is correct
165 Correct 26 ms 10708 KB Output is correct
166 Correct 23 ms 10836 KB Output is correct
167 Correct 23 ms 10628 KB Output is correct
168 Correct 23 ms 10620 KB Output is correct
169 Correct 37 ms 13096 KB Output is correct
170 Correct 14 ms 9300 KB Output is correct
171 Correct 41 ms 13128 KB Output is correct
172 Correct 14 ms 9244 KB Output is correct
173 Correct 42 ms 13192 KB Output is correct
174 Correct 14 ms 9300 KB Output is correct
175 Correct 17 ms 9688 KB Output is correct
176 Correct 16 ms 9556 KB Output is correct
177 Correct 15 ms 9428 KB Output is correct
178 Correct 15 ms 9440 KB Output is correct
179 Correct 15 ms 10324 KB Output is correct
180 Correct 374 ms 207016 KB Output is correct
181 Correct 432 ms 231680 KB Output is correct
182 Correct 576 ms 286400 KB Output is correct
183 Correct 300 ms 147660 KB Output is correct
184 Correct 247 ms 122048 KB Output is correct
185 Correct 41 ms 13752 KB Output is correct
186 Correct 45 ms 16568 KB Output is correct
187 Correct 47 ms 15044 KB Output is correct
188 Correct 49 ms 14904 KB Output is correct
189 Correct 56 ms 15400 KB Output is correct
190 Correct 57 ms 16944 KB Output is correct
191 Correct 56 ms 16596 KB Output is correct
192 Correct 41 ms 13196 KB Output is correct
193 Correct 37 ms 13132 KB Output is correct
194 Correct 21 ms 12244 KB Output is correct
195 Correct 949 ms 505672 KB Output is correct
196 Correct 670 ms 359784 KB Output is correct
197 Correct 608 ms 296296 KB Output is correct
198 Correct 538 ms 257956 KB Output is correct
199 Correct 482 ms 231692 KB Output is correct
200 Correct 103 ms 25608 KB Output is correct
201 Correct 96 ms 25616 KB Output is correct
202 Correct 91 ms 25536 KB Output is correct
203 Correct 93 ms 25548 KB Output is correct
204 Correct 93 ms 25540 KB Output is correct
205 Correct 88 ms 25548 KB Output is correct
206 Correct 91 ms 23860 KB Output is correct
207 Correct 78 ms 23988 KB Output is correct
208 Correct 92 ms 23888 KB Output is correct
209 Correct 84 ms 23916 KB Output is correct
210 Correct 86 ms 23884 KB Output is correct
211 Correct 79 ms 24016 KB Output is correct
212 Correct 80 ms 25332 KB Output is correct
213 Correct 74 ms 20932 KB Output is correct
214 Correct 71 ms 20044 KB Output is correct
215 Correct 76 ms 19640 KB Output is correct