Submission #1069840

# Submission time Handle Problem Language Result Execution time Memory
1069840 2024-08-22T09:19:34 Z vjudge1 Toy (CEOI24_toy) C++17
100 / 100
373 ms 373012 KB
// Online C++ compiler to run C++ program online
#include <bits/stdc++.h>
using namespace std;
#define int long long
#define ff first
#define ss second
#define pii pair<int,int>
pii bad = {-1,-1};
int w,h,k,l;

int presjek(pii a,pii b)
{
    if (a.ff > b.ff)
        swap(a,b);
    if (a.ss < b.ff)
        return 0;
    if (b.ss < a.ss)
        return (b.ss-b.ff+1);
    return a.ss-b.ff+1;
    
}
vector<pii> delta = {{0,1},{1,0},{-1,0},{0,-1}};
pii add(pii a,pii b)
{
    return {a.ff+b.ff,a.ss+b.ss};
}
pii sub(pii a,pii b)
{
    return {a.ff-b.ff,a.ss-b.ss};
}
void dfs(vector<vector<bool>>& vis,vector<vector<pii>>& rowsegment,vector<vector<pii>>& colsegment,pii cur, pii prev)
{
    //cout << "{" << prev.ff << "," << prev.ss << "}\n";
    //cout << "{" << cur.ff << "," << cur.ss << "}\n";
    //cout << endl;
    if (cur.ff < 0 || cur.ff > h-1 || 
    cur.ss < 0 || cur.ss > w-1 
    || vis[cur.ff][cur.ss] || (colsegment[cur.ff][cur.ss] == bad))
        return;
    pii raz = sub(cur,prev);
    
   
    if (abs(raz.ff) < abs(raz.ss))
    {
       
        if (presjek(colsegment[cur.ff][cur.ss],colsegment[prev.ff][prev.ss]) >= l)
        {
            vis[cur.ff][cur.ss] = 1;
            for (int del = 0; del < 4; del++)
            {
                pii cand = add(cur,delta[del]);
            
                 dfs(vis,rowsegment,colsegment,cand,cur);
            }
        }
    }
    else if(abs(raz.ff) > abs(raz.ss))
    {
        
        if (presjek(rowsegment[cur.ff][cur.ss],rowsegment[prev.ff][prev.ss]) >= k)
        {
            vis[cur.ff][cur.ss] = 1;
            for (int del = 0; del < 4; del++)
            {
                pii cand = add(cur,delta[del]);
                dfs(vis,rowsegment,colsegment,cand,cur);
            }
        }
    }
    else
    {
        vis[cur.ff][cur.ss] = 1;
            for (int del = 0; del < 4; del++)
            {
                pii cand = add(cur,delta[del]);
                dfs(vis,rowsegment,colsegment,cand,cur);
            }
    }
}
signed main() {
    
    cin >> w >> h >> k >> l;
    int xh,yh,xv,yv;
    cin >> xh >> yh >> xv >> yv;
    vector<vector<int>> grid(h,vector<int>(w,0));
    pii win;
    for (int i = 0; i < h; i++)
    {
        string s;
        cin >> s;
            
        for (int j = 0; j < w; j++)
        {
            if (s[j] == 'X')
                grid[i][j] = 1;
            if (s[j] == '*')
                win = {i,j};
        }
    }
    
    //The rows are numbered from 0 to H − 1 from top to bottom and columns are numbered 0 to
    //W − 1 from left to right. The x coordinate denotes the column number and y coordinate denotes
    //the row number
    vector<vector<pii>> rowsegment(h,vector<pii>(w,bad));
    vector<vector<pii>> colsegment(h,vector<pii>(w,bad));
    for (int i = 0; i < h; i++)
    {
        int prev = 0;
        for (int j = 0; j < w; j++)
        {
            if (!grid[i][j])
                rowsegment[i][j].ff = prev;
            else
                prev = j+1;
        }
        prev = w-1;
        for (int j = w-1; j >= 0; j--)
        {
            if (!grid[i][j])
                rowsegment[i][j].ss = prev;
            else
                prev = j-1;
        }
    }
    for (int j = 0; j < w; j++)
    {
        int prev = 0;
        for (int i = 0; i < h; i++)
        {
            if (!grid[i][j])
                colsegment[i][j].ff = prev;
            else
                prev = i+1;
        }
        prev = h-1;
        for (int i = h-1; i >= 0; i--)
        {
            if (!grid[i][j])
                colsegment[i][j].ss = prev;
            else
                prev = i-1;
        }
    }
    vector<vector<bool>> vis(h,vector<bool>(w,0));
    //vertical part ide po redovima a horizontal po kolonama
    pii start = {yh,xv};
    
    dfs(vis,rowsegment,colsegment,start,start);
  
    
    if (vis[win.ff][win.ss])
    {
        cout << "YES\n";
    }
    else
        cout << "NO\n";
}

