Submission #1041798

# Submission time Handle Problem Language Result Execution time Memory
1041798 2024-08-02T08:24:55 Z 정희우(#11003) Brought Down the Grading Server? (CEOI23_balance) C++17
100 / 100
259 ms 39800 KB
#include<iostream>
#include<algorithm>
#include<vector>

using namespace std;
using lint = long long;
using vint = vector<int>;
using pii = pair<int,int>;

const int MAX_N=100010;

struct Edge
{
    int v,i;
};

int n,m,k;
vector<vint> arr;
vector<vint> larr,rarr;
int ei[MAX_N];
int label;
vector<vint> check;
vector<vector<Edge>> edge;
int state[MAX_N];
vector<Edge> task[MAX_N];
vector<Edge> oddt;

void dfs(int v,int r)
{
    for(;ei[v]<r;ei[v]++)
        if(check[v][ei[v]]!=label)
        {
            check[v][ei[v]]=label;
            Edge e=edge[v][ei[v]];
            check[e.v][e.i]=label;
            larr[v].push_back(arr[v][ei[v]]);
            rarr[e.v].push_back(arr[e.v][e.i]);
            return dfs(e.v,r);
        }
}

void calc(int l,int r)
{
    if(l+1==r)return;
    for(int i=0;i<n;i++)
        for(int j=l;j<r;j++)
        {
            if(state[arr[i][j]])
            {
                task[arr[i][j]].clear();
                state[arr[i][j]]=0;
            }
            task[arr[i][j]].push_back({i,j});
        }
    oddt.clear();
    for(int i=0;i<n;i++)
    {
        for(int j=l;j<r;j++)
            if(state[arr[i][j]]==0)
            {
                state[arr[i][j]]=1;
                int p=arr[i][j];
                int sz=task[p].size();
                for(int l=0;l<sz-1;l+=2)
                {
                    Edge e1=task[p][l],e2=task[p][l+1];
                    edge[e1.v][e1.i]=e2;
                    edge[e2.v][e2.i]=e1;
                }
                if(sz%2)oddt.push_back(task[p].back());
            }
    }
    int sz=oddt.size();
    for(int l=0;l<sz;l+=2)
    {
        Edge e1=oddt[l],e2=oddt[l+1];
        edge[e1.v][e1.i]=e2;
        edge[e2.v][e2.i]=e1;
    }
    for(int i=0;i<n;i++)
    {
        ei[i]=l;
        larr[i].clear();
        rarr[i].clear();
    }
    label++;
    for(int i=0;i<n;i++)
        for(int j=l;j<r;j++)
            if(ei[i]<r)
                dfs(i,r);
    int mid=(l+r)/2;
    for(int i=0;i<n;i++)
        for(int j=l;j<mid;j++)
            arr[i][j]=larr[i][j-l];
    for(int i=0;i<n;i++)
        for(int j=mid;j<r;j++)
            arr[i][j]=rarr[i][j-mid];
    calc(l,mid);
    calc(mid,r);
}

int main()
{
    ios::sync_with_stdio(0),cin.tie(0),cout.tie(0);
    cin >> n >> m >> k;
    arr.resize(n);
    larr.resize(n);
    rarr.resize(n);
    check.resize(n);
    edge.resize(n);
    for(int i=0;i<n;i++)
    {
        arr[i].resize(m);
        check[i].resize(m);
        edge[i].resize(m);
        for(int j=0;j<m;j++)
            cin >> arr[i][j];
    }
    calc(0,m);
    for(int i=0;i<n;i++,cout << '\n')
        for(int j=0;j<m;j++)
            cout << arr[i][j] << ' ';
    return 0;
}
# Verdict Execution time Memory Grader output
1 Correct 1 ms 2652 KB Correct
2 Correct 1 ms 2652 KB Correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 2652 KB Correct
2 Correct 1 ms 2652 KB Correct
3 Correct 1 ms 2652 KB Correct
4 Correct 0 ms 2652 KB Correct
5 Correct 1 ms 2648 KB Correct
6 Correct 0 ms 2652 KB Correct
7 Correct 1 ms 2652 KB Correct
# Verdict Execution time Memory Grader output
1 Correct 78 ms 34820 KB Correct
2 Correct 71 ms 34252 KB Correct
3 Correct 58 ms 30868 KB Correct
4 Correct 43 ms 32472 KB Correct
5 Correct 62 ms 34248 KB Correct
6 Correct 70 ms 35056 KB Correct
7 Correct 77 ms 35096 KB Correct
8 Correct 54 ms 35188 KB Correct
9 Correct 52 ms 35156 KB Correct
10 Correct 51 ms 35288 KB Correct
11 Correct 47 ms 35148 KB Correct
# Verdict Execution time Memory Grader output
1 Correct 78 ms 34820 KB Correct
2 Correct 71 ms 34252 KB Correct
3 Correct 58 ms 30868 KB Correct
4 Correct 43 ms 32472 KB Correct
5 Correct 62 ms 34248 KB Correct
6 Correct 70 ms 35056 KB Correct
7 Correct 77 ms 35096 KB Correct
8 Correct 54 ms 35188 KB Correct
9 Correct 52 ms 35156 KB Correct
10 Correct 51 ms 35288 KB Correct
11 Correct 47 ms 35148 KB Correct
12 Correct 79 ms 34688 KB Correct
13 Correct 68 ms 34252 KB Correct
14 Correct 64 ms 30904 KB Correct
15 Correct 42 ms 32460 KB Correct
16 Correct 65 ms 34384 KB Correct
17 Correct 69 ms 35032 KB Correct
18 Correct 83 ms 35152 KB Correct
19 Correct 52 ms 35156 KB Correct
20 Correct 55 ms 35148 KB Correct
21 Correct 46 ms 35220 KB Correct
22 Correct 48 ms 35176 KB Correct
23 Correct 83 ms 36012 KB Correct
24 Correct 53 ms 32596 KB Correct
25 Correct 71 ms 34456 KB Correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 2652 KB Correct
2 Correct 1 ms 2652 KB Correct
3 Correct 1 ms 2652 KB Correct
4 Correct 0 ms 2652 KB Correct
5 Correct 1 ms 2648 KB Correct
6 Correct 0 ms 2652 KB Correct
7 Correct 1 ms 2652 KB Correct
8 Correct 78 ms 34820 KB Correct
9 Correct 71 ms 34252 KB Correct
10 Correct 58 ms 30868 KB Correct
11 Correct 43 ms 32472 KB Correct
12 Correct 62 ms 34248 KB Correct
13 Correct 70 ms 35056 KB Correct
14 Correct 77 ms 35096 KB Correct
15 Correct 54 ms 35188 KB Correct
16 Correct 52 ms 35156 KB Correct
17 Correct 51 ms 35288 KB Correct
18 Correct 47 ms 35148 KB Correct
19 Correct 79 ms 34688 KB Correct
20 Correct 68 ms 34252 KB Correct
21 Correct 64 ms 30904 KB Correct
22 Correct 42 ms 32460 KB Correct
23 Correct 65 ms 34384 KB Correct
24 Correct 69 ms 35032 KB Correct
25 Correct 83 ms 35152 KB Correct
26 Correct 52 ms 35156 KB Correct
27 Correct 55 ms 35148 KB Correct
28 Correct 46 ms 35220 KB Correct
29 Correct 48 ms 35176 KB Correct
30 Correct 83 ms 36012 KB Correct
31 Correct 53 ms 32596 KB Correct
32 Correct 71 ms 34456 KB Correct
33 Correct 1 ms 2648 KB Correct
34 Correct 0 ms 2648 KB Correct
35 Correct 1 ms 2652 KB Correct
36 Correct 1 ms 2652 KB Correct
37 Correct 1 ms 2652 KB Correct
38 Correct 0 ms 2652 KB Correct
39 Correct 1 ms 2652 KB Correct
40 Correct 75 ms 34860 KB Correct
41 Correct 78 ms 34132 KB Correct
42 Correct 63 ms 31056 KB Correct
43 Correct 41 ms 32468 KB Correct
44 Correct 59 ms 34252 KB Correct
45 Correct 70 ms 35204 KB Correct
46 Correct 77 ms 35156 KB Correct
47 Correct 53 ms 35364 KB Correct
48 Correct 53 ms 35152 KB Correct
49 Correct 50 ms 35152 KB Correct
50 Correct 54 ms 35412 KB Correct
51 Correct 68 ms 36020 KB Correct
52 Correct 46 ms 32588 KB Correct
53 Correct 80 ms 34512 KB Correct
54 Correct 36 ms 20168 KB Correct
55 Correct 1 ms 3416 KB Correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 2652 KB Correct
2 Correct 3 ms 3164 KB Correct
3 Correct 3 ms 2908 KB Correct
4 Correct 3 ms 3676 KB Correct
5 Correct 3 ms 4188 KB Correct
6 Correct 3 ms 4188 KB Correct
7 Correct 3 ms 3676 KB Correct
8 Correct 3 ms 3308 KB Correct
9 Correct 3 ms 3164 KB Correct
10 Correct 4 ms 3676 KB Correct
11 Correct 2 ms 3676 KB Correct
12 Correct 3 ms 4188 KB Correct
13 Correct 3 ms 4188 KB Correct
14 Correct 3 ms 4188 KB Correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 2652 KB Correct
2 Correct 3 ms 3164 KB Correct
3 Correct 3 ms 2908 KB Correct
4 Correct 3 ms 3676 KB Correct
5 Correct 3 ms 4188 KB Correct
6 Correct 3 ms 4188 KB Correct
7 Correct 3 ms 3676 KB Correct
8 Correct 3 ms 3308 KB Correct
9 Correct 3 ms 3164 KB Correct
10 Correct 4 ms 3676 KB Correct
11 Correct 2 ms 3676 KB Correct
12 Correct 3 ms 4188 KB Correct
13 Correct 3 ms 4188 KB Correct
14 Correct 3 ms 4188 KB Correct
15 Correct 1 ms 2648 KB Correct
16 Correct 2 ms 3164 KB Correct
17 Correct 2 ms 2908 KB Correct
18 Correct 4 ms 3676 KB Correct
19 Correct 4 ms 4188 KB Correct
20 Correct 3 ms 4188 KB Correct
21 Correct 3 ms 3676 KB Correct
22 Correct 3 ms 3164 KB Correct
23 Correct 3 ms 3160 KB Correct
24 Correct 3 ms 3676 KB Correct
25 Correct 2 ms 3676 KB Correct
26 Correct 3 ms 4188 KB Correct
27 Correct 3 ms 4188 KB Correct
28 Correct 3 ms 4188 KB Correct
29 Correct 2 ms 3164 KB Correct
30 Correct 3 ms 3660 KB Correct
31 Correct 3 ms 3416 KB Correct
32 Correct 3 ms 3676 KB Correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 2652 KB Correct
2 Correct 3 ms 3164 KB Correct
3 Correct 3 ms 2908 KB Correct
4 Correct 3 ms 3676 KB Correct
5 Correct 3 ms 4188 KB Correct
6 Correct 3 ms 4188 KB Correct
7 Correct 3 ms 3676 KB Correct
8 Correct 3 ms 3308 KB Correct
9 Correct 3 ms 3164 KB Correct
10 Correct 4 ms 3676 KB Correct
11 Correct 2 ms 3676 KB Correct
12 Correct 3 ms 4188 KB Correct
13 Correct 3 ms 4188 KB Correct
14 Correct 3 ms 4188 KB Correct
15 Correct 1 ms 2648 KB Correct
16 Correct 2 ms 3164 KB Correct
17 Correct 2 ms 2908 KB Correct
18 Correct 4 ms 3676 KB Correct
19 Correct 4 ms 4188 KB Correct
20 Correct 3 ms 4188 KB Correct
21 Correct 3 ms 3676 KB Correct
22 Correct 3 ms 3164 KB Correct
23 Correct 3 ms 3160 KB Correct
24 Correct 3 ms 3676 KB Correct
25 Correct 2 ms 3676 KB Correct
26 Correct 3 ms 4188 KB Correct
27 Correct 3 ms 4188 KB Correct
28 Correct 3 ms 4188 KB Correct
29 Correct 2 ms 3164 KB Correct
30 Correct 3 ms 3660 KB Correct
31 Correct 3 ms 3416 KB Correct
32 Correct 3 ms 3676 KB Correct
33 Correct 1 ms 2652 KB Correct
34 Correct 2 ms 3164 KB Correct
35 Correct 3 ms 2908 KB Correct
36 Correct 3 ms 3676 KB Correct
37 Correct 2 ms 4132 KB Correct
38 Correct 4 ms 4184 KB Correct
39 Correct 3 ms 3668 KB Correct
40 Correct 3 ms 3380 KB Correct
41 Correct 2 ms 3164 KB Correct
42 Correct 3 ms 3676 KB Correct
43 Correct 3 ms 3676 KB Correct
44 Correct 3 ms 4188 KB Correct
45 Correct 3 ms 4188 KB Correct
46 Correct 3 ms 4188 KB Correct
47 Correct 3 ms 3416 KB Correct
48 Correct 4 ms 3676 KB Correct
49 Correct 3 ms 3420 KB Correct
50 Correct 3 ms 3676 KB Correct
51 Correct 0 ms 2652 KB Correct
52 Correct 1 ms 2652 KB Correct
53 Correct 1 ms 2652 KB Correct
54 Correct 1 ms 2652 KB Correct
55 Correct 1 ms 2652 KB Correct
56 Correct 0 ms 2652 KB Correct
57 Correct 1 ms 2652 KB Correct
58 Correct 5 ms 3932 KB Correct
59 Correct 3 ms 3676 KB Correct
60 Correct 3 ms 3420 KB Correct
61 Correct 3 ms 3676 KB Correct
# Verdict Execution time Memory Grader output
1 Correct 78 ms 34820 KB Correct
2 Correct 71 ms 34252 KB Correct
3 Correct 58 ms 30868 KB Correct
4 Correct 43 ms 32472 KB Correct
5 Correct 62 ms 34248 KB Correct
6 Correct 70 ms 35056 KB Correct
7 Correct 77 ms 35096 KB Correct
8 Correct 54 ms 35188 KB Correct
9 Correct 52 ms 35156 KB Correct
10 Correct 51 ms 35288 KB Correct
11 Correct 47 ms 35148 KB Correct
12 Correct 1 ms 2652 KB Correct
13 Correct 3 ms 3164 KB Correct
14 Correct 3 ms 2908 KB Correct
15 Correct 3 ms 3676 KB Correct
16 Correct 3 ms 4188 KB Correct
17 Correct 3 ms 4188 KB Correct
18 Correct 3 ms 3676 KB Correct
19 Correct 3 ms 3308 KB Correct
20 Correct 3 ms 3164 KB Correct
21 Correct 4 ms 3676 KB Correct
22 Correct 2 ms 3676 KB Correct
23 Correct 3 ms 4188 KB Correct
24 Correct 3 ms 4188 KB Correct
25 Correct 3 ms 4188 KB Correct
26 Correct 72 ms 34740 KB Correct
27 Correct 71 ms 34252 KB Correct
28 Correct 56 ms 31060 KB Correct
29 Correct 52 ms 32392 KB Correct
30 Correct 64 ms 34484 KB Correct
31 Correct 74 ms 34996 KB Correct
32 Correct 76 ms 35152 KB Correct
33 Correct 54 ms 35276 KB Correct
34 Correct 58 ms 35244 KB Correct
35 Correct 44 ms 35192 KB Correct
36 Correct 47 ms 35156 KB Correct
37 Correct 1 ms 2652 KB Correct
38 Correct 3 ms 3164 KB Correct
39 Correct 3 ms 2908 KB Correct
40 Correct 3 ms 3676 KB Correct
41 Correct 3 ms 4184 KB Correct
42 Correct 6 ms 4460 KB Correct
43 Correct 3 ms 3672 KB Correct
44 Correct 2 ms 3332 KB Correct
45 Correct 3 ms 3164 KB Correct
46 Correct 3 ms 3644 KB Correct
47 Correct 3 ms 3676 KB Correct
48 Correct 3 ms 4188 KB Correct
49 Correct 3 ms 4188 KB Correct
50 Correct 3 ms 4188 KB Correct
51 Correct 201 ms 33272 KB Correct
52 Correct 150 ms 18516 KB Correct
53 Correct 27 ms 5608 KB Correct
54 Correct 48 ms 10184 KB Correct
55 Correct 133 ms 16920 KB Correct
56 Correct 175 ms 31824 KB Correct
57 Correct 203 ms 33380 KB Correct
58 Correct 141 ms 18004 KB Correct
59 Correct 114 ms 15188 KB Correct
60 Correct 154 ms 30292 KB Correct
61 Correct 182 ms 33104 KB Correct
62 Correct 101 ms 39764 KB Correct
63 Correct 91 ms 39504 KB Correct
64 Correct 96 ms 39548 KB Correct
65 Correct 96 ms 39660 KB Correct
66 Correct 94 ms 39508 KB Correct
67 Correct 89 ms 39700 KB Correct
68 Correct 101 ms 39768 KB Correct
69 Correct 97 ms 39508 KB Correct
70 Correct 102 ms 33112 KB Correct
71 Correct 105 ms 33616 KB Correct
# Verdict Execution time Memory Grader output
1 Correct 78 ms 34820 KB Correct
2 Correct 71 ms 34252 KB Correct
3 Correct 58 ms 30868 KB Correct
4 Correct 43 ms 32472 KB Correct
5 Correct 62 ms 34248 KB Correct
6 Correct 70 ms 35056 KB Correct
7 Correct 77 ms 35096 KB Correct
8 Correct 54 ms 35188 KB Correct
9 Correct 52 ms 35156 KB Correct
10 Correct 51 ms 35288 KB Correct
11 Correct 47 ms 35148 KB Correct
12 Correct 79 ms 34688 KB Correct
13 Correct 68 ms 34252 KB Correct
14 Correct 64 ms 30904 KB Correct
15 Correct 42 ms 32460 KB Correct
16 Correct 65 ms 34384 KB Correct
17 Correct 69 ms 35032 KB Correct
18 Correct 83 ms 35152 KB Correct
19 Correct 52 ms 35156 KB Correct
20 Correct 55 ms 35148 KB Correct
21 Correct 46 ms 35220 KB Correct
22 Correct 48 ms 35176 KB Correct
23 Correct 83 ms 36012 KB Correct
24 Correct 53 ms 32596 KB Correct
25 Correct 71 ms 34456 KB Correct
26 Correct 1 ms 2652 KB Correct
27 Correct 3 ms 3164 KB Correct
28 Correct 3 ms 2908 KB Correct
29 Correct 3 ms 3676 KB Correct
30 Correct 3 ms 4188 KB Correct
31 Correct 3 ms 4188 KB Correct
32 Correct 3 ms 3676 KB Correct
33 Correct 3 ms 3308 KB Correct
34 Correct 3 ms 3164 KB Correct
35 Correct 4 ms 3676 KB Correct
36 Correct 2 ms 3676 KB Correct
37 Correct 3 ms 4188 KB Correct
38 Correct 3 ms 4188 KB Correct
39 Correct 3 ms 4188 KB Correct
40 Correct 1 ms 2648 KB Correct
41 Correct 2 ms 3164 KB Correct
42 Correct 2 ms 2908 KB Correct
43 Correct 4 ms 3676 KB Correct
44 Correct 4 ms 4188 KB Correct
45 Correct 3 ms 4188 KB Correct
46 Correct 3 ms 3676 KB Correct
47 Correct 3 ms 3164 KB Correct
48 Correct 3 ms 3160 KB Correct
49 Correct 3 ms 3676 KB Correct
50 Correct 2 ms 3676 KB Correct
51 Correct 3 ms 4188 KB Correct
52 Correct 3 ms 4188 KB Correct
53 Correct 3 ms 4188 KB Correct
54 Correct 2 ms 3164 KB Correct
55 Correct 3 ms 3660 KB Correct
56 Correct 3 ms 3416 KB Correct
57 Correct 3 ms 3676 KB Correct
58 Correct 72 ms 34740 KB Correct
59 Correct 71 ms 34252 KB Correct
60 Correct 56 ms 31060 KB Correct
61 Correct 52 ms 32392 KB Correct
62 Correct 64 ms 34484 KB Correct
63 Correct 74 ms 34996 KB Correct
64 Correct 76 ms 35152 KB Correct
65 Correct 54 ms 35276 KB Correct
66 Correct 58 ms 35244 KB Correct
67 Correct 44 ms 35192 KB Correct
68 Correct 47 ms 35156 KB Correct
69 Correct 1 ms 2652 KB Correct
70 Correct 3 ms 3164 KB Correct
71 Correct 3 ms 2908 KB Correct
72 Correct 3 ms 3676 KB Correct
73 Correct 3 ms 4184 KB Correct
74 Correct 6 ms 4460 KB Correct
75 Correct 3 ms 3672 KB Correct
76 Correct 2 ms 3332 KB Correct
77 Correct 3 ms 3164 KB Correct
78 Correct 3 ms 3644 KB Correct
79 Correct 3 ms 3676 KB Correct
80 Correct 3 ms 4188 KB Correct
81 Correct 3 ms 4188 KB Correct
82 Correct 3 ms 4188 KB Correct
83 Correct 201 ms 33272 KB Correct
84 Correct 150 ms 18516 KB Correct
85 Correct 27 ms 5608 KB Correct
86 Correct 48 ms 10184 KB Correct
87 Correct 133 ms 16920 KB Correct
88 Correct 175 ms 31824 KB Correct
89 Correct 203 ms 33380 KB Correct
90 Correct 141 ms 18004 KB Correct
91 Correct 114 ms 15188 KB Correct
92 Correct 154 ms 30292 KB Correct
93 Correct 182 ms 33104 KB Correct
94 Correct 101 ms 39764 KB Correct
95 Correct 91 ms 39504 KB Correct
96 Correct 96 ms 39548 KB Correct
97 Correct 96 ms 39660 KB Correct
98 Correct 94 ms 39508 KB Correct
99 Correct 89 ms 39700 KB Correct
100 Correct 101 ms 39768 KB Correct
101 Correct 97 ms 39508 KB Correct
102 Correct 102 ms 33112 KB Correct
103 Correct 105 ms 33616 KB Correct
104 Correct 73 ms 34900 KB Correct
105 Correct 62 ms 34064 KB Correct
106 Correct 57 ms 31016 KB Correct
107 Correct 41 ms 32472 KB Correct
108 Correct 64 ms 34276 KB Correct
109 Correct 72 ms 35152 KB Correct
110 Correct 80 ms 35000 KB Correct
111 Correct 52 ms 35164 KB Correct
112 Correct 62 ms 35064 KB Correct
113 Correct 45 ms 35156 KB Correct
114 Correct 52 ms 35156 KB Correct
115 Correct 1 ms 2648 KB Correct
116 Correct 3 ms 3164 KB Correct
117 Correct 3 ms 2916 KB Correct
118 Correct 3 ms 3676 KB Correct
119 Correct 3 ms 4188 KB Correct
120 Correct 4 ms 4188 KB Correct
121 Correct 3 ms 3676 KB Correct
122 Correct 3 ms 3164 KB Correct
123 Correct 2 ms 3360 KB Correct
124 Correct 3 ms 3676 KB Correct
125 Correct 3 ms 3676 KB Correct
126 Correct 3 ms 4188 KB Correct
127 Correct 3 ms 4188 KB Correct
128 Correct 3 ms 4188 KB Correct
129 Correct 205 ms 33196 KB Correct
130 Correct 151 ms 18512 KB Correct
131 Correct 31 ms 5772 KB Correct
132 Correct 50 ms 10188 KB Correct
133 Correct 130 ms 16916 KB Correct
134 Correct 195 ms 32080 KB Correct
135 Correct 221 ms 33364 KB Correct
136 Correct 146 ms 18004 KB Correct
137 Correct 112 ms 15188 KB Correct
138 Correct 150 ms 30036 KB Correct
139 Correct 192 ms 33048 KB Correct
140 Correct 90 ms 39508 KB Correct
141 Correct 92 ms 39504 KB Correct
142 Correct 99 ms 39544 KB Correct
143 Correct 90 ms 39504 KB Correct
144 Correct 100 ms 39504 KB Correct
145 Correct 91 ms 39504 KB Correct
146 Correct 93 ms 39540 KB Correct
147 Correct 91 ms 39760 KB Correct
148 Correct 100 ms 33104 KB Correct
149 Correct 108 ms 33448 KB Correct
150 Correct 94 ms 35788 KB Correct
151 Correct 53 ms 32568 KB Correct
152 Correct 85 ms 34396 KB Correct
153 Correct 3 ms 3164 KB Correct
154 Correct 3 ms 3676 KB Correct
155 Correct 3 ms 3456 KB Correct
156 Correct 3 ms 3676 KB Correct
157 Correct 255 ms 35028 KB Correct
158 Correct 161 ms 19960 KB Correct
159 Correct 26 ms 6864 KB Correct
160 Correct 259 ms 34960 KB Correct
161 Correct 231 ms 34980 KB Correct
162 Correct 167 ms 19792 KB Correct
163 Correct 239 ms 36040 KB Correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 2652 KB Correct
2 Correct 1 ms 2652 KB Correct
3 Correct 1 ms 2652 KB Correct
4 Correct 1 ms 2652 KB Correct
5 Correct 1 ms 2652 KB Correct
6 Correct 0 ms 2652 KB Correct
7 Correct 1 ms 2648 KB Correct
8 Correct 0 ms 2652 KB Correct
9 Correct 1 ms 2652 KB Correct
10 Correct 78 ms 34820 KB Correct
11 Correct 71 ms 34252 KB Correct
12 Correct 58 ms 30868 KB Correct
13 Correct 43 ms 32472 KB Correct
14 Correct 62 ms 34248 KB Correct
15 Correct 70 ms 35056 KB Correct
16 Correct 77 ms 35096 KB Correct
17 Correct 54 ms 35188 KB Correct
18 Correct 52 ms 35156 KB Correct
19 Correct 51 ms 35288 KB Correct
20 Correct 47 ms 35148 KB Correct
21 Correct 79 ms 34688 KB Correct
22 Correct 68 ms 34252 KB Correct
23 Correct 64 ms 30904 KB Correct
24 Correct 42 ms 32460 KB Correct
25 Correct 65 ms 34384 KB Correct
26 Correct 69 ms 35032 KB Correct
27 Correct 83 ms 35152 KB Correct
28 Correct 52 ms 35156 KB Correct
29 Correct 55 ms 35148 KB Correct
30 Correct 46 ms 35220 KB Correct
31 Correct 48 ms 35176 KB Correct
32 Correct 83 ms 36012 KB Correct
33 Correct 53 ms 32596 KB Correct
34 Correct 71 ms 34456 KB Correct
35 Correct 1 ms 2648 KB Correct
36 Correct 0 ms 2648 KB Correct
37 Correct 1 ms 2652 KB Correct
38 Correct 1 ms 2652 KB Correct
39 Correct 1 ms 2652 KB Correct
40 Correct 0 ms 2652 KB Correct
41 Correct 1 ms 2652 KB Correct
42 Correct 75 ms 34860 KB Correct
43 Correct 78 ms 34132 KB Correct
44 Correct 63 ms 31056 KB Correct
45 Correct 41 ms 32468 KB Correct
46 Correct 59 ms 34252 KB Correct
47 Correct 70 ms 35204 KB Correct
48 Correct 77 ms 35156 KB Correct
49 Correct 53 ms 35364 KB Correct
50 Correct 53 ms 35152 KB Correct
51 Correct 50 ms 35152 KB Correct
52 Correct 54 ms 35412 KB Correct
53 Correct 68 ms 36020 KB Correct
54 Correct 46 ms 32588 KB Correct
55 Correct 80 ms 34512 KB Correct
56 Correct 36 ms 20168 KB Correct
57 Correct 1 ms 3416 KB Correct
58 Correct 1 ms 2652 KB Correct
59 Correct 3 ms 3164 KB Correct
60 Correct 3 ms 2908 KB Correct
61 Correct 3 ms 3676 KB Correct
62 Correct 3 ms 4188 KB Correct
63 Correct 3 ms 4188 KB Correct
64 Correct 3 ms 3676 KB Correct
65 Correct 3 ms 3308 KB Correct
66 Correct 3 ms 3164 KB Correct
67 Correct 4 ms 3676 KB Correct
68 Correct 2 ms 3676 KB Correct
69 Correct 3 ms 4188 KB Correct
70 Correct 3 ms 4188 KB Correct
71 Correct 3 ms 4188 KB Correct
72 Correct 1 ms 2648 KB Correct
73 Correct 2 ms 3164 KB Correct
74 Correct 2 ms 2908 KB Correct
75 Correct 4 ms 3676 KB Correct
76 Correct 4 ms 4188 KB Correct
77 Correct 3 ms 4188 KB Correct
78 Correct 3 ms 3676 KB Correct
79 Correct 3 ms 3164 KB Correct
80 Correct 3 ms 3160 KB Correct
81 Correct 3 ms 3676 KB Correct
82 Correct 2 ms 3676 KB Correct
83 Correct 3 ms 4188 KB Correct
84 Correct 3 ms 4188 KB Correct
85 Correct 3 ms 4188 KB Correct
86 Correct 2 ms 3164 KB Correct
87 Correct 3 ms 3660 KB Correct
88 Correct 3 ms 3416 KB Correct
89 Correct 3 ms 3676 KB Correct
90 Correct 1 ms 2652 KB Correct
91 Correct 2 ms 3164 KB Correct
92 Correct 3 ms 2908 KB Correct
93 Correct 3 ms 3676 KB Correct
94 Correct 2 ms 4132 KB Correct
95 Correct 4 ms 4184 KB Correct
96 Correct 3 ms 3668 KB Correct
97 Correct 3 ms 3380 KB Correct
98 Correct 2 ms 3164 KB Correct
99 Correct 3 ms 3676 KB Correct
100 Correct 3 ms 3676 KB Correct
101 Correct 3 ms 4188 KB Correct
102 Correct 3 ms 4188 KB Correct
103 Correct 3 ms 4188 KB Correct
104 Correct 3 ms 3416 KB Correct
105 Correct 4 ms 3676 KB Correct
106 Correct 3 ms 3420 KB Correct
107 Correct 3 ms 3676 KB Correct
108 Correct 0 ms 2652 KB Correct
109 Correct 1 ms 2652 KB Correct
110 Correct 1 ms 2652 KB Correct
111 Correct 1 ms 2652 KB Correct
112 Correct 1 ms 2652 KB Correct
113 Correct 0 ms 2652 KB Correct
114 Correct 1 ms 2652 KB Correct
115 Correct 5 ms 3932 KB Correct
116 Correct 3 ms 3676 KB Correct
117 Correct 3 ms 3420 KB Correct
118 Correct 3 ms 3676 KB Correct
119 Correct 72 ms 34740 KB Correct
120 Correct 71 ms 34252 KB Correct
121 Correct 56 ms 31060 KB Correct
122 Correct 52 ms 32392 KB Correct
123 Correct 64 ms 34484 KB Correct
124 Correct 74 ms 34996 KB Correct
125 Correct 76 ms 35152 KB Correct
126 Correct 54 ms 35276 KB Correct
127 Correct 58 ms 35244 KB Correct
128 Correct 44 ms 35192 KB Correct
129 Correct 47 ms 35156 KB Correct
130 Correct 1 ms 2652 KB Correct
131 Correct 3 ms 3164 KB Correct
132 Correct 3 ms 2908 KB Correct
133 Correct 3 ms 3676 KB Correct
134 Correct 3 ms 4184 KB Correct
135 Correct 6 ms 4460 KB Correct
136 Correct 3 ms 3672 KB Correct
137 Correct 2 ms 3332 KB Correct
138 Correct 3 ms 3164 KB Correct
139 Correct 3 ms 3644 KB Correct
140 Correct 3 ms 3676 KB Correct
141 Correct 3 ms 4188 KB Correct
142 Correct 3 ms 4188 KB Correct
143 Correct 3 ms 4188 KB Correct
144 Correct 201 ms 33272 KB Correct
145 Correct 150 ms 18516 KB Correct
146 Correct 27 ms 5608 KB Correct
147 Correct 48 ms 10184 KB Correct
148 Correct 133 ms 16920 KB Correct
149 Correct 175 ms 31824 KB Correct
150 Correct 203 ms 33380 KB Correct
151 Correct 141 ms 18004 KB Correct
152 Correct 114 ms 15188 KB Correct
153 Correct 154 ms 30292 KB Correct
154 Correct 182 ms 33104 KB Correct
155 Correct 101 ms 39764 KB Correct
156 Correct 91 ms 39504 KB Correct
157 Correct 96 ms 39548 KB Correct
158 Correct 96 ms 39660 KB Correct
159 Correct 94 ms 39508 KB Correct
160 Correct 89 ms 39700 KB Correct
161 Correct 101 ms 39768 KB Correct
162 Correct 97 ms 39508 KB Correct
163 Correct 102 ms 33112 KB Correct
164 Correct 105 ms 33616 KB Correct
165 Correct 73 ms 34900 KB Correct
166 Correct 62 ms 34064 KB Correct
167 Correct 57 ms 31016 KB Correct
168 Correct 41 ms 32472 KB Correct
169 Correct 64 ms 34276 KB Correct
170 Correct 72 ms 35152 KB Correct
171 Correct 80 ms 35000 KB Correct
172 Correct 52 ms 35164 KB Correct
173 Correct 62 ms 35064 KB Correct
174 Correct 45 ms 35156 KB Correct
175 Correct 52 ms 35156 KB Correct
176 Correct 1 ms 2648 KB Correct
177 Correct 3 ms 3164 KB Correct
178 Correct 3 ms 2916 KB Correct
179 Correct 3 ms 3676 KB Correct
180 Correct 3 ms 4188 KB Correct
181 Correct 4 ms 4188 KB Correct
182 Correct 3 ms 3676 KB Correct
183 Correct 3 ms 3164 KB Correct
184 Correct 2 ms 3360 KB Correct
185 Correct 3 ms 3676 KB Correct
186 Correct 3 ms 3676 KB Correct
187 Correct 3 ms 4188 KB Correct
188 Correct 3 ms 4188 KB Correct
189 Correct 3 ms 4188 KB Correct
190 Correct 205 ms 33196 KB Correct
191 Correct 151 ms 18512 KB Correct
192 Correct 31 ms 5772 KB Correct
193 Correct 50 ms 10188 KB Correct
194 Correct 130 ms 16916 KB Correct
195 Correct 195 ms 32080 KB Correct
196 Correct 221 ms 33364 KB Correct
197 Correct 146 ms 18004 KB Correct
198 Correct 112 ms 15188 KB Correct
199 Correct 150 ms 30036 KB Correct
200 Correct 192 ms 33048 KB Correct
201 Correct 90 ms 39508 KB Correct
202 Correct 92 ms 39504 KB Correct
203 Correct 99 ms 39544 KB Correct
204 Correct 90 ms 39504 KB Correct
205 Correct 100 ms 39504 KB Correct
206 Correct 91 ms 39504 KB Correct
207 Correct 93 ms 39540 KB Correct
208 Correct 91 ms 39760 KB Correct
209 Correct 100 ms 33104 KB Correct
210 Correct 108 ms 33448 KB Correct
211 Correct 94 ms 35788 KB Correct
212 Correct 53 ms 32568 KB Correct
213 Correct 85 ms 34396 KB Correct
214 Correct 3 ms 3164 KB Correct
215 Correct 3 ms 3676 KB Correct
216 Correct 3 ms 3456 KB Correct
217 Correct 3 ms 3676 KB Correct
218 Correct 255 ms 35028 KB Correct
219 Correct 161 ms 19960 KB Correct
220 Correct 26 ms 6864 KB Correct
221 Correct 259 ms 34960 KB Correct
222 Correct 231 ms 34980 KB Correct
223 Correct 167 ms 19792 KB Correct
224 Correct 239 ms 36040 KB Correct
225 Correct 82 ms 34920 KB Correct
226 Correct 74 ms 34212 KB Correct
227 Correct 61 ms 31084 KB Correct
228 Correct 42 ms 32476 KB Correct
229 Correct 70 ms 34244 KB Correct
230 Correct 72 ms 35156 KB Correct
231 Correct 94 ms 35156 KB Correct
232 Correct 55 ms 35324 KB Correct
233 Correct 57 ms 35152 KB Correct
234 Correct 49 ms 35244 KB Correct
235 Correct 51 ms 35116 KB Correct
236 Correct 1 ms 2648 KB Correct
237 Correct 3 ms 3160 KB Correct
238 Correct 3 ms 2908 KB Correct
239 Correct 3 ms 3676 KB Correct
240 Correct 3 ms 4184 KB Correct
241 Correct 3 ms 4188 KB Correct
242 Correct 3 ms 3676 KB Correct
243 Correct 3 ms 3164 KB Correct
244 Correct 3 ms 3164 KB Correct
245 Correct 3 ms 3676 KB Correct
246 Correct 3 ms 3676 KB Correct
247 Correct 5 ms 4440 KB Correct
248 Correct 3 ms 4188 KB Correct
249 Correct 3 ms 4188 KB Correct
250 Correct 193 ms 33232 KB Correct
251 Correct 152 ms 18516 KB Correct
252 Correct 26 ms 5592 KB Correct
253 Correct 49 ms 10184 KB Correct
254 Correct 128 ms 16980 KB Correct
255 Correct 181 ms 31824 KB Correct
256 Correct 206 ms 33360 KB Correct
257 Correct 142 ms 18008 KB Correct
258 Correct 113 ms 15136 KB Correct
259 Correct 143 ms 30032 KB Correct
260 Correct 172 ms 33072 KB Correct
261 Correct 94 ms 39504 KB Correct
262 Correct 90 ms 39800 KB Correct
263 Correct 96 ms 39512 KB Correct
264 Correct 104 ms 39536 KB Correct
265 Correct 109 ms 39764 KB Correct
266 Correct 91 ms 39548 KB Correct
267 Correct 91 ms 39544 KB Correct
268 Correct 93 ms 39504 KB Correct
269 Correct 100 ms 33108 KB Correct
270 Correct 103 ms 33360 KB Correct
271 Correct 82 ms 35984 KB Correct
272 Correct 45 ms 32600 KB Correct
273 Correct 72 ms 34596 KB Correct
274 Correct 2 ms 3164 KB Correct
275 Correct 3 ms 3676 KB Correct
276 Correct 3 ms 3420 KB Correct
277 Correct 3 ms 3672 KB Correct
278 Correct 209 ms 34952 KB Correct
279 Correct 151 ms 19796 KB Correct
280 Correct 25 ms 6812 KB Correct
281 Correct 205 ms 34968 KB Correct
282 Correct 217 ms 34772 KB Correct
283 Correct 139 ms 19792 KB Correct
284 Correct 186 ms 35964 KB Correct
285 Correct 1 ms 2648 KB Correct
286 Correct 0 ms 2652 KB Correct
287 Correct 1 ms 2652 KB Correct
288 Correct 0 ms 2652 KB Correct
289 Correct 1 ms 2652 KB Correct
290 Correct 0 ms 2652 KB Correct
291 Correct 1 ms 2652 KB Correct
292 Correct 35 ms 20060 KB Correct
293 Correct 1 ms 3416 KB Correct
294 Correct 4 ms 3932 KB Correct
295 Correct 4 ms 3692 KB Correct
296 Correct 3 ms 3420 KB Correct
297 Correct 3 ms 3676 KB Correct
298 Correct 213 ms 35684 KB Correct
299 Correct 177 ms 20564 KB Correct
300 Correct 143 ms 18312 KB Correct
301 Correct 140 ms 18772 KB Correct
302 Correct 142 ms 18004 KB Correct
303 Correct 222 ms 35272 KB Correct
304 Correct 216 ms 37320 KB Correct
305 Correct 241 ms 37316 KB Correct
306 Correct 188 ms 30668 KB Correct
307 Correct 257 ms 33620 KB Correct