#pragma optimize("Bismillahirrahmanirrahim")
//█▀█─█──█──█▀█─█─█
//█▄█─█──█──█▄█─█■█
//█─█─█▄─█▄─█─█─█─█
//Allahuekber
//ahmet23 orz...
//Sani buyuk Osman Pasa Plevneden cikmam diyor.
//FatihSultanMehmedHan
//YavuzSultanSelimHan
//AbdulhamidHan
#define author tolbi
#include <bits/stdc++.h>
using namespace std;
template<typename X, typename Y> istream& operator>>(istream& in, pair<X,Y> &pr) {return in>>pr.first>>pr.second;}
template<typename X, typename Y> ostream& operator<<(ostream& os, pair<X,Y> pr) {return os<<pr.first<<" "<<pr.second;}
template<typename X, typename Y> pair<X,Y> operator+(pair<X,Y> a, pair<X,Y> b) {pair<X,Y> c; c.first=a.first+b.first,c.second=a.second+b.second;return c;}
template<typename X, typename Y> pair<X,Y> operator-(pair<X,Y> a, pair<X,Y> b) {pair<X,Y> c; c.first=a.first-b.first,c.second=a.second-b.second;return c;}
template<typename X, typename Y> void operator+=(pair<X,Y> &a, pair<X,Y> b){a.first+=b.first,a.second+=b.second;}
template<typename X, typename Y> void operator-=(pair<X,Y> &a, pair<X,Y> b){a.first-=b.first,a.second-=b.second;}
template<typename X> istream& operator>>(istream& in, vector<X> &arr) {for(auto &it : arr) in>>it; return in;}
template<typename X> ostream& operator<<(ostream& os, vector<X> arr) {for(auto &it : arr) os<<it<<" "; return os;}
template<typename X, size_t Y> istream& operator>>(istream& in, array<X,Y> &arr) {for(auto &it : arr) in>>it; return in;}
template<typename X, size_t Y> ostream& operator<<(ostream& os, array<X,Y> arr) {for(auto &it : arr) os<<it<<" "; return os;}
#define int long long
#define endl '\n'
#define vint(x) vector<int> x
#define deci(x) int x;cin>>x;
#define decstr(x) string x;cin>>x;
#define cinarr(x) for (auto &it : x) cin>>it;
#define coutarr(x) for (auto &it : x) cout<<it<<" ";cout<<endl;
#define sortarr(x) sort(x.begin(),x.end())
#define sortrarr(x) sort(x.rbegin(),x.rend())
#define det(x) cout<<"NO\0YES"+x*3<<endl;
#define INF LONG_LONG_MAX
#define rev(x) reverse(x.begin(),x.end());
#define ios ios::sync_with_stdio(0);cin.tie(0);cout.tie(0);
#define tol(bi) (1LL<<((int)(bi)))
const int MOD = 1e9+7;
mt19937 ayahya(chrono::high_resolution_clock().now().time_since_epoch().count());
#include "paint.h"
int32_t minimumInstructions(int32_t N, int32_t M, int32_t K, vector<int32_t> C, vector<int32_t> A, vector<vector<int32_t>> B) {
vector<bool> valid(N,0);
vector<vector<int>> col(K);
for (int i = 0; i < M; i++){
for (int j = 0; j < B[i].size(); j++){
col[B[i][j]].push_back(i);
}
}
vector<int> streak(M,1);
vector<int> last(M,-2);
for (int i = 0; i < N; i++){
int color = C[i];
for (int j = 0; j < col[color].size(); j++){
int posu = (i-col[color][j]+M)%M;
if (last[posu]==i-1) streak[posu]++;
else streak[posu]=1ll;
last[posu]=i;
if (streak[posu]>=M) valid[i-M+1]=true;
}
}
int32_t ans = 1, r = M-1, mava = M-1;
if (!valid[0]) return -1;
for (int i = 1; i < N; i++){
if (valid[i]) mava=i+M-1;
if (i>r){
if (mava==r) return -1;
r=mava;
ans++;
}
}
return ans;
}
#ifdef tolbi
int32_t main() {
int32_t N, M, K;
assert(3 == scanf("%d %d %d", &N, &M, &K));
vector<int32_t> C(N);
for (int32_t i = 0; i < N; ++i) {
assert(1 == scanf("%d", &C[i]));
}
vector<int32_t> A(M);
vector<vector<int32_t>> B(M);
for (int32_t i = 0; i < M; ++i) {
assert(1 == scanf("%d", &A[i]));
B[i].resize(A[i]);
for (int32_t j = 0; j < A[i]; ++j) {
assert(1 == scanf("%d", &B[i][j]));
}
}
int32_t minimum_instructions = minimumInstructions(N, M, K, C, A, B);
printf("%d\n", minimum_instructions);
return 0;
}
#endif
Compilation message
paint.cpp:1: warning: ignoring '#pragma optimize ' [-Wunknown-pragmas]
1 | #pragma optimize("Bismillahirrahmanirrahim")
|
paint.cpp: In function 'int32_t minimumInstructions(int32_t, int32_t, int32_t, std::vector<int>, std::vector<int>, std::vector<std::vector<int> >)':
paint.cpp:46:21: warning: comparison of integer expressions of different signedness: 'long long int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
46 | for (int j = 0; j < B[i].size(); j++){
| ~~^~~~~~~~~~~~~
paint.cpp:54:21: warning: comparison of integer expressions of different signedness: 'long long int' and 'std::vector<long long int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
54 | for (int j = 0; j < col[color].size(); j++){
| ~~^~~~~~~~~~~~~~~~~~~
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
212 KB |
Output is correct |
2 |
Correct |
1 ms |
212 KB |
Output is correct |
3 |
Correct |
0 ms |
212 KB |
Output is correct |
4 |
Correct |
0 ms |
212 KB |
Output is correct |
5 |
Correct |
0 ms |
212 KB |
Output is correct |
6 |
Correct |
0 ms |
212 KB |
Output is correct |
7 |
Correct |
0 ms |
212 KB |
Output is correct |
8 |
Correct |
0 ms |
212 KB |
Output is correct |
9 |
Correct |
0 ms |
212 KB |
Output is correct |
10 |
Correct |
1 ms |
212 KB |
Output is correct |
11 |
Correct |
0 ms |
212 KB |
Output is correct |
12 |
Correct |
0 ms |
212 KB |
Output is correct |
13 |
Correct |
2 ms |
2592 KB |
Output is correct |
14 |
Correct |
3 ms |
2644 KB |
Output is correct |
15 |
Correct |
2 ms |
2644 KB |
Output is correct |
16 |
Correct |
2 ms |
2644 KB |
Output is correct |
17 |
Correct |
2 ms |
2644 KB |
Output is correct |
18 |
Correct |
2 ms |
2644 KB |
Output is correct |
19 |
Correct |
2 ms |
2644 KB |
Output is correct |
20 |
Correct |
2 ms |
2644 KB |
Output is correct |
21 |
Correct |
2 ms |
2644 KB |
Output is correct |
22 |
Correct |
18 ms |
6524 KB |
Output is correct |
23 |
Correct |
20 ms |
6528 KB |
Output is correct |
24 |
Correct |
29 ms |
6556 KB |
Output is correct |
25 |
Correct |
3 ms |
468 KB |
Output is correct |
26 |
Correct |
4 ms |
340 KB |
Output is correct |
27 |
Correct |
4 ms |
436 KB |
Output is correct |
28 |
Correct |
3 ms |
340 KB |
Output is correct |
29 |
Correct |
3 ms |
388 KB |
Output is correct |
30 |
Correct |
2 ms |
340 KB |
Output is correct |
31 |
Correct |
9 ms |
3668 KB |
Output is correct |
32 |
Correct |
9 ms |
3668 KB |
Output is correct |
33 |
Correct |
8 ms |
3668 KB |
Output is correct |
34 |
Correct |
9 ms |
3668 KB |
Output is correct |
35 |
Correct |
9 ms |
3764 KB |
Output is correct |
36 |
Correct |
8 ms |
3684 KB |
Output is correct |
37 |
Correct |
27 ms |
6868 KB |
Output is correct |
38 |
Correct |
35 ms |
6856 KB |
Output is correct |
39 |
Correct |
24 ms |
6824 KB |
Output is correct |
40 |
Correct |
9 ms |
980 KB |
Output is correct |
41 |
Correct |
6 ms |
664 KB |
Output is correct |
42 |
Correct |
12 ms |
1108 KB |
Output is correct |
43 |
Correct |
6 ms |
824 KB |
Output is correct |
44 |
Correct |
6 ms |
724 KB |
Output is correct |
45 |
Correct |
10 ms |
1108 KB |
Output is correct |
46 |
Correct |
45 ms |
12436 KB |
Output is correct |
47 |
Correct |
27 ms |
7840 KB |
Output is correct |
48 |
Correct |
34 ms |
10444 KB |
Output is correct |
49 |
Correct |
40 ms |
10540 KB |
Output is correct |
50 |
Correct |
37 ms |
10188 KB |
Output is correct |
51 |
Correct |
31 ms |
7384 KB |
Output is correct |
52 |
Correct |
10 ms |
980 KB |
Output is correct |
53 |
Correct |
10 ms |
980 KB |
Output is correct |
54 |
Correct |
11 ms |
1092 KB |
Output is correct |
55 |
Correct |
9 ms |
1108 KB |
Output is correct |
56 |
Correct |
9 ms |
1088 KB |
Output is correct |
57 |
Correct |
9 ms |
1088 KB |
Output is correct |
58 |
Correct |
57 ms |
13132 KB |
Output is correct |
59 |
Correct |
44 ms |
13148 KB |
Output is correct |
60 |
Correct |
46 ms |
13132 KB |
Output is correct |
61 |
Correct |
44 ms |
13216 KB |
Output is correct |
62 |
Correct |
46 ms |
13216 KB |
Output is correct |
63 |
Correct |
47 ms |
13132 KB |
Output is correct |
64 |
Correct |
68 ms |
12348 KB |
Output is correct |
65 |
Correct |
58 ms |
12288 KB |
Output is correct |
66 |
Correct |
50 ms |
12332 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
212 KB |
Output is correct |
2 |
Correct |
1 ms |
212 KB |
Output is correct |
3 |
Correct |
0 ms |
212 KB |
Output is correct |
4 |
Correct |
0 ms |
212 KB |
Output is correct |
5 |
Correct |
0 ms |
212 KB |
Output is correct |
6 |
Correct |
0 ms |
212 KB |
Output is correct |
7 |
Correct |
0 ms |
212 KB |
Output is correct |
8 |
Correct |
0 ms |
212 KB |
Output is correct |
9 |
Correct |
0 ms |
212 KB |
Output is correct |
10 |
Correct |
1 ms |
212 KB |
Output is correct |
11 |
Correct |
0 ms |
212 KB |
Output is correct |
12 |
Correct |
0 ms |
212 KB |
Output is correct |
13 |
Correct |
2 ms |
2592 KB |
Output is correct |
14 |
Correct |
3 ms |
2644 KB |
Output is correct |
15 |
Correct |
2 ms |
2644 KB |
Output is correct |
16 |
Correct |
2 ms |
2644 KB |
Output is correct |
17 |
Correct |
2 ms |
2644 KB |
Output is correct |
18 |
Correct |
2 ms |
2644 KB |
Output is correct |
19 |
Correct |
2 ms |
2644 KB |
Output is correct |
20 |
Correct |
2 ms |
2644 KB |
Output is correct |
21 |
Correct |
2 ms |
2644 KB |
Output is correct |
22 |
Correct |
0 ms |
212 KB |
Output is correct |
23 |
Correct |
0 ms |
212 KB |
Output is correct |
24 |
Correct |
0 ms |
212 KB |
Output is correct |
25 |
Correct |
1 ms |
328 KB |
Output is correct |
26 |
Correct |
0 ms |
212 KB |
Output is correct |
27 |
Correct |
1 ms |
212 KB |
Output is correct |
28 |
Correct |
1 ms |
212 KB |
Output is correct |
29 |
Correct |
1 ms |
212 KB |
Output is correct |
30 |
Correct |
1 ms |
212 KB |
Output is correct |
31 |
Correct |
1 ms |
212 KB |
Output is correct |
32 |
Correct |
1 ms |
212 KB |
Output is correct |
33 |
Correct |
1 ms |
2260 KB |
Output is correct |
34 |
Correct |
1 ms |
1748 KB |
Output is correct |
35 |
Correct |
1 ms |
1620 KB |
Output is correct |
36 |
Correct |
2 ms |
2644 KB |
Output is correct |
37 |
Correct |
2 ms |
2132 KB |
Output is correct |
38 |
Correct |
2 ms |
2388 KB |
Output is correct |
39 |
Correct |
1 ms |
212 KB |
Output is correct |
40 |
Correct |
1 ms |
2132 KB |
Output is correct |
41 |
Correct |
1 ms |
212 KB |
Output is correct |
42 |
Correct |
2 ms |
2516 KB |
Output is correct |
43 |
Correct |
2 ms |
2388 KB |
Output is correct |
44 |
Correct |
1 ms |
212 KB |
Output is correct |
45 |
Correct |
1 ms |
212 KB |
Output is correct |
46 |
Correct |
1 ms |
212 KB |
Output is correct |
47 |
Correct |
1 ms |
212 KB |
Output is correct |
48 |
Correct |
1 ms |
212 KB |
Output is correct |
49 |
Correct |
1 ms |
212 KB |
Output is correct |
50 |
Correct |
2 ms |
2644 KB |
Output is correct |
51 |
Correct |
2 ms |
2644 KB |
Output is correct |
52 |
Correct |
2 ms |
2644 KB |
Output is correct |
53 |
Correct |
2 ms |
2644 KB |
Output is correct |
54 |
Correct |
2 ms |
2644 KB |
Output is correct |
55 |
Correct |
2 ms |
2644 KB |
Output is correct |
56 |
Correct |
2 ms |
2644 KB |
Output is correct |
57 |
Correct |
1 ms |
340 KB |
Output is correct |
58 |
Correct |
2 ms |
2644 KB |
Output is correct |
59 |
Correct |
1 ms |
340 KB |
Output is correct |
60 |
Correct |
2 ms |
2644 KB |
Output is correct |
61 |
Correct |
1 ms |
340 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
212 KB |
Output is correct |
2 |
Correct |
0 ms |
212 KB |
Output is correct |
3 |
Correct |
0 ms |
212 KB |
Output is correct |
4 |
Correct |
1 ms |
212 KB |
Output is correct |
5 |
Correct |
0 ms |
212 KB |
Output is correct |
6 |
Correct |
0 ms |
212 KB |
Output is correct |
7 |
Correct |
0 ms |
212 KB |
Output is correct |
8 |
Correct |
0 ms |
212 KB |
Output is correct |
9 |
Correct |
0 ms |
212 KB |
Output is correct |
10 |
Correct |
0 ms |
212 KB |
Output is correct |
11 |
Correct |
0 ms |
212 KB |
Output is correct |
12 |
Correct |
1 ms |
212 KB |
Output is correct |
13 |
Correct |
0 ms |
212 KB |
Output is correct |
14 |
Correct |
0 ms |
212 KB |
Output is correct |
15 |
Correct |
2 ms |
2592 KB |
Output is correct |
16 |
Correct |
3 ms |
2644 KB |
Output is correct |
17 |
Correct |
2 ms |
2644 KB |
Output is correct |
18 |
Correct |
2 ms |
2644 KB |
Output is correct |
19 |
Correct |
2 ms |
2644 KB |
Output is correct |
20 |
Correct |
2 ms |
2644 KB |
Output is correct |
21 |
Correct |
2 ms |
2644 KB |
Output is correct |
22 |
Correct |
2 ms |
2644 KB |
Output is correct |
23 |
Correct |
2 ms |
2644 KB |
Output is correct |
24 |
Correct |
18 ms |
6524 KB |
Output is correct |
25 |
Correct |
20 ms |
6528 KB |
Output is correct |
26 |
Correct |
29 ms |
6556 KB |
Output is correct |
27 |
Correct |
0 ms |
212 KB |
Output is correct |
28 |
Correct |
1 ms |
328 KB |
Output is correct |
29 |
Correct |
0 ms |
212 KB |
Output is correct |
30 |
Correct |
1 ms |
212 KB |
Output is correct |
31 |
Correct |
1 ms |
212 KB |
Output is correct |
32 |
Correct |
1 ms |
212 KB |
Output is correct |
33 |
Correct |
1 ms |
212 KB |
Output is correct |
34 |
Correct |
1 ms |
212 KB |
Output is correct |
35 |
Correct |
1 ms |
212 KB |
Output is correct |
36 |
Correct |
1 ms |
2260 KB |
Output is correct |
37 |
Correct |
1 ms |
1748 KB |
Output is correct |
38 |
Correct |
1 ms |
1620 KB |
Output is correct |
39 |
Correct |
2 ms |
2644 KB |
Output is correct |
40 |
Correct |
2 ms |
2132 KB |
Output is correct |
41 |
Correct |
2 ms |
2388 KB |
Output is correct |
42 |
Correct |
1 ms |
212 KB |
Output is correct |
43 |
Correct |
1 ms |
2132 KB |
Output is correct |
44 |
Correct |
1 ms |
212 KB |
Output is correct |
45 |
Correct |
2 ms |
2516 KB |
Output is correct |
46 |
Correct |
2 ms |
2388 KB |
Output is correct |
47 |
Correct |
1 ms |
212 KB |
Output is correct |
48 |
Correct |
1 ms |
212 KB |
Output is correct |
49 |
Correct |
1 ms |
212 KB |
Output is correct |
50 |
Correct |
1 ms |
212 KB |
Output is correct |
51 |
Correct |
1 ms |
212 KB |
Output is correct |
52 |
Correct |
1 ms |
212 KB |
Output is correct |
53 |
Correct |
2 ms |
2644 KB |
Output is correct |
54 |
Correct |
2 ms |
2644 KB |
Output is correct |
55 |
Correct |
2 ms |
2644 KB |
Output is correct |
56 |
Correct |
2 ms |
2644 KB |
Output is correct |
57 |
Correct |
2 ms |
2644 KB |
Output is correct |
58 |
Correct |
2 ms |
2644 KB |
Output is correct |
59 |
Correct |
2 ms |
2644 KB |
Output is correct |
60 |
Correct |
1 ms |
340 KB |
Output is correct |
61 |
Correct |
2 ms |
2644 KB |
Output is correct |
62 |
Correct |
1 ms |
340 KB |
Output is correct |
63 |
Correct |
2 ms |
2644 KB |
Output is correct |
64 |
Correct |
1 ms |
340 KB |
Output is correct |
65 |
Correct |
1 ms |
212 KB |
Output is correct |
66 |
Correct |
1 ms |
212 KB |
Output is correct |
67 |
Correct |
1 ms |
212 KB |
Output is correct |
68 |
Correct |
1 ms |
212 KB |
Output is correct |
69 |
Correct |
1 ms |
212 KB |
Output is correct |
70 |
Correct |
3 ms |
2516 KB |
Output is correct |
71 |
Correct |
3 ms |
2132 KB |
Output is correct |
72 |
Correct |
3 ms |
1876 KB |
Output is correct |
73 |
Correct |
2 ms |
2004 KB |
Output is correct |
74 |
Correct |
4 ms |
2260 KB |
Output is correct |
75 |
Correct |
3 ms |
2772 KB |
Output is correct |
76 |
Correct |
22 ms |
4820 KB |
Output is correct |
77 |
Correct |
27 ms |
5756 KB |
Output is correct |
78 |
Correct |
29 ms |
6384 KB |
Output is correct |
79 |
Correct |
2 ms |
212 KB |
Output is correct |
80 |
Correct |
1 ms |
340 KB |
Output is correct |
81 |
Correct |
1 ms |
340 KB |
Output is correct |
82 |
Correct |
1 ms |
340 KB |
Output is correct |
83 |
Correct |
1 ms |
340 KB |
Output is correct |
84 |
Correct |
4 ms |
2900 KB |
Output is correct |
85 |
Correct |
4 ms |
2900 KB |
Output is correct |
86 |
Correct |
3 ms |
2900 KB |
Output is correct |
87 |
Correct |
4 ms |
2900 KB |
Output is correct |
88 |
Correct |
4 ms |
2900 KB |
Output is correct |
89 |
Correct |
4 ms |
2948 KB |
Output is correct |
90 |
Correct |
37 ms |
6748 KB |
Output is correct |
91 |
Correct |
30 ms |
6688 KB |
Output is correct |
92 |
Correct |
32 ms |
6736 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
212 KB |
Output is correct |
2 |
Correct |
0 ms |
212 KB |
Output is correct |
3 |
Correct |
0 ms |
212 KB |
Output is correct |
4 |
Correct |
1 ms |
212 KB |
Output is correct |
5 |
Correct |
0 ms |
212 KB |
Output is correct |
6 |
Correct |
0 ms |
212 KB |
Output is correct |
7 |
Correct |
0 ms |
212 KB |
Output is correct |
8 |
Correct |
0 ms |
212 KB |
Output is correct |
9 |
Correct |
0 ms |
212 KB |
Output is correct |
10 |
Correct |
0 ms |
212 KB |
Output is correct |
11 |
Correct |
0 ms |
212 KB |
Output is correct |
12 |
Correct |
1 ms |
212 KB |
Output is correct |
13 |
Correct |
0 ms |
212 KB |
Output is correct |
14 |
Correct |
0 ms |
212 KB |
Output is correct |
15 |
Correct |
2 ms |
2592 KB |
Output is correct |
16 |
Correct |
3 ms |
2644 KB |
Output is correct |
17 |
Correct |
2 ms |
2644 KB |
Output is correct |
18 |
Correct |
2 ms |
2644 KB |
Output is correct |
19 |
Correct |
2 ms |
2644 KB |
Output is correct |
20 |
Correct |
2 ms |
2644 KB |
Output is correct |
21 |
Correct |
2 ms |
2644 KB |
Output is correct |
22 |
Correct |
2 ms |
2644 KB |
Output is correct |
23 |
Correct |
2 ms |
2644 KB |
Output is correct |
24 |
Correct |
18 ms |
6524 KB |
Output is correct |
25 |
Correct |
20 ms |
6528 KB |
Output is correct |
26 |
Correct |
29 ms |
6556 KB |
Output is correct |
27 |
Correct |
3 ms |
468 KB |
Output is correct |
28 |
Correct |
4 ms |
340 KB |
Output is correct |
29 |
Correct |
4 ms |
436 KB |
Output is correct |
30 |
Correct |
3 ms |
340 KB |
Output is correct |
31 |
Correct |
3 ms |
388 KB |
Output is correct |
32 |
Correct |
2 ms |
340 KB |
Output is correct |
33 |
Correct |
9 ms |
3668 KB |
Output is correct |
34 |
Correct |
9 ms |
3668 KB |
Output is correct |
35 |
Correct |
8 ms |
3668 KB |
Output is correct |
36 |
Correct |
9 ms |
3668 KB |
Output is correct |
37 |
Correct |
9 ms |
3764 KB |
Output is correct |
38 |
Correct |
8 ms |
3684 KB |
Output is correct |
39 |
Correct |
27 ms |
6868 KB |
Output is correct |
40 |
Correct |
35 ms |
6856 KB |
Output is correct |
41 |
Correct |
24 ms |
6824 KB |
Output is correct |
42 |
Correct |
0 ms |
212 KB |
Output is correct |
43 |
Correct |
1 ms |
328 KB |
Output is correct |
44 |
Correct |
0 ms |
212 KB |
Output is correct |
45 |
Correct |
1 ms |
212 KB |
Output is correct |
46 |
Correct |
1 ms |
212 KB |
Output is correct |
47 |
Correct |
1 ms |
212 KB |
Output is correct |
48 |
Correct |
1 ms |
212 KB |
Output is correct |
49 |
Correct |
1 ms |
212 KB |
Output is correct |
50 |
Correct |
1 ms |
212 KB |
Output is correct |
51 |
Correct |
1 ms |
2260 KB |
Output is correct |
52 |
Correct |
1 ms |
1748 KB |
Output is correct |
53 |
Correct |
1 ms |
1620 KB |
Output is correct |
54 |
Correct |
2 ms |
2644 KB |
Output is correct |
55 |
Correct |
2 ms |
2132 KB |
Output is correct |
56 |
Correct |
2 ms |
2388 KB |
Output is correct |
57 |
Correct |
1 ms |
212 KB |
Output is correct |
58 |
Correct |
1 ms |
2132 KB |
Output is correct |
59 |
Correct |
1 ms |
212 KB |
Output is correct |
60 |
Correct |
2 ms |
2516 KB |
Output is correct |
61 |
Correct |
2 ms |
2388 KB |
Output is correct |
62 |
Correct |
1 ms |
212 KB |
Output is correct |
63 |
Correct |
1 ms |
212 KB |
Output is correct |
64 |
Correct |
1 ms |
212 KB |
Output is correct |
65 |
Correct |
1 ms |
212 KB |
Output is correct |
66 |
Correct |
1 ms |
212 KB |
Output is correct |
67 |
Correct |
1 ms |
212 KB |
Output is correct |
68 |
Correct |
2 ms |
2644 KB |
Output is correct |
69 |
Correct |
2 ms |
2644 KB |
Output is correct |
70 |
Correct |
2 ms |
2644 KB |
Output is correct |
71 |
Correct |
2 ms |
2644 KB |
Output is correct |
72 |
Correct |
2 ms |
2644 KB |
Output is correct |
73 |
Correct |
2 ms |
2644 KB |
Output is correct |
74 |
Correct |
2 ms |
2644 KB |
Output is correct |
75 |
Correct |
1 ms |
340 KB |
Output is correct |
76 |
Correct |
2 ms |
2644 KB |
Output is correct |
77 |
Correct |
1 ms |
340 KB |
Output is correct |
78 |
Correct |
2 ms |
2644 KB |
Output is correct |
79 |
Correct |
1 ms |
340 KB |
Output is correct |
80 |
Correct |
1 ms |
212 KB |
Output is correct |
81 |
Correct |
1 ms |
212 KB |
Output is correct |
82 |
Correct |
1 ms |
212 KB |
Output is correct |
83 |
Correct |
1 ms |
212 KB |
Output is correct |
84 |
Correct |
1 ms |
212 KB |
Output is correct |
85 |
Correct |
3 ms |
2516 KB |
Output is correct |
86 |
Correct |
3 ms |
2132 KB |
Output is correct |
87 |
Correct |
3 ms |
1876 KB |
Output is correct |
88 |
Correct |
2 ms |
2004 KB |
Output is correct |
89 |
Correct |
4 ms |
2260 KB |
Output is correct |
90 |
Correct |
3 ms |
2772 KB |
Output is correct |
91 |
Correct |
22 ms |
4820 KB |
Output is correct |
92 |
Correct |
27 ms |
5756 KB |
Output is correct |
93 |
Correct |
29 ms |
6384 KB |
Output is correct |
94 |
Correct |
2 ms |
212 KB |
Output is correct |
95 |
Correct |
1 ms |
340 KB |
Output is correct |
96 |
Correct |
1 ms |
340 KB |
Output is correct |
97 |
Correct |
1 ms |
340 KB |
Output is correct |
98 |
Correct |
1 ms |
340 KB |
Output is correct |
99 |
Correct |
4 ms |
2900 KB |
Output is correct |
100 |
Correct |
4 ms |
2900 KB |
Output is correct |
101 |
Correct |
3 ms |
2900 KB |
Output is correct |
102 |
Correct |
4 ms |
2900 KB |
Output is correct |
103 |
Correct |
4 ms |
2900 KB |
Output is correct |
104 |
Correct |
4 ms |
2948 KB |
Output is correct |
105 |
Correct |
37 ms |
6748 KB |
Output is correct |
106 |
Correct |
30 ms |
6688 KB |
Output is correct |
107 |
Correct |
32 ms |
6736 KB |
Output is correct |
108 |
Correct |
2 ms |
340 KB |
Output is correct |
109 |
Correct |
76 ms |
468 KB |
Output is correct |
110 |
Correct |
56 ms |
504 KB |
Output is correct |
111 |
Correct |
45 ms |
468 KB |
Output is correct |
112 |
Correct |
48 ms |
468 KB |
Output is correct |
113 |
Correct |
30 ms |
496 KB |
Output is correct |
114 |
Correct |
13 ms |
4632 KB |
Output is correct |
115 |
Correct |
14 ms |
4184 KB |
Output is correct |
116 |
Correct |
17 ms |
4792 KB |
Output is correct |
117 |
Correct |
13 ms |
3924 KB |
Output is correct |
118 |
Correct |
15 ms |
4564 KB |
Output is correct |
119 |
Correct |
13 ms |
4180 KB |
Output is correct |
120 |
Correct |
27 ms |
5048 KB |
Output is correct |
121 |
Correct |
5 ms |
1208 KB |
Output is correct |
122 |
Correct |
24 ms |
5440 KB |
Output is correct |
123 |
Correct |
4 ms |
1108 KB |
Output is correct |
124 |
Correct |
26 ms |
6324 KB |
Output is correct |
125 |
Correct |
7 ms |
1636 KB |
Output is correct |
126 |
Correct |
7 ms |
2640 KB |
Output is correct |
127 |
Correct |
9 ms |
3432 KB |
Output is correct |
128 |
Correct |
10 ms |
2900 KB |
Output is correct |
129 |
Correct |
7 ms |
2388 KB |
Output is correct |
130 |
Correct |
3 ms |
468 KB |
Output is correct |
131 |
Correct |
109 ms |
576 KB |
Output is correct |
132 |
Correct |
105 ms |
600 KB |
Output is correct |
133 |
Correct |
88 ms |
596 KB |
Output is correct |
134 |
Correct |
70 ms |
644 KB |
Output is correct |
135 |
Correct |
62 ms |
664 KB |
Output is correct |
136 |
Correct |
19 ms |
5312 KB |
Output is correct |
137 |
Correct |
19 ms |
5276 KB |
Output is correct |
138 |
Correct |
20 ms |
5212 KB |
Output is correct |
139 |
Correct |
21 ms |
5228 KB |
Output is correct |
140 |
Correct |
20 ms |
5304 KB |
Output is correct |
141 |
Correct |
20 ms |
5196 KB |
Output is correct |
142 |
Correct |
38 ms |
8020 KB |
Output is correct |
143 |
Correct |
8 ms |
1948 KB |
Output is correct |
144 |
Correct |
33 ms |
8036 KB |
Output is correct |
145 |
Correct |
12 ms |
1828 KB |
Output is correct |
146 |
Correct |
34 ms |
8120 KB |
Output is correct |
147 |
Correct |
8 ms |
1848 KB |
Output is correct |
148 |
Correct |
11 ms |
4132 KB |
Output is correct |
149 |
Correct |
11 ms |
4072 KB |
Output is correct |
150 |
Correct |
15 ms |
3996 KB |
Output is correct |
151 |
Correct |
11 ms |
3992 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
212 KB |
Output is correct |
2 |
Correct |
0 ms |
212 KB |
Output is correct |
3 |
Correct |
0 ms |
212 KB |
Output is correct |
4 |
Correct |
1 ms |
212 KB |
Output is correct |
5 |
Correct |
0 ms |
212 KB |
Output is correct |
6 |
Correct |
0 ms |
212 KB |
Output is correct |
7 |
Correct |
0 ms |
212 KB |
Output is correct |
8 |
Correct |
0 ms |
212 KB |
Output is correct |
9 |
Correct |
0 ms |
212 KB |
Output is correct |
10 |
Correct |
0 ms |
212 KB |
Output is correct |
11 |
Correct |
0 ms |
212 KB |
Output is correct |
12 |
Correct |
1 ms |
212 KB |
Output is correct |
13 |
Correct |
0 ms |
212 KB |
Output is correct |
14 |
Correct |
0 ms |
212 KB |
Output is correct |
15 |
Correct |
2 ms |
2592 KB |
Output is correct |
16 |
Correct |
3 ms |
2644 KB |
Output is correct |
17 |
Correct |
2 ms |
2644 KB |
Output is correct |
18 |
Correct |
2 ms |
2644 KB |
Output is correct |
19 |
Correct |
2 ms |
2644 KB |
Output is correct |
20 |
Correct |
2 ms |
2644 KB |
Output is correct |
21 |
Correct |
2 ms |
2644 KB |
Output is correct |
22 |
Correct |
2 ms |
2644 KB |
Output is correct |
23 |
Correct |
2 ms |
2644 KB |
Output is correct |
24 |
Correct |
18 ms |
6524 KB |
Output is correct |
25 |
Correct |
20 ms |
6528 KB |
Output is correct |
26 |
Correct |
29 ms |
6556 KB |
Output is correct |
27 |
Correct |
3 ms |
468 KB |
Output is correct |
28 |
Correct |
4 ms |
340 KB |
Output is correct |
29 |
Correct |
4 ms |
436 KB |
Output is correct |
30 |
Correct |
3 ms |
340 KB |
Output is correct |
31 |
Correct |
3 ms |
388 KB |
Output is correct |
32 |
Correct |
2 ms |
340 KB |
Output is correct |
33 |
Correct |
9 ms |
3668 KB |
Output is correct |
34 |
Correct |
9 ms |
3668 KB |
Output is correct |
35 |
Correct |
8 ms |
3668 KB |
Output is correct |
36 |
Correct |
9 ms |
3668 KB |
Output is correct |
37 |
Correct |
9 ms |
3764 KB |
Output is correct |
38 |
Correct |
8 ms |
3684 KB |
Output is correct |
39 |
Correct |
27 ms |
6868 KB |
Output is correct |
40 |
Correct |
35 ms |
6856 KB |
Output is correct |
41 |
Correct |
24 ms |
6824 KB |
Output is correct |
42 |
Correct |
9 ms |
980 KB |
Output is correct |
43 |
Correct |
6 ms |
664 KB |
Output is correct |
44 |
Correct |
12 ms |
1108 KB |
Output is correct |
45 |
Correct |
6 ms |
824 KB |
Output is correct |
46 |
Correct |
6 ms |
724 KB |
Output is correct |
47 |
Correct |
10 ms |
1108 KB |
Output is correct |
48 |
Correct |
45 ms |
12436 KB |
Output is correct |
49 |
Correct |
27 ms |
7840 KB |
Output is correct |
50 |
Correct |
34 ms |
10444 KB |
Output is correct |
51 |
Correct |
40 ms |
10540 KB |
Output is correct |
52 |
Correct |
37 ms |
10188 KB |
Output is correct |
53 |
Correct |
31 ms |
7384 KB |
Output is correct |
54 |
Correct |
10 ms |
980 KB |
Output is correct |
55 |
Correct |
10 ms |
980 KB |
Output is correct |
56 |
Correct |
11 ms |
1092 KB |
Output is correct |
57 |
Correct |
9 ms |
1108 KB |
Output is correct |
58 |
Correct |
9 ms |
1088 KB |
Output is correct |
59 |
Correct |
9 ms |
1088 KB |
Output is correct |
60 |
Correct |
57 ms |
13132 KB |
Output is correct |
61 |
Correct |
44 ms |
13148 KB |
Output is correct |
62 |
Correct |
46 ms |
13132 KB |
Output is correct |
63 |
Correct |
44 ms |
13216 KB |
Output is correct |
64 |
Correct |
46 ms |
13216 KB |
Output is correct |
65 |
Correct |
47 ms |
13132 KB |
Output is correct |
66 |
Correct |
68 ms |
12348 KB |
Output is correct |
67 |
Correct |
58 ms |
12288 KB |
Output is correct |
68 |
Correct |
50 ms |
12332 KB |
Output is correct |
69 |
Correct |
0 ms |
212 KB |
Output is correct |
70 |
Correct |
1 ms |
328 KB |
Output is correct |
71 |
Correct |
0 ms |
212 KB |
Output is correct |
72 |
Correct |
1 ms |
212 KB |
Output is correct |
73 |
Correct |
1 ms |
212 KB |
Output is correct |
74 |
Correct |
1 ms |
212 KB |
Output is correct |
75 |
Correct |
1 ms |
212 KB |
Output is correct |
76 |
Correct |
1 ms |
212 KB |
Output is correct |
77 |
Correct |
1 ms |
212 KB |
Output is correct |
78 |
Correct |
1 ms |
2260 KB |
Output is correct |
79 |
Correct |
1 ms |
1748 KB |
Output is correct |
80 |
Correct |
1 ms |
1620 KB |
Output is correct |
81 |
Correct |
2 ms |
2644 KB |
Output is correct |
82 |
Correct |
2 ms |
2132 KB |
Output is correct |
83 |
Correct |
2 ms |
2388 KB |
Output is correct |
84 |
Correct |
1 ms |
212 KB |
Output is correct |
85 |
Correct |
1 ms |
2132 KB |
Output is correct |
86 |
Correct |
1 ms |
212 KB |
Output is correct |
87 |
Correct |
2 ms |
2516 KB |
Output is correct |
88 |
Correct |
2 ms |
2388 KB |
Output is correct |
89 |
Correct |
1 ms |
212 KB |
Output is correct |
90 |
Correct |
1 ms |
212 KB |
Output is correct |
91 |
Correct |
1 ms |
212 KB |
Output is correct |
92 |
Correct |
1 ms |
212 KB |
Output is correct |
93 |
Correct |
1 ms |
212 KB |
Output is correct |
94 |
Correct |
1 ms |
212 KB |
Output is correct |
95 |
Correct |
2 ms |
2644 KB |
Output is correct |
96 |
Correct |
2 ms |
2644 KB |
Output is correct |
97 |
Correct |
2 ms |
2644 KB |
Output is correct |
98 |
Correct |
2 ms |
2644 KB |
Output is correct |
99 |
Correct |
2 ms |
2644 KB |
Output is correct |
100 |
Correct |
2 ms |
2644 KB |
Output is correct |
101 |
Correct |
2 ms |
2644 KB |
Output is correct |
102 |
Correct |
1 ms |
340 KB |
Output is correct |
103 |
Correct |
2 ms |
2644 KB |
Output is correct |
104 |
Correct |
1 ms |
340 KB |
Output is correct |
105 |
Correct |
2 ms |
2644 KB |
Output is correct |
106 |
Correct |
1 ms |
340 KB |
Output is correct |
107 |
Correct |
1 ms |
212 KB |
Output is correct |
108 |
Correct |
1 ms |
212 KB |
Output is correct |
109 |
Correct |
1 ms |
212 KB |
Output is correct |
110 |
Correct |
1 ms |
212 KB |
Output is correct |
111 |
Correct |
1 ms |
212 KB |
Output is correct |
112 |
Correct |
3 ms |
2516 KB |
Output is correct |
113 |
Correct |
3 ms |
2132 KB |
Output is correct |
114 |
Correct |
3 ms |
1876 KB |
Output is correct |
115 |
Correct |
2 ms |
2004 KB |
Output is correct |
116 |
Correct |
4 ms |
2260 KB |
Output is correct |
117 |
Correct |
3 ms |
2772 KB |
Output is correct |
118 |
Correct |
22 ms |
4820 KB |
Output is correct |
119 |
Correct |
27 ms |
5756 KB |
Output is correct |
120 |
Correct |
29 ms |
6384 KB |
Output is correct |
121 |
Correct |
2 ms |
212 KB |
Output is correct |
122 |
Correct |
1 ms |
340 KB |
Output is correct |
123 |
Correct |
1 ms |
340 KB |
Output is correct |
124 |
Correct |
1 ms |
340 KB |
Output is correct |
125 |
Correct |
1 ms |
340 KB |
Output is correct |
126 |
Correct |
4 ms |
2900 KB |
Output is correct |
127 |
Correct |
4 ms |
2900 KB |
Output is correct |
128 |
Correct |
3 ms |
2900 KB |
Output is correct |
129 |
Correct |
4 ms |
2900 KB |
Output is correct |
130 |
Correct |
4 ms |
2900 KB |
Output is correct |
131 |
Correct |
4 ms |
2948 KB |
Output is correct |
132 |
Correct |
37 ms |
6748 KB |
Output is correct |
133 |
Correct |
30 ms |
6688 KB |
Output is correct |
134 |
Correct |
32 ms |
6736 KB |
Output is correct |
135 |
Correct |
2 ms |
340 KB |
Output is correct |
136 |
Correct |
76 ms |
468 KB |
Output is correct |
137 |
Correct |
56 ms |
504 KB |
Output is correct |
138 |
Correct |
45 ms |
468 KB |
Output is correct |
139 |
Correct |
48 ms |
468 KB |
Output is correct |
140 |
Correct |
30 ms |
496 KB |
Output is correct |
141 |
Correct |
13 ms |
4632 KB |
Output is correct |
142 |
Correct |
14 ms |
4184 KB |
Output is correct |
143 |
Correct |
17 ms |
4792 KB |
Output is correct |
144 |
Correct |
13 ms |
3924 KB |
Output is correct |
145 |
Correct |
15 ms |
4564 KB |
Output is correct |
146 |
Correct |
13 ms |
4180 KB |
Output is correct |
147 |
Correct |
27 ms |
5048 KB |
Output is correct |
148 |
Correct |
5 ms |
1208 KB |
Output is correct |
149 |
Correct |
24 ms |
5440 KB |
Output is correct |
150 |
Correct |
4 ms |
1108 KB |
Output is correct |
151 |
Correct |
26 ms |
6324 KB |
Output is correct |
152 |
Correct |
7 ms |
1636 KB |
Output is correct |
153 |
Correct |
7 ms |
2640 KB |
Output is correct |
154 |
Correct |
9 ms |
3432 KB |
Output is correct |
155 |
Correct |
10 ms |
2900 KB |
Output is correct |
156 |
Correct |
7 ms |
2388 KB |
Output is correct |
157 |
Correct |
3 ms |
468 KB |
Output is correct |
158 |
Correct |
109 ms |
576 KB |
Output is correct |
159 |
Correct |
105 ms |
600 KB |
Output is correct |
160 |
Correct |
88 ms |
596 KB |
Output is correct |
161 |
Correct |
70 ms |
644 KB |
Output is correct |
162 |
Correct |
62 ms |
664 KB |
Output is correct |
163 |
Correct |
19 ms |
5312 KB |
Output is correct |
164 |
Correct |
19 ms |
5276 KB |
Output is correct |
165 |
Correct |
20 ms |
5212 KB |
Output is correct |
166 |
Correct |
21 ms |
5228 KB |
Output is correct |
167 |
Correct |
20 ms |
5304 KB |
Output is correct |
168 |
Correct |
20 ms |
5196 KB |
Output is correct |
169 |
Correct |
38 ms |
8020 KB |
Output is correct |
170 |
Correct |
8 ms |
1948 KB |
Output is correct |
171 |
Correct |
33 ms |
8036 KB |
Output is correct |
172 |
Correct |
12 ms |
1828 KB |
Output is correct |
173 |
Correct |
34 ms |
8120 KB |
Output is correct |
174 |
Correct |
8 ms |
1848 KB |
Output is correct |
175 |
Correct |
11 ms |
4132 KB |
Output is correct |
176 |
Correct |
11 ms |
4072 KB |
Output is correct |
177 |
Correct |
15 ms |
3996 KB |
Output is correct |
178 |
Correct |
11 ms |
3992 KB |
Output is correct |
179 |
Correct |
7 ms |
924 KB |
Output is correct |
180 |
Correct |
220 ms |
888 KB |
Output is correct |
181 |
Correct |
353 ms |
1156 KB |
Output is correct |
182 |
Correct |
427 ms |
1464 KB |
Output is correct |
183 |
Correct |
183 ms |
1108 KB |
Output is correct |
184 |
Correct |
149 ms |
980 KB |
Output is correct |
185 |
Correct |
28 ms |
5952 KB |
Output is correct |
186 |
Correct |
27 ms |
8008 KB |
Output is correct |
187 |
Correct |
36 ms |
7044 KB |
Output is correct |
188 |
Correct |
34 ms |
6740 KB |
Output is correct |
189 |
Correct |
33 ms |
6880 KB |
Output is correct |
190 |
Correct |
40 ms |
7880 KB |
Output is correct |
191 |
Correct |
34 ms |
7632 KB |
Output is correct |
192 |
Correct |
29 ms |
5932 KB |
Output is correct |
193 |
Correct |
26 ms |
5196 KB |
Output is correct |
194 |
Correct |
11 ms |
1236 KB |
Output is correct |
195 |
Correct |
528 ms |
1384 KB |
Output is correct |
196 |
Correct |
517 ms |
1364 KB |
Output is correct |
197 |
Correct |
412 ms |
1452 KB |
Output is correct |
198 |
Correct |
339 ms |
1504 KB |
Output is correct |
199 |
Correct |
277 ms |
1512 KB |
Output is correct |
200 |
Correct |
73 ms |
14988 KB |
Output is correct |
201 |
Correct |
71 ms |
14924 KB |
Output is correct |
202 |
Correct |
66 ms |
15048 KB |
Output is correct |
203 |
Correct |
69 ms |
14924 KB |
Output is correct |
204 |
Correct |
71 ms |
15012 KB |
Output is correct |
205 |
Correct |
73 ms |
15052 KB |
Output is correct |
206 |
Correct |
61 ms |
14200 KB |
Output is correct |
207 |
Correct |
64 ms |
13352 KB |
Output is correct |
208 |
Correct |
67 ms |
14244 KB |
Output is correct |
209 |
Correct |
47 ms |
13352 KB |
Output is correct |
210 |
Correct |
62 ms |
14312 KB |
Output is correct |
211 |
Correct |
53 ms |
13516 KB |
Output is correct |
212 |
Correct |
56 ms |
14752 KB |
Output is correct |
213 |
Correct |
49 ms |
11316 KB |
Output is correct |
214 |
Correct |
47 ms |
10664 KB |
Output is correct |
215 |
Correct |
50 ms |
10580 KB |
Output is correct |