# Verdict Execution time Memory Grader output
1 Correct 1 ms 344 KB Output is correct
2 Correct 0 ms 348 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 344 KB Output is correct
2 Correct 0 ms 348 KB Output is correct
3 Correct 0 ms 348 KB Output is correct
4 Correct 0 ms 604 KB Output is correct
5 Correct 0 ms 604 KB Output is correct
6 Correct 0 ms 348 KB Output is correct
7 Correct 0 ms 348 KB Output is correct
8 Correct 0 ms 348 KB Output is correct
9 Correct 0 ms 348 KB Output is correct
10 Correct 0 ms 348 KB Output is correct
11 Correct 0 ms 348 KB Output is correct
12 Correct 0 ms 348 KB Output is correct
13 Correct 0 ms 348 KB Output is correct
14 Correct 0 ms 348 KB Output is correct
15 Correct 1 ms 604 KB Output is correct
16 Correct 0 ms 604 KB Output is correct
17 Correct 1 ms 604 KB Output is correct
18 Correct 1 ms 604 KB Output is correct
19 Correct 1 ms 604 KB Output is correct
20 Correct 0 ms 604 KB Output is correct
21 Correct 1 ms 860 KB Output is correct
22 Correct 1 ms 860 KB Output is correct
23 Correct 1 ms 860 KB Output is correct
24 Correct 1 ms 604 KB Output is correct
25 Correct 1 ms 604 KB Output is correct
26 Correct 1 ms 604 KB Output is correct
27 Correct 0 ms 604 KB Output is correct
28 Correct 1 ms 604 KB Output is correct
29 Correct 1 ms 604 KB Output is correct
30 Correct 1 ms 692 KB Output is correct
31 Correct 1 ms 604 KB Output is correct
32 Correct 0 ms 604 KB Output is correct
33 Correct 1 ms 604 KB Output is correct
34 Correct 1 ms 604 KB Output is correct
35 Correct 0 ms 604 KB Output is correct
36 Correct 0 ms 348 KB Output is correct
37 Correct 0 ms 604 KB Output is correct
38 Correct 0 ms 604 KB Output is correct
39 Correct 0 ms 604 KB Output is correct
40 Correct 0 ms 604 KB Output is correct
41 Correct 1 ms 604 KB Output is correct
42 Correct 0 ms 860 KB Output is correct
43 Correct 0 ms 860 KB Output is correct
44 Correct 1 ms 860 KB Output is correct
45 Correct 1 ms 604 KB Output is correct
46 Correct 1 ms 348 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 344 KB Output is correct
2 Correct 0 ms 348 KB Output is correct
3 Correct 0 ms 348 KB Output is correct
4 Correct 0 ms 604 KB Output is correct
5 Correct 0 ms 604 KB Output is correct
6 Correct 0 ms 348 KB Output is correct
7 Correct 0 ms 348 KB Output is correct
8 Correct 0 ms 348 KB Output is correct
9 Correct 0 ms 348 KB Output is correct
10 Correct 0 ms 348 KB Output is correct
11 Correct 0 ms 348 KB Output is correct
12 Correct 0 ms 348 KB Output is correct
13 Correct 0 ms 348 KB Output is correct
14 Correct 0 ms 348 KB Output is correct
15 Correct 1 ms 604 KB Output is correct
16 Correct 0 ms 604 KB Output is correct
17 Correct 1 ms 604 KB Output is correct
18 Correct 1 ms 604 KB Output is correct
19 Correct 1 ms 604 KB Output is correct
20 Correct 0 ms 604 KB Output is correct
21 Correct 1 ms 860 KB Output is correct
22 Correct 1 ms 860 KB Output is correct
23 Correct 1 ms 860 KB Output is correct
24 Correct 1 ms 604 KB Output is correct
25 Correct 1 ms 604 KB Output is correct
26 Correct 1 ms 604 KB Output is correct
27 Correct 0 ms 604 KB Output is correct
28 Correct 1 ms 604 KB Output is correct
29 Correct 1 ms 604 KB Output is correct
30 Correct 1 ms 692 KB Output is correct
31 Correct 1 ms 604 KB Output is correct
32 Correct 0 ms 604 KB Output is correct
33 Correct 1 ms 604 KB Output is correct
34 Correct 1 ms 604 KB Output is correct
35 Correct 0 ms 604 KB Output is correct
36 Correct 0 ms 348 KB Output is correct
37 Correct 0 ms 604 KB Output is correct
38 Correct 0 ms 604 KB Output is correct
39 Correct 0 ms 604 KB Output is correct
40 Correct 0 ms 604 KB Output is correct
41 Correct 1 ms 604 KB Output is correct
42 Correct 0 ms 860 KB Output is correct
43 Correct 0 ms 860 KB Output is correct
44 Correct 1 ms 860 KB Output is correct
45 Correct 1 ms 604 KB Output is correct
46 Correct 1 ms 348 KB Output is correct
47 Correct 1 ms 604 KB Output is correct
48 Correct 1 ms 600 KB Output is correct
49 Correct 1 ms 860 KB Output is correct
50 Correct 0 ms 604 KB Output is correct
51 Correct 0 ms 604 KB Output is correct
52 Correct 1 ms 708 KB Output is correct
53 Correct 0 ms 604 KB Output is correct
54 Correct 1 ms 604 KB Output is correct
55 Correct 1 ms 604 KB Output is correct
56 Correct 1 ms 348 KB Output is correct
57 Correct 1 ms 604 KB Output is correct
58 Correct 1 ms 604 KB Output is correct
59 Correct 1 ms 1628 KB Output is correct
60 Correct 1 ms 1372 KB Output is correct
61 Correct 1 ms 1372 KB Output is correct
62 Correct 1 ms 1628 KB Output is correct
63 Correct 1 ms 1628 KB Output is correct
64 Correct 1 ms 1628 KB Output is correct
65 Correct 1 ms 1628 KB Output is correct
66 Correct 1 ms 1628 KB Output is correct
67 Correct 2 ms 1628 KB Output is correct
68 Correct 1 ms 1372 KB Output is correct
69 Correct 1 ms 1372 KB Output is correct
70 Correct 1 ms 1372 KB Output is correct
71 Correct 1 ms 1372 KB Output is correct
72 Correct 1 ms 1372 KB Output is correct
73 Correct 1 ms 1372 KB Output is correct
74 Correct 1 ms 1624 KB Output is correct
75 Correct 1 ms 1628 KB Output is correct
76 Correct 1 ms 1628 KB Output is correct
77 Correct 1 ms 1628 KB Output is correct
78 Correct 2 ms 1624 KB Output is correct
79 Correct 1 ms 1628 KB Output is correct
80 Correct 0 ms 604 KB Output is correct
81 Correct 1 ms 860 KB Output is correct
82 Correct 1 ms 860 KB Output is correct
83 Correct 1 ms 860 KB Output is correct
84 Correct 1 ms 860 KB Output is correct
85 Correct 1 ms 856 KB Output is correct
86 Correct 1 ms 1628 KB Output is correct
87 Correct 1 ms 1628 KB Output is correct
88 Correct 2 ms 1632 KB Output is correct
89 Correct 1 ms 1628 KB Output is correct
90 Correct 1 ms 604 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 344 KB Output is correct
2 Correct 0 ms 348 KB Output is correct
3 Correct 1 ms 860 KB Output is correct
4 Correct 13 ms 15196 KB Output is correct
5 Correct 14 ms 15100 KB Output is correct
6 Correct 2 ms 2136 KB Output is correct
7 Correct 13 ms 14012 KB Output is correct
8 Correct 12 ms 13924 KB Output is correct
9 Correct 2 ms 1628 KB Output is correct
10 Correct 3 ms 4012 KB Output is correct
11 Correct 4 ms 3928 KB Output is correct
12 Correct 2 ms 1628 KB Output is correct
13 Correct 5 ms 3932 KB Output is correct
14 Correct 5 ms 3932 KB Output is correct
15 Correct 11 ms 14428 KB Output is correct
16 Correct 11 ms 13660 KB Output is correct
17 Correct 11 ms 13660 KB Output is correct
18 Correct 12 ms 15192 KB Output is correct
19 Correct 13 ms 15192 KB Output is correct
20 Correct 15 ms 15132 KB Output is correct
21 Correct 12 ms 15376 KB Output is correct
22 Correct 12 ms 15368 KB Output is correct
23 Correct 12 ms 15136 KB Output is correct
24 Correct 11 ms 12392 KB Output is correct
25 Correct 11 ms 12384 KB Output is correct
26 Correct 10 ms 11880 KB Output is correct
27 Correct 10 ms 12136 KB Output is correct
28 Correct 11 ms 12004 KB Output is correct
29 Correct 11 ms 12128 KB Output is correct
30 Correct 11 ms 14780 KB Output is correct
31 Correct 12 ms 14172 KB Output is correct
32 Correct 13 ms 14988 KB Output is correct
33 Correct 13 ms 13916 KB Output is correct
34 Correct 12 ms 13864 KB Output is correct
35 Correct 12 ms 13916 KB Output is correct
36 Correct 3 ms 3676 KB Output is correct
37 Correct 6 ms 7512 KB Output is correct
38 Correct 6 ms 7004 KB Output is correct
39 Correct 6 ms 7260 KB Output is correct
40 Correct 6 ms 7400 KB Output is correct
41 Correct 7 ms 7256 KB Output is correct
42 Correct 12 ms 15196 KB Output is correct
43 Correct 11 ms 15160 KB Output is correct
44 Correct 13 ms 15236 KB Output is correct
45 Correct 13 ms 15192 KB Output is correct
46 Correct 3 ms 3676 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 344 KB Output is correct
2 Correct 0 ms 348 KB Output is correct
3 Correct 0 ms 348 KB Output is correct
4 Correct 0 ms 604 KB Output is correct
5 Correct 0 ms 604 KB Output is correct
6 Correct 0 ms 348 KB Output is correct
7 Correct 0 ms 348 KB Output is correct
8 Correct 0 ms 348 KB Output is correct
9 Correct 0 ms 348 KB Output is correct
10 Correct 0 ms 348 KB Output is correct
11 Correct 0 ms 348 KB Output is correct
12 Correct 0 ms 348 KB Output is correct
13 Correct 0 ms 348 KB Output is correct
14 Correct 0 ms 348 KB Output is correct
15 Correct 1 ms 604 KB Output is correct
16 Correct 0 ms 604 KB Output is correct
17 Correct 1 ms 604 KB Output is correct
18 Correct 1 ms 604 KB Output is correct
19 Correct 1 ms 604 KB Output is correct
20 Correct 0 ms 604 KB Output is correct
21 Correct 1 ms 860 KB Output is correct
22 Correct 1 ms 860 KB Output is correct
23 Correct 1 ms 860 KB Output is correct
24 Correct 1 ms 604 KB Output is correct
25 Correct 1 ms 604 KB Output is correct
26 Correct 1 ms 604 KB Output is correct
27 Correct 0 ms 604 KB Output is correct
28 Correct 1 ms 604 KB Output is correct
29 Correct 1 ms 604 KB Output is correct
30 Correct 1 ms 692 KB Output is correct
31 Correct 1 ms 604 KB Output is correct
32 Correct 0 ms 604 KB Output is correct
33 Correct 1 ms 604 KB Output is correct
34 Correct 1 ms 604 KB Output is correct
35 Correct 0 ms 604 KB Output is correct
36 Correct 0 ms 348 KB Output is correct
37 Correct 0 ms 604 KB Output is correct
38 Correct 0 ms 604 KB Output is correct
39 Correct 0 ms 604 KB Output is correct
40 Correct 0 ms 604 KB Output is correct
41 Correct 1 ms 604 KB Output is correct
42 Correct 0 ms 860 KB Output is correct
43 Correct 0 ms 860 KB Output is correct
44 Correct 1 ms 860 KB Output is correct
45 Correct 1 ms 604 KB Output is correct
46 Correct 1 ms 348 KB Output is correct
47 Correct 1 ms 604 KB Output is correct
48 Correct 1 ms 600 KB Output is correct
49 Correct 1 ms 860 KB Output is correct
50 Correct 0 ms 604 KB Output is correct
51 Correct 0 ms 604 KB Output is correct
52 Correct 1 ms 708 KB Output is correct
53 Correct 0 ms 604 KB Output is correct
54 Correct 1 ms 604 KB Output is correct
55 Correct 1 ms 604 KB Output is correct
56 Correct 1 ms 348 KB Output is correct
57 Correct 1 ms 604 KB Output is correct
58 Correct 1 ms 604 KB Output is correct
59 Correct 1 ms 1628 KB Output is correct
60 Correct 1 ms 1372 KB Output is correct
61 Correct 1 ms 1372 KB Output is correct
62 Correct 1 ms 1628 KB Output is correct
63 Correct 1 ms 1628 KB Output is correct
64 Correct 1 ms 1628 KB Output is correct
65 Correct 1 ms 1628 KB Output is correct
66 Correct 1 ms 1628 KB Output is correct
67 Correct 2 ms 1628 KB Output is correct
68 Correct 1 ms 1372 KB Output is correct
69 Correct 1 ms 1372 KB Output is correct
70 Correct 1 ms 1372 KB Output is correct
71 Correct 1 ms 1372 KB Output is correct
72 Correct 1 ms 1372 KB Output is correct
73 Correct 1 ms 1372 KB Output is correct
74 Correct 1 ms 1624 KB Output is correct
75 Correct 1 ms 1628 KB Output is correct
76 Correct 1 ms 1628 KB Output is correct
77 Correct 1 ms 1628 KB Output is correct
78 Correct 2 ms 1624 KB Output is correct
79 Correct 1 ms 1628 KB Output is correct
80 Correct 0 ms 604 KB Output is correct
81 Correct 1 ms 860 KB Output is correct
82 Correct 1 ms 860 KB Output is correct
83 Correct 1 ms 860 KB Output is correct
84 Correct 1 ms 860 KB Output is correct
85 Correct 1 ms 856 KB Output is correct
86 Correct 1 ms 1628 KB Output is correct
87 Correct 1 ms 1628 KB Output is correct
88 Correct 2 ms 1632 KB Output is correct
89 Correct 1 ms 1628 KB Output is correct
90 Correct 1 ms 604 KB Output is correct
91 Correct 1 ms 860 KB Output is correct
92 Correct 13 ms 15196 KB Output is correct
93 Correct 14 ms 15100 KB Output is correct
94 Correct 2 ms 2136 KB Output is correct
95 Correct 13 ms 14012 KB Output is correct
96 Correct 12 ms 13924 KB Output is correct
97 Correct 2 ms 1628 KB Output is correct
98 Correct 3 ms 4012 KB Output is correct
99 Correct 4 ms 3928 KB Output is correct
100 Correct 2 ms 1628 KB Output is correct
101 Correct 5 ms 3932 KB Output is correct
102 Correct 5 ms 3932 KB Output is correct
103 Correct 11 ms 14428 KB Output is correct
104 Correct 11 ms 13660 KB Output is correct
105 Correct 11 ms 13660 KB Output is correct
106 Correct 12 ms 15192 KB Output is correct
107 Correct 13 ms 15192 KB Output is correct
108 Correct 15 ms 15132 KB Output is correct
109 Correct 12 ms 15376 KB Output is correct
110 Correct 12 ms 15368 KB Output is correct
111 Correct 12 ms 15136 KB Output is correct
112 Correct 11 ms 12392 KB Output is correct
113 Correct 11 ms 12384 KB Output is correct
114 Correct 10 ms 11880 KB Output is correct
115 Correct 10 ms 12136 KB Output is correct
116 Correct 11 ms 12004 KB Output is correct
117 Correct 11 ms 12128 KB Output is correct
118 Correct 11 ms 14780 KB Output is correct
119 Correct 12 ms 14172 KB Output is correct
120 Correct 13 ms 14988 KB Output is correct
121 Correct 13 ms 13916 KB Output is correct
122 Correct 12 ms 13864 KB Output is correct
123 Correct 12 ms 13916 KB Output is correct
124 Correct 3 ms 3676 KB Output is correct
125 Correct 6 ms 7512 KB Output is correct
126 Correct 6 ms 7004 KB Output is correct
127 Correct 6 ms 7260 KB Output is correct
128 Correct 6 ms 7400 KB Output is correct
129 Correct 7 ms 7256 KB Output is correct
130 Correct 12 ms 15196 KB Output is correct
131 Correct 11 ms 15160 KB Output is correct
132 Correct 13 ms 15236 KB Output is correct
133 Correct 13 ms 15192 KB Output is correct
134 Correct 3 ms 3676 KB Output is correct
135 Correct 2 ms 2140 KB Output is correct
136 Correct 5 ms 5504 KB Output is correct
137 Correct 5 ms 5468 KB Output is correct
138 Correct 2 ms 2096 KB Output is correct
139 Correct 5 ms 5664 KB Output is correct
140 Correct 5 ms 5720 KB Output is correct
141 Correct 2 ms 2396 KB Output is correct
142 Correct 5 ms 5464 KB Output is correct
143 Correct 5 ms 5724 KB Output is correct
144 Correct 0 ms 604 KB Output is correct
145 Correct 7 ms 5468 KB Output is correct
146 Correct 7 ms 5724 KB Output is correct
147 Correct 16 ms 18968 KB Output is correct
148 Correct 16 ms 20316 KB Output is correct
149 Correct 20 ms 18780 KB Output is correct
150 Correct 19 ms 21916 KB Output is correct
151 Correct 17 ms 21852 KB Output is correct
152 Correct 30 ms 21852 KB Output is correct
153 Correct 16 ms 21848 KB Output is correct
154 Correct 21 ms 21940 KB Output is correct
155 Correct 17 ms 21852 KB Output is correct
156 Correct 14 ms 17752 KB Output is correct
157 Correct 15 ms 17752 KB Output is correct
158 Correct 13 ms 15708 KB Output is correct
159 Correct 13 ms 15704 KB Output is correct
160 Correct 23 ms 15860 KB Output is correct
161 Correct 14 ms 15708 KB Output is correct
162 Correct 15 ms 20060 KB Output is correct
163 Correct 16 ms 19428 KB Output is correct
164 Correct 17 ms 21084 KB Output is correct
165 Correct 16 ms 19196 KB Output is correct
166 Correct 27 ms 20824 KB Output is correct
167 Correct 18 ms 19804 KB Output is correct
168 Correct 8 ms 5212 KB Output is correct
169 Correct 9 ms 10076 KB Output is correct
170 Correct 8 ms 10332 KB Output is correct
171 Correct 8 ms 10072 KB Output is correct
172 Correct 7 ms 9352 KB Output is correct
173 Correct 8 ms 10072 KB Output is correct
174 Correct 24 ms 21920 KB Output is correct
175 Correct 18 ms 21736 KB Output is correct
176 Correct 18 ms 21852 KB Output is correct
177 Correct 22 ms 21824 KB Output is correct
178 Correct 5 ms 4956 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 344 KB Output is correct
2 Correct 0 ms 348 KB Output is correct
3 Correct 0 ms 348 KB Output is correct
4 Correct 0 ms 604 KB Output is correct
5 Correct 0 ms 604 KB Output is correct
6 Correct 0 ms 348 KB Output is correct
7 Correct 0 ms 348 KB Output is correct
8 Correct 0 ms 348 KB Output is correct
9 Correct 0 ms 348 KB Output is correct
10 Correct 0 ms 348 KB Output is correct
11 Correct 0 ms 348 KB Output is correct
12 Correct 0 ms 348 KB Output is correct
13 Correct 0 ms 348 KB Output is correct
14 Correct 0 ms 348 KB Output is correct
15 Correct 1 ms 604 KB Output is correct
16 Correct 0 ms 604 KB Output is correct
17 Correct 1 ms 604 KB Output is correct
18 Correct 1 ms 604 KB Output is correct
19 Correct 1 ms 604 KB Output is correct
20 Correct 0 ms 604 KB Output is correct
21 Correct 1 ms 860 KB Output is correct
22 Correct 1 ms 860 KB Output is correct
23 Correct 1 ms 860 KB Output is correct
24 Correct 1 ms 604 KB Output is correct
25 Correct 1 ms 604 KB Output is correct
26 Correct 1 ms 604 KB Output is correct
27 Correct 0 ms 604 KB Output is correct
28 Correct 1 ms 604 KB Output is correct
29 Correct 1 ms 604 KB Output is correct
30 Correct 1 ms 692 KB Output is correct
31 Correct 1 ms 604 KB Output is correct
32 Correct 0 ms 604 KB Output is correct
33 Correct 1 ms 604 KB Output is correct
34 Correct 1 ms 604 KB Output is correct
35 Correct 0 ms 604 KB Output is correct
36 Correct 0 ms 348 KB Output is correct
37 Correct 0 ms 604 KB Output is correct
38 Correct 0 ms 604 KB Output is correct
39 Correct 0 ms 604 KB Output is correct
40 Correct 0 ms 604 KB Output is correct
41 Correct 1 ms 604 KB Output is correct
42 Correct 0 ms 860 KB Output is correct
43 Correct 0 ms 860 KB Output is correct
44 Correct 1 ms 860 KB Output is correct
45 Correct 1 ms 604 KB Output is correct
46 Correct 1 ms 348 KB Output is correct
47 Correct 1 ms 604 KB Output is correct
48 Correct 1 ms 600 KB Output is correct
49 Correct 1 ms 860 KB Output is correct
50 Correct 0 ms 604 KB Output is correct
51 Correct 0 ms 604 KB Output is correct
52 Correct 1 ms 708 KB Output is correct
53 Correct 0 ms 604 KB Output is correct
54 Correct 1 ms 604 KB Output is correct
55 Correct 1 ms 604 KB Output is correct
56 Correct 1 ms 348 KB Output is correct
57 Correct 1 ms 604 KB Output is correct
58 Correct 1 ms 604 KB Output is correct
59 Correct 1 ms 1628 KB Output is correct
60 Correct 1 ms 1372 KB Output is correct
61 Correct 1 ms 1372 KB Output is correct
62 Correct 1 ms 1628 KB Output is correct
63 Correct 1 ms 1628 KB Output is correct
64 Correct 1 ms 1628 KB Output is correct
65 Correct 1 ms 1628 KB Output is correct
66 Correct 1 ms 1628 KB Output is correct
67 Correct 2 ms 1628 KB Output is correct
68 Correct 1 ms 1372 KB Output is correct
69 Correct 1 ms 1372 KB Output is correct
70 Correct 1 ms 1372 KB Output is correct
71 Correct 1 ms 1372 KB Output is correct
72 Correct 1 ms 1372 KB Output is correct
73 Correct 1 ms 1372 KB Output is correct
74 Correct 1 ms 1624 KB Output is correct
75 Correct 1 ms 1628 KB Output is correct
76 Correct 1 ms 1628 KB Output is correct
77 Correct 1 ms 1628 KB Output is correct
78 Correct 2 ms 1624 KB Output is correct
79 Correct 1 ms 1628 KB Output is correct
80 Correct 0 ms 604 KB Output is correct
81 Correct 1 ms 860 KB Output is correct
82 Correct 1 ms 860 KB Output is correct
83 Correct 1 ms 860 KB Output is correct
84 Correct 1 ms 860 KB Output is correct
85 Correct 1 ms 856 KB Output is correct
86 Correct 1 ms 1628 KB Output is correct
87 Correct 1 ms 1628 KB Output is correct
88 Correct 2 ms 1632 KB Output is correct
89 Correct 1 ms 1628 KB Output is correct
90 Correct 1 ms 604 KB Output is correct
91 Correct 1 ms 860 KB Output is correct
92 Correct 13 ms 15196 KB Output is correct
93 Correct 14 ms 15100 KB Output is correct
94 Correct 2 ms 2136 KB Output is correct
95 Correct 13 ms 14012 KB Output is correct
96 Correct 12 ms 13924 KB Output is correct
97 Correct 2 ms 1628 KB Output is correct
98 Correct 3 ms 4012 KB Output is correct
99 Correct 4 ms 3928 KB Output is correct
100 Correct 2 ms 1628 KB Output is correct
101 Correct 5 ms 3932 KB Output is correct
102 Correct 5 ms 3932 KB Output is correct
103 Correct 11 ms 14428 KB Output is correct
104 Correct 11 ms 13660 KB Output is correct
105 Correct 11 ms 13660 KB Output is correct
106 Correct 12 ms 15192 KB Output is correct
107 Correct 13 ms 15192 KB Output is correct
108 Correct 15 ms 15132 KB Output is correct
109 Correct 12 ms 15376 KB Output is correct
110 Correct 12 ms 15368 KB Output is correct
111 Correct 12 ms 15136 KB Output is correct
112 Correct 11 ms 12392 KB Output is correct
113 Correct 11 ms 12384 KB Output is correct
114 Correct 10 ms 11880 KB Output is correct
115 Correct 10 ms 12136 KB Output is correct
116 Correct 11 ms 12004 KB Output is correct
117 Correct 11 ms 12128 KB Output is correct
118 Correct 11 ms 14780 KB Output is correct
119 Correct 12 ms 14172 KB Output is correct
120 Correct 13 ms 14988 KB Output is correct
121 Correct 13 ms 13916 KB Output is correct
122 Correct 12 ms 13864 KB Output is correct
123 Correct 12 ms 13916 KB Output is correct
124 Correct 3 ms 3676 KB Output is correct
125 Correct 6 ms 7512 KB Output is correct
126 Correct 6 ms 7004 KB Output is correct
127 Correct 6 ms 7260 KB Output is correct
128 Correct 6 ms 7400 KB Output is correct
129 Correct 7 ms 7256 KB Output is correct
130 Correct 12 ms 15196 KB Output is correct
131 Correct 11 ms 15160 KB Output is correct
132 Correct 13 ms 15236 KB Output is correct
133 Correct 13 ms 15192 KB Output is correct
134 Correct 3 ms 3676 KB Output is correct
135 Correct 2 ms 2140 KB Output is correct
136 Correct 5 ms 5504 KB Output is correct
137 Correct 5 ms 5468 KB Output is correct
138 Correct 2 ms 2096 KB Output is correct
139 Correct 5 ms 5664 KB Output is correct
140 Correct 5 ms 5720 KB Output is correct
141 Correct 2 ms 2396 KB Output is correct
142 Correct 5 ms 5464 KB Output is correct
143 Correct 5 ms 5724 KB Output is correct
144 Correct 0 ms 604 KB Output is correct
145 Correct 7 ms 5468 KB Output is correct
146 Correct 7 ms 5724 KB Output is correct
147 Correct 16 ms 18968 KB Output is correct
148 Correct 16 ms 20316 KB Output is correct
149 Correct 20 ms 18780 KB Output is correct
150 Correct 19 ms 21916 KB Output is correct
151 Correct 17 ms 21852 KB Output is correct
152 Correct 30 ms 21852 KB Output is correct
153 Correct 16 ms 21848 KB Output is correct
154 Correct 21 ms 21940 KB Output is correct
155 Correct 17 ms 21852 KB Output is correct
156 Correct 14 ms 17752 KB Output is correct
157 Correct 15 ms 17752 KB Output is correct
158 Correct 13 ms 15708 KB Output is correct
159 Correct 13 ms 15704 KB Output is correct
160 Correct 23 ms 15860 KB Output is correct
161 Correct 14 ms 15708 KB Output is correct
162 Correct 15 ms 20060 KB Output is correct
163 Correct 16 ms 19428 KB Output is correct
164 Correct 17 ms 21084 KB Output is correct
165 Correct 16 ms 19196 KB Output is correct
166 Correct 27 ms 20824 KB Output is correct
167 Correct 18 ms 19804 KB Output is correct
168 Correct 8 ms 5212 KB Output is correct
169 Correct 9 ms 10076 KB Output is correct
170 Correct 8 ms 10332 KB Output is correct
171 Correct 8 ms 10072 KB Output is correct
172 Correct 7 ms 9352 KB Output is correct
173 Correct 8 ms 10072 KB Output is correct
174 Correct 24 ms 21920 KB Output is correct
175 Correct 18 ms 21736 KB Output is correct
176 Correct 18 ms 21852 KB Output is correct
177 Correct 22 ms 21824 KB Output is correct
178 Correct 5 ms 4956 KB Output is correct
179 Correct 20 ms 24408 KB Output is correct
180 Correct 96 ms 90980 KB Output is correct
181 Correct 82 ms 91192 KB Output is correct
182 Correct 25 ms 24156 KB Output is correct
183 Correct 99 ms 91048 KB Output is correct
184 Correct 82 ms 91216 KB Output is correct
185 Correct 63 ms 66900 KB Output is correct
186 Correct 88 ms 91088 KB Output is correct
187 Correct 88 ms 91200 KB Output is correct
188 Correct 61 ms 47444 KB Output is correct
189 Correct 110 ms 91216 KB Output is correct
190 Correct 113 ms 91184 KB Output is correct
191 Correct 290 ms 312916 KB Output is correct
192 Correct 284 ms 336208 KB Output is correct
193 Correct 271 ms 324052 KB Output is correct
194 Correct 344 ms 372820 KB Output is correct
195 Correct 325 ms 373004 KB Output is correct
196 Correct 331 ms 372988 KB Output is correct
197 Correct 339 ms 372904 KB Output is correct
198 Correct 322 ms 372820 KB Output is correct
199 Correct 325 ms 372904 KB Output is correct
200 Correct 291 ms 302416 KB Output is correct
201 Correct 289 ms 302340 KB Output is correct
202 Correct 290 ms 267252 KB Output is correct
203 Correct 291 ms 267348 KB Output is correct
204 Correct 289 ms 267420 KB Output is correct
205 Correct 285 ms 267476 KB Output is correct
206 Correct 276 ms 325984 KB Output is correct
207 Correct 304 ms 328744 KB Output is correct
208 Correct 272 ms 312148 KB Output is correct
209 Correct 301 ms 333648 KB Output is correct
210 Correct 336 ms 332748 KB Output is correct
211 Correct 341 ms 352596 KB Output is correct
212 Correct 102 ms 78676 KB Output is correct
213 Correct 150 ms 166804 KB Output is correct
214 Correct 149 ms 157776 KB Output is correct
215 Correct 157 ms 169724 KB Output is correct
216 Correct 150 ms 154976 KB Output is correct
217 Correct 155 ms 157532 KB Output is correct
218 Correct 355 ms 372760 KB Output is correct
219 Correct 346 ms 372820 KB Output is correct
220 Correct 373 ms 373012 KB Output is correct
221 Correct 362 ms 373008 KB Output is correct
222 Correct 67 ms 76396 KB Output is correct