답안 #417860

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
417860 2021-06-04T12:34:15 Z 반딧불(#7603) RPS string (innopolis2021_final_C) C++17
100 / 100
173 ms 33580 KB
#include <bits/stdc++.h>

using namespace std;

typedef long long ll;

struct Fenwick{
    int n;
    int tree[500002];

    void init(int _n){
        n = _n;
        for(int i=1; i<=n; i++) tree[i] = 0;
    }

    void add(int x, int y){
        while(x <= n){
            tree[x] += y;
            x += x&-x;
        }
    }

    void add(int s, int e, int v){
        s = max(s, 1);
        e = min(e, n);
        if(s>e) return;
        add(s, v);
        add(e+1, -v);
    }

    int sum(int x){
        int ret = 0;
        while(x){
            ret += tree[x];
            x -= x&-x;
        }
        return ret;
    }
} tree[3][2];

int t;
int n, d;
int arr[500002];
int sum[500002][3];
bool ans[500002];

int l[500002][3], r[500002][3];

int main(){
    scanf("%d", &t);
    while(t--){
        string _str;
        scanf("%d", &d);
        cin >> _str;
        n = (int)_str.size();

        for(int i=1; i<=n; i++){
            char c = _str[i-1];
            arr[i] = (c=='r' ? 0 : (c=='p' ? 1 : 2));

            sum[i][0] = sum[i][1] = sum[i][2] = 0;
            sum[i][arr[i]]++;
        }
        for(int i=1; i<=n; i++) for(int j=0; j<3; j++) sum[i][j] += sum[i-1][j];

        if(d == 1){
            for(int i=1; i<=n; i++){
                int x = arr[i];
                ans[i] = 0;
                if(i!=1 && sum[i-1][(x+1)%3] && !sum[i-1][(x+2)%3]) continue;
                if(i!=n && sum[n][(x+1)%3] != sum[i][(x+1)%3] && sum[n][(x+2)%3] == sum[i][(x+2)%3]) continue;
                ans[i] = 1;
            }
        }
        else{
            int near[3] = {0, 0, 0};
            for(int i=1; i<=n; i++){
                for(int j=0; j<3; j++) l[i][j] = near[j];
                near[arr[i]] = i;
            }

            near[0] = near[1] = near[2] = n+1;
            for(int i=n; i>=1; i--){
                for(int j=0; j<3; j++) r[i][j] = near[j];
                near[arr[i]] = i;
            }

            for(int i=0; i<3; i++) tree[i][0].init(n), tree[i][1].init(n);
            for(int i=1; i<=n; i++){
                int x = arr[i];
                if(sum[n][(x+1)%3] == sum[i][(x+1)%3] || sum[n][(x+2)%3] != sum[i][(x+2)%3]){
                    int xp1 = l[i][(x+1)%3];
                    int xp2 = l[i][(x+2)%3];
                    tree[(x+1)%3][1].add(1, xp2-1, 1);
                    tree[(x+1)%3][1].add(xp1, i, 1);
                }
                if(!sum[i-1][(x+1)%3] || sum[i-1][(x+2)%3]){
                    int xp1 = r[i][(x+1)%3];
                    int xp2 = r[i][(x+2)%3];
                    tree[(x+1)%3][0].add(i, xp1, 1);
                    tree[(x+1)%3][0].add(xp2+1, n, 1);
                }
            }

            for(int i=1; i<=n; i++){
                int x = arr[i];
                ans[i] = 0;
                if(i>1 && !tree[x][0].sum(i)) continue;
                if(i<n && !tree[x][1].sum(i)) continue;
                ans[i] = 1;
            }
        }

        for(int i=1; i<=n; i++) printf("%d", ans[i]);
        puts("");
    }
}

Compilation message

Main.cpp: In function 'int main()':
Main.cpp:50:10: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
   50 |     scanf("%d", &t);
      |     ~~~~~^~~~~~~~~~
Main.cpp:53:14: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
   53 |         scanf("%d", &d);
      |         ~~~~~^~~~~~~~~~
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 332 KB Output is correct
2 Correct 0 ms 204 KB Output is correct
3 Correct 1 ms 332 KB Output is correct
4 Correct 1 ms 204 KB Output is correct
5 Correct 0 ms 204 KB Output is correct
6 Correct 0 ms 332 KB Output is correct
7 Correct 0 ms 332 KB Output is correct
8 Correct 1 ms 204 KB Output is correct
9 Correct 0 ms 204 KB Output is correct
10 Correct 0 ms 204 KB Output is correct
11 Correct 0 ms 332 KB Output is correct
12 Correct 1 ms 332 KB Output is correct
13 Correct 1 ms 204 KB Output is correct
14 Correct 1 ms 204 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 332 KB Output is correct
2 Correct 0 ms 204 KB Output is correct
3 Correct 1 ms 332 KB Output is correct
4 Correct 1 ms 204 KB Output is correct
5 Correct 0 ms 204 KB Output is correct
6 Correct 0 ms 332 KB Output is correct
7 Correct 0 ms 332 KB Output is correct
8 Correct 1 ms 204 KB Output is correct
9 Correct 0 ms 204 KB Output is correct
10 Correct 0 ms 204 KB Output is correct
11 Correct 0 ms 332 KB Output is correct
12 Correct 1 ms 332 KB Output is correct
13 Correct 1 ms 204 KB Output is correct
14 Correct 1 ms 204 KB Output is correct
15 Correct 1 ms 204 KB Output is correct
16 Correct 1 ms 204 KB Output is correct
17 Correct 1 ms 204 KB Output is correct
18 Correct 1 ms 204 KB Output is correct
19 Correct 1 ms 332 KB Output is correct
20 Correct 1 ms 204 KB Output is correct
21 Correct 1 ms 204 KB Output is correct
22 Correct 1 ms 204 KB Output is correct
23 Correct 1 ms 332 KB Output is correct
24 Correct 1 ms 332 KB Output is correct
25 Correct 0 ms 332 KB Output is correct
26 Correct 0 ms 332 KB Output is correct
27 Correct 1 ms 332 KB Output is correct
28 Correct 1 ms 332 KB Output is correct
29 Correct 1 ms 332 KB Output is correct
30 Correct 1 ms 204 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 332 KB Output is correct
2 Correct 0 ms 204 KB Output is correct
3 Correct 1 ms 332 KB Output is correct
4 Correct 1 ms 204 KB Output is correct
5 Correct 0 ms 204 KB Output is correct
6 Correct 0 ms 332 KB Output is correct
7 Correct 0 ms 332 KB Output is correct
8 Correct 1 ms 204 KB Output is correct
9 Correct 0 ms 204 KB Output is correct
10 Correct 0 ms 204 KB Output is correct
11 Correct 0 ms 332 KB Output is correct
12 Correct 1 ms 332 KB Output is correct
13 Correct 1 ms 204 KB Output is correct
14 Correct 1 ms 204 KB Output is correct
15 Correct 1 ms 204 KB Output is correct
16 Correct 1 ms 204 KB Output is correct
17 Correct 1 ms 204 KB Output is correct
18 Correct 1 ms 204 KB Output is correct
19 Correct 1 ms 332 KB Output is correct
20 Correct 1 ms 204 KB Output is correct
21 Correct 1 ms 204 KB Output is correct
22 Correct 1 ms 204 KB Output is correct
23 Correct 1 ms 332 KB Output is correct
24 Correct 1 ms 332 KB Output is correct
25 Correct 0 ms 332 KB Output is correct
26 Correct 0 ms 332 KB Output is correct
27 Correct 1 ms 332 KB Output is correct
28 Correct 1 ms 332 KB Output is correct
29 Correct 1 ms 332 KB Output is correct
30 Correct 1 ms 204 KB Output is correct
31 Correct 2 ms 332 KB Output is correct
32 Correct 2 ms 332 KB Output is correct
33 Correct 2 ms 332 KB Output is correct
34 Correct 2 ms 332 KB Output is correct
35 Correct 2 ms 332 KB Output is correct
36 Correct 1 ms 332 KB Output is correct
37 Correct 1 ms 332 KB Output is correct
38 Correct 1 ms 332 KB Output is correct
39 Correct 1 ms 332 KB Output is correct
40 Correct 1 ms 332 KB Output is correct
41 Correct 1 ms 332 KB Output is correct
42 Correct 1 ms 332 KB Output is correct
43 Correct 1 ms 332 KB Output is correct
44 Correct 1 ms 332 KB Output is correct
45 Correct 1 ms 332 KB Output is correct
46 Correct 1 ms 332 KB Output is correct
47 Correct 1 ms 332 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 332 KB Output is correct
2 Correct 0 ms 204 KB Output is correct
3 Correct 1 ms 332 KB Output is correct
4 Correct 1 ms 204 KB Output is correct
5 Correct 0 ms 204 KB Output is correct
6 Correct 0 ms 332 KB Output is correct
7 Correct 0 ms 332 KB Output is correct
8 Correct 1 ms 204 KB Output is correct
9 Correct 0 ms 204 KB Output is correct
10 Correct 0 ms 204 KB Output is correct
11 Correct 0 ms 332 KB Output is correct
12 Correct 1 ms 332 KB Output is correct
13 Correct 1 ms 204 KB Output is correct
14 Correct 1 ms 204 KB Output is correct
15 Correct 1 ms 204 KB Output is correct
16 Correct 1 ms 204 KB Output is correct
17 Correct 1 ms 204 KB Output is correct
18 Correct 1 ms 204 KB Output is correct
19 Correct 1 ms 332 KB Output is correct
20 Correct 1 ms 204 KB Output is correct
21 Correct 1 ms 204 KB Output is correct
22 Correct 1 ms 204 KB Output is correct
23 Correct 1 ms 332 KB Output is correct
24 Correct 1 ms 332 KB Output is correct
25 Correct 0 ms 332 KB Output is correct
26 Correct 0 ms 332 KB Output is correct
27 Correct 1 ms 332 KB Output is correct
28 Correct 1 ms 332 KB Output is correct
29 Correct 1 ms 332 KB Output is correct
30 Correct 1 ms 204 KB Output is correct
31 Correct 2 ms 332 KB Output is correct
32 Correct 2 ms 332 KB Output is correct
33 Correct 2 ms 332 KB Output is correct
34 Correct 2 ms 332 KB Output is correct
35 Correct 2 ms 332 KB Output is correct
36 Correct 1 ms 332 KB Output is correct
37 Correct 1 ms 332 KB Output is correct
38 Correct 1 ms 332 KB Output is correct
39 Correct 1 ms 332 KB Output is correct
40 Correct 1 ms 332 KB Output is correct
41 Correct 1 ms 332 KB Output is correct
42 Correct 1 ms 332 KB Output is correct
43 Correct 1 ms 332 KB Output is correct
44 Correct 1 ms 332 KB Output is correct
45 Correct 1 ms 332 KB Output is correct
46 Correct 1 ms 332 KB Output is correct
47 Correct 1 ms 332 KB Output is correct
48 Correct 143 ms 752 KB Output is correct
49 Correct 145 ms 836 KB Output is correct
50 Correct 150 ms 772 KB Output is correct
51 Correct 142 ms 772 KB Output is correct
52 Correct 142 ms 744 KB Output is correct
53 Correct 162 ms 904 KB Output is correct
54 Correct 148 ms 828 KB Output is correct
55 Correct 150 ms 840 KB Output is correct
56 Correct 146 ms 904 KB Output is correct
57 Correct 140 ms 740 KB Output is correct
58 Correct 140 ms 836 KB Output is correct
59 Correct 144 ms 828 KB Output is correct
60 Correct 142 ms 824 KB Output is correct
61 Correct 141 ms 748 KB Output is correct
62 Correct 144 ms 736 KB Output is correct
63 Correct 66 ms 2576 KB Output is correct
64 Correct 68 ms 9776 KB Output is correct
65 Correct 67 ms 2672 KB Output is correct
66 Correct 70 ms 9732 KB Output is correct
67 Correct 65 ms 2668 KB Output is correct
68 Correct 64 ms 1748 KB Output is correct
69 Correct 65 ms 832 KB Output is correct
70 Correct 67 ms 736 KB Output is correct
71 Correct 67 ms 2752 KB Output is correct
72 Correct 65 ms 1656 KB Output is correct
73 Correct 71 ms 792 KB Output is correct
74 Correct 67 ms 708 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 332 KB Output is correct
2 Correct 0 ms 204 KB Output is correct
3 Correct 1 ms 332 KB Output is correct
4 Correct 1 ms 204 KB Output is correct
5 Correct 0 ms 204 KB Output is correct
6 Correct 0 ms 332 KB Output is correct
7 Correct 0 ms 332 KB Output is correct
8 Correct 1 ms 204 KB Output is correct
9 Correct 0 ms 204 KB Output is correct
10 Correct 0 ms 204 KB Output is correct
11 Correct 0 ms 332 KB Output is correct
12 Correct 1 ms 332 KB Output is correct
13 Correct 1 ms 204 KB Output is correct
14 Correct 1 ms 204 KB Output is correct
15 Correct 1 ms 332 KB Output is correct
16 Correct 1 ms 332 KB Output is correct
17 Correct 0 ms 332 KB Output is correct
18 Correct 0 ms 332 KB Output is correct
19 Correct 0 ms 332 KB Output is correct
20 Correct 1 ms 384 KB Output is correct
21 Correct 1 ms 332 KB Output is correct
22 Correct 0 ms 332 KB Output is correct
23 Correct 0 ms 332 KB Output is correct
24 Correct 0 ms 332 KB Output is correct
25 Correct 1 ms 332 KB Output is correct
26 Correct 0 ms 332 KB Output is correct
27 Correct 1 ms 332 KB Output is correct
28 Correct 1 ms 332 KB Output is correct
29 Correct 0 ms 332 KB Output is correct
30 Correct 0 ms 332 KB Output is correct
31 Correct 1 ms 332 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 332 KB Output is correct
2 Correct 0 ms 204 KB Output is correct
3 Correct 1 ms 332 KB Output is correct
4 Correct 1 ms 204 KB Output is correct
5 Correct 0 ms 204 KB Output is correct
6 Correct 0 ms 332 KB Output is correct
7 Correct 0 ms 332 KB Output is correct
8 Correct 1 ms 204 KB Output is correct
9 Correct 0 ms 204 KB Output is correct
10 Correct 0 ms 204 KB Output is correct
11 Correct 0 ms 332 KB Output is correct
12 Correct 1 ms 332 KB Output is correct
13 Correct 1 ms 204 KB Output is correct
14 Correct 1 ms 204 KB Output is correct
15 Correct 1 ms 204 KB Output is correct
16 Correct 1 ms 204 KB Output is correct
17 Correct 1 ms 204 KB Output is correct
18 Correct 1 ms 204 KB Output is correct
19 Correct 1 ms 332 KB Output is correct
20 Correct 1 ms 204 KB Output is correct
21 Correct 1 ms 204 KB Output is correct
22 Correct 1 ms 204 KB Output is correct
23 Correct 1 ms 332 KB Output is correct
24 Correct 1 ms 332 KB Output is correct
25 Correct 0 ms 332 KB Output is correct
26 Correct 0 ms 332 KB Output is correct
27 Correct 1 ms 332 KB Output is correct
28 Correct 1 ms 332 KB Output is correct
29 Correct 1 ms 332 KB Output is correct
30 Correct 1 ms 204 KB Output is correct
31 Correct 1 ms 332 KB Output is correct
32 Correct 1 ms 332 KB Output is correct
33 Correct 0 ms 332 KB Output is correct
34 Correct 0 ms 332 KB Output is correct
35 Correct 0 ms 332 KB Output is correct
36 Correct 1 ms 384 KB Output is correct
37 Correct 1 ms 332 KB Output is correct
38 Correct 0 ms 332 KB Output is correct
39 Correct 0 ms 332 KB Output is correct
40 Correct 0 ms 332 KB Output is correct
41 Correct 1 ms 332 KB Output is correct
42 Correct 0 ms 332 KB Output is correct
43 Correct 1 ms 332 KB Output is correct
44 Correct 1 ms 332 KB Output is correct
45 Correct 0 ms 332 KB Output is correct
46 Correct 0 ms 332 KB Output is correct
47 Correct 1 ms 332 KB Output is correct
48 Correct 1 ms 332 KB Output is correct
49 Correct 1 ms 332 KB Output is correct
50 Correct 1 ms 332 KB Output is correct
51 Correct 1 ms 332 KB Output is correct
52 Correct 1 ms 332 KB Output is correct
53 Correct 1 ms 332 KB Output is correct
54 Correct 1 ms 332 KB Output is correct
55 Correct 1 ms 332 KB Output is correct
56 Correct 1 ms 332 KB Output is correct
57 Correct 1 ms 332 KB Output is correct
58 Correct 0 ms 332 KB Output is correct
59 Correct 0 ms 332 KB Output is correct
60 Correct 1 ms 332 KB Output is correct
61 Correct 1 ms 332 KB Output is correct
62 Correct 1 ms 332 KB Output is correct
63 Correct 1 ms 332 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 332 KB Output is correct
2 Correct 0 ms 204 KB Output is correct
3 Correct 1 ms 332 KB Output is correct
4 Correct 1 ms 204 KB Output is correct
5 Correct 0 ms 204 KB Output is correct
6 Correct 0 ms 332 KB Output is correct
7 Correct 0 ms 332 KB Output is correct
8 Correct 1 ms 204 KB Output is correct
9 Correct 0 ms 204 KB Output is correct
10 Correct 0 ms 204 KB Output is correct
11 Correct 0 ms 332 KB Output is correct
12 Correct 1 ms 332 KB Output is correct
13 Correct 1 ms 204 KB Output is correct
14 Correct 1 ms 204 KB Output is correct
15 Correct 1 ms 204 KB Output is correct
16 Correct 1 ms 204 KB Output is correct
17 Correct 1 ms 204 KB Output is correct
18 Correct 1 ms 204 KB Output is correct
19 Correct 1 ms 332 KB Output is correct
20 Correct 1 ms 204 KB Output is correct
21 Correct 1 ms 204 KB Output is correct
22 Correct 1 ms 204 KB Output is correct
23 Correct 1 ms 332 KB Output is correct
24 Correct 1 ms 332 KB Output is correct
25 Correct 0 ms 332 KB Output is correct
26 Correct 0 ms 332 KB Output is correct
27 Correct 1 ms 332 KB Output is correct
28 Correct 1 ms 332 KB Output is correct
29 Correct 1 ms 332 KB Output is correct
30 Correct 1 ms 204 KB Output is correct
31 Correct 2 ms 332 KB Output is correct
32 Correct 2 ms 332 KB Output is correct
33 Correct 2 ms 332 KB Output is correct
34 Correct 2 ms 332 KB Output is correct
35 Correct 2 ms 332 KB Output is correct
36 Correct 1 ms 332 KB Output is correct
37 Correct 1 ms 332 KB Output is correct
38 Correct 1 ms 332 KB Output is correct
39 Correct 1 ms 332 KB Output is correct
40 Correct 1 ms 332 KB Output is correct
41 Correct 1 ms 332 KB Output is correct
42 Correct 1 ms 332 KB Output is correct
43 Correct 1 ms 332 KB Output is correct
44 Correct 1 ms 332 KB Output is correct
45 Correct 1 ms 332 KB Output is correct
46 Correct 1 ms 332 KB Output is correct
47 Correct 1 ms 332 KB Output is correct
48 Correct 1 ms 332 KB Output is correct
49 Correct 1 ms 332 KB Output is correct
50 Correct 0 ms 332 KB Output is correct
51 Correct 0 ms 332 KB Output is correct
52 Correct 0 ms 332 KB Output is correct
53 Correct 1 ms 384 KB Output is correct
54 Correct 1 ms 332 KB Output is correct
55 Correct 0 ms 332 KB Output is correct
56 Correct 0 ms 332 KB Output is correct
57 Correct 0 ms 332 KB Output is correct
58 Correct 1 ms 332 KB Output is correct
59 Correct 0 ms 332 KB Output is correct
60 Correct 1 ms 332 KB Output is correct
61 Correct 1 ms 332 KB Output is correct
62 Correct 0 ms 332 KB Output is correct
63 Correct 0 ms 332 KB Output is correct
64 Correct 1 ms 332 KB Output is correct
65 Correct 1 ms 332 KB Output is correct
66 Correct 1 ms 332 KB Output is correct
67 Correct 1 ms 332 KB Output is correct
68 Correct 1 ms 332 KB Output is correct
69 Correct 1 ms 332 KB Output is correct
70 Correct 1 ms 332 KB Output is correct
71 Correct 1 ms 332 KB Output is correct
72 Correct 1 ms 332 KB Output is correct
73 Correct 1 ms 332 KB Output is correct
74 Correct 1 ms 332 KB Output is correct
75 Correct 0 ms 332 KB Output is correct
76 Correct 0 ms 332 KB Output is correct
77 Correct 1 ms 332 KB Output is correct
78 Correct 1 ms 332 KB Output is correct
79 Correct 1 ms 332 KB Output is correct
80 Correct 1 ms 332 KB Output is correct
81 Correct 2 ms 332 KB Output is correct
82 Correct 2 ms 332 KB Output is correct
83 Correct 2 ms 332 KB Output is correct
84 Correct 3 ms 332 KB Output is correct
85 Correct 3 ms 332 KB Output is correct
86 Correct 2 ms 332 KB Output is correct
87 Correct 2 ms 588 KB Output is correct
88 Correct 2 ms 332 KB Output is correct
89 Correct 2 ms 588 KB Output is correct
90 Correct 2 ms 332 KB Output is correct
91 Correct 2 ms 332 KB Output is correct
92 Correct 2 ms 332 KB Output is correct
93 Correct 2 ms 716 KB Output is correct
94 Correct 2 ms 332 KB Output is correct
95 Correct 2 ms 332 KB Output is correct
96 Correct 2 ms 332 KB Output is correct
97 Correct 2 ms 588 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 332 KB Output is correct
2 Correct 0 ms 204 KB Output is correct
3 Correct 1 ms 332 KB Output is correct
4 Correct 1 ms 204 KB Output is correct
5 Correct 0 ms 204 KB Output is correct
6 Correct 0 ms 332 KB Output is correct
7 Correct 0 ms 332 KB Output is correct
8 Correct 1 ms 204 KB Output is correct
9 Correct 0 ms 204 KB Output is correct
10 Correct 0 ms 204 KB Output is correct
11 Correct 0 ms 332 KB Output is correct
12 Correct 1 ms 332 KB Output is correct
13 Correct 1 ms 204 KB Output is correct
14 Correct 1 ms 204 KB Output is correct
15 Correct 1 ms 204 KB Output is correct
16 Correct 1 ms 204 KB Output is correct
17 Correct 1 ms 204 KB Output is correct
18 Correct 1 ms 204 KB Output is correct
19 Correct 1 ms 332 KB Output is correct
20 Correct 1 ms 204 KB Output is correct
21 Correct 1 ms 204 KB Output is correct
22 Correct 1 ms 204 KB Output is correct
23 Correct 1 ms 332 KB Output is correct
24 Correct 1 ms 332 KB Output is correct
25 Correct 0 ms 332 KB Output is correct
26 Correct 0 ms 332 KB Output is correct
27 Correct 1 ms 332 KB Output is correct
28 Correct 1 ms 332 KB Output is correct
29 Correct 1 ms 332 KB Output is correct
30 Correct 1 ms 204 KB Output is correct
31 Correct 2 ms 332 KB Output is correct
32 Correct 2 ms 332 KB Output is correct
33 Correct 2 ms 332 KB Output is correct
34 Correct 2 ms 332 KB Output is correct
35 Correct 2 ms 332 KB Output is correct
36 Correct 1 ms 332 KB Output is correct
37 Correct 1 ms 332 KB Output is correct
38 Correct 1 ms 332 KB Output is correct
39 Correct 1 ms 332 KB Output is correct
40 Correct 1 ms 332 KB Output is correct
41 Correct 1 ms 332 KB Output is correct
42 Correct 1 ms 332 KB Output is correct
43 Correct 1 ms 332 KB Output is correct
44 Correct 1 ms 332 KB Output is correct
45 Correct 1 ms 332 KB Output is correct
46 Correct 1 ms 332 KB Output is correct
47 Correct 1 ms 332 KB Output is correct
48 Correct 143 ms 752 KB Output is correct
49 Correct 145 ms 836 KB Output is correct
50 Correct 150 ms 772 KB Output is correct
51 Correct 142 ms 772 KB Output is correct
52 Correct 142 ms 744 KB Output is correct
53 Correct 162 ms 904 KB Output is correct
54 Correct 148 ms 828 KB Output is correct
55 Correct 150 ms 840 KB Output is correct
56 Correct 146 ms 904 KB Output is correct
57 Correct 140 ms 740 KB Output is correct
58 Correct 140 ms 836 KB Output is correct
59 Correct 144 ms 828 KB Output is correct
60 Correct 142 ms 824 KB Output is correct
61 Correct 141 ms 748 KB Output is correct
62 Correct 144 ms 736 KB Output is correct
63 Correct 66 ms 2576 KB Output is correct
64 Correct 68 ms 9776 KB Output is correct
65 Correct 67 ms 2672 KB Output is correct
66 Correct 70 ms 9732 KB Output is correct
67 Correct 65 ms 2668 KB Output is correct
68 Correct 64 ms 1748 KB Output is correct
69 Correct 65 ms 832 KB Output is correct
70 Correct 67 ms 736 KB Output is correct
71 Correct 67 ms 2752 KB Output is correct
72 Correct 65 ms 1656 KB Output is correct
73 Correct 71 ms 792 KB Output is correct
74 Correct 67 ms 708 KB Output is correct
75 Correct 1 ms 332 KB Output is correct
76 Correct 1 ms 332 KB Output is correct
77 Correct 0 ms 332 KB Output is correct
78 Correct 0 ms 332 KB Output is correct
79 Correct 0 ms 332 KB Output is correct
80 Correct 1 ms 384 KB Output is correct
81 Correct 1 ms 332 KB Output is correct
82 Correct 0 ms 332 KB Output is correct
83 Correct 0 ms 332 KB Output is correct
84 Correct 0 ms 332 KB Output is correct
85 Correct 1 ms 332 KB Output is correct
86 Correct 0 ms 332 KB Output is correct
87 Correct 1 ms 332 KB Output is correct
88 Correct 1 ms 332 KB Output is correct
89 Correct 0 ms 332 KB Output is correct
90 Correct 0 ms 332 KB Output is correct
91 Correct 1 ms 332 KB Output is correct
92 Correct 1 ms 332 KB Output is correct
93 Correct 1 ms 332 KB Output is correct
94 Correct 1 ms 332 KB Output is correct
95 Correct 1 ms 332 KB Output is correct
96 Correct 1 ms 332 KB Output is correct
97 Correct 1 ms 332 KB Output is correct
98 Correct 1 ms 332 KB Output is correct
99 Correct 1 ms 332 KB Output is correct
100 Correct 1 ms 332 KB Output is correct
101 Correct 1 ms 332 KB Output is correct
102 Correct 0 ms 332 KB Output is correct
103 Correct 0 ms 332 KB Output is correct
104 Correct 1 ms 332 KB Output is correct
105 Correct 1 ms 332 KB Output is correct
106 Correct 1 ms 332 KB Output is correct
107 Correct 1 ms 332 KB Output is correct
108 Correct 2 ms 332 KB Output is correct
109 Correct 2 ms 332 KB Output is correct
110 Correct 2 ms 332 KB Output is correct
111 Correct 3 ms 332 KB Output is correct
112 Correct 3 ms 332 KB Output is correct
113 Correct 2 ms 332 KB Output is correct
114 Correct 2 ms 588 KB Output is correct
115 Correct 2 ms 332 KB Output is correct
116 Correct 2 ms 588 KB Output is correct
117 Correct 2 ms 332 KB Output is correct
118 Correct 2 ms 332 KB Output is correct
119 Correct 2 ms 332 KB Output is correct
120 Correct 2 ms 716 KB Output is correct
121 Correct 2 ms 332 KB Output is correct
122 Correct 2 ms 332 KB Output is correct
123 Correct 2 ms 332 KB Output is correct
124 Correct 2 ms 588 KB Output is correct
125 Correct 0 ms 332 KB Output is correct
126 Correct 165 ms 1536 KB Output is correct
127 Correct 165 ms 1584 KB Output is correct
128 Correct 173 ms 1384 KB Output is correct
129 Correct 163 ms 1476 KB Output is correct
130 Correct 162 ms 1420 KB Output is correct
131 Correct 162 ms 1476 KB Output is correct
132 Correct 166 ms 1408 KB Output is correct
133 Correct 168 ms 1536 KB Output is correct
134 Correct 166 ms 1440 KB Output is correct
135 Correct 166 ms 1480 KB Output is correct
136 Correct 168 ms 1580 KB Output is correct
137 Correct 165 ms 1528 KB Output is correct
138 Correct 165 ms 1420 KB Output is correct
139 Correct 167 ms 1444 KB Output is correct
140 Correct 164 ms 1520 KB Output is correct
141 Correct 141 ms 7820 KB Output is correct
142 Correct 166 ms 33580 KB Output is correct
143 Correct 141 ms 7896 KB Output is correct
144 Correct 125 ms 33580 KB Output is correct
145 Correct 159 ms 7876 KB Output is correct
146 Correct 153 ms 4584 KB Output is correct
147 Correct 140 ms 1752 KB Output is correct
148 Correct 121 ms 1344 KB Output is correct
149 Correct 169 ms 7876 KB Output is correct
150 Correct 158 ms 4560 KB Output is correct
151 Correct 135 ms 1672 KB Output is correct
152 Correct 128 ms 1396 KB Output is correct