#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<set<int>> st(K);
vector<set<int>> kk(M);
for (int i = 0; i < N; i++){
st[C[i]].insert(i);
}
for (int i = 0; i < M; i++){
for (int j = 0; j < B[i].size(); j++){
int col = B[i][j];
auto it = st[col].begin();
while (it!=st[col].end()){
int pos = *it;
kk[(((pos-i)%M)+M)%M].insert(pos);
it++;
}
}
}
for (int i = 0; i < M; i++){
int streak = 0;
auto it = kk[i].begin();
while (it!=kk[i].end()){
if (it==kk[i].begin()) streak = 1;
else {
it--;
int a = *it;
it++;
if ((*it)-a!=1){
streak=1;
}
else streak++;
}
if (streak>=M){
valid[(*it)-M+1]=true;
}
it++;
}
}
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:50:21: warning: comparison of integer expressions of different signedness: 'long long int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
50 | for (int j = 0; j < B[i].size(); j++){
| ~~^~~~~~~~~~~~~
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
212 KB |
Output is correct |
2 |
Correct |
1 ms |
212 KB |
Output is correct |
3 |
Correct |
1 ms |
212 KB |
Output is correct |
4 |
Correct |
1 ms |
212 KB |
Output is correct |
5 |
Correct |
1 ms |
212 KB |
Output is correct |
6 |
Correct |
1 ms |
212 KB |
Output is correct |
7 |
Correct |
1 ms |
340 KB |
Output is correct |
8 |
Correct |
1 ms |
340 KB |
Output is correct |
9 |
Correct |
1 ms |
340 KB |
Output is correct |
10 |
Correct |
1 ms |
304 KB |
Output is correct |
11 |
Correct |
1 ms |
340 KB |
Output is correct |
12 |
Correct |
1 ms |
340 KB |
Output is correct |
13 |
Correct |
3 ms |
5032 KB |
Output is correct |
14 |
Correct |
3 ms |
5076 KB |
Output is correct |
15 |
Correct |
3 ms |
5076 KB |
Output is correct |
16 |
Correct |
3 ms |
5076 KB |
Output is correct |
17 |
Correct |
3 ms |
5076 KB |
Output is correct |
18 |
Correct |
3 ms |
5076 KB |
Output is correct |
19 |
Correct |
3 ms |
5076 KB |
Output is correct |
20 |
Correct |
3 ms |
5076 KB |
Output is correct |
21 |
Correct |
3 ms |
5076 KB |
Output is correct |
22 |
Correct |
21 ms |
6500 KB |
Output is correct |
23 |
Correct |
15 ms |
6308 KB |
Output is correct |
24 |
Correct |
12 ms |
6356 KB |
Output is correct |
25 |
Correct |
10 ms |
2304 KB |
Output is correct |
26 |
Correct |
10 ms |
2256 KB |
Output is correct |
27 |
Correct |
9 ms |
2360 KB |
Output is correct |
28 |
Correct |
9 ms |
2368 KB |
Output is correct |
29 |
Correct |
10 ms |
2364 KB |
Output is correct |
30 |
Correct |
9 ms |
2260 KB |
Output is correct |
31 |
Correct |
16 ms |
7672 KB |
Output is correct |
32 |
Correct |
17 ms |
7564 KB |
Output is correct |
33 |
Correct |
19 ms |
7636 KB |
Output is correct |
34 |
Correct |
16 ms |
7612 KB |
Output is correct |
35 |
Correct |
16 ms |
7636 KB |
Output is correct |
36 |
Correct |
16 ms |
7628 KB |
Output is correct |
37 |
Correct |
24 ms |
8676 KB |
Output is correct |
38 |
Correct |
23 ms |
8760 KB |
Output is correct |
39 |
Correct |
23 ms |
8664 KB |
Output is correct |
40 |
Correct |
55 ms |
9676 KB |
Output is correct |
41 |
Correct |
30 ms |
6112 KB |
Output is correct |
42 |
Correct |
51 ms |
10432 KB |
Output is correct |
43 |
Correct |
33 ms |
6984 KB |
Output is correct |
44 |
Correct |
35 ms |
6348 KB |
Output is correct |
45 |
Correct |
64 ms |
10672 KB |
Output is correct |
46 |
Correct |
85 ms |
22800 KB |
Output is correct |
47 |
Correct |
44 ms |
14836 KB |
Output is correct |
48 |
Correct |
62 ms |
18084 KB |
Output is correct |
49 |
Correct |
71 ms |
17696 KB |
Output is correct |
50 |
Correct |
88 ms |
18012 KB |
Output is correct |
51 |
Correct |
61 ms |
15196 KB |
Output is correct |
52 |
Correct |
54 ms |
10684 KB |
Output is correct |
53 |
Correct |
54 ms |
10644 KB |
Output is correct |
54 |
Correct |
49 ms |
10572 KB |
Output is correct |
55 |
Correct |
54 ms |
10596 KB |
Output is correct |
56 |
Correct |
49 ms |
10624 KB |
Output is correct |
57 |
Correct |
54 ms |
10620 KB |
Output is correct |
58 |
Correct |
77 ms |
24528 KB |
Output is correct |
59 |
Correct |
76 ms |
24612 KB |
Output is correct |
60 |
Correct |
86 ms |
24616 KB |
Output is correct |
61 |
Correct |
90 ms |
24752 KB |
Output is correct |
62 |
Correct |
97 ms |
24604 KB |
Output is correct |
63 |
Correct |
87 ms |
24604 KB |
Output is correct |
64 |
Correct |
134 ms |
23524 KB |
Output is correct |
65 |
Correct |
99 ms |
23428 KB |
Output is correct |
66 |
Correct |
119 ms |
23484 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
212 KB |
Output is correct |
2 |
Correct |
1 ms |
212 KB |
Output is correct |
3 |
Correct |
1 ms |
212 KB |
Output is correct |
4 |
Correct |
1 ms |
212 KB |
Output is correct |
5 |
Correct |
1 ms |
212 KB |
Output is correct |
6 |
Correct |
1 ms |
212 KB |
Output is correct |
7 |
Correct |
1 ms |
340 KB |
Output is correct |
8 |
Correct |
1 ms |
340 KB |
Output is correct |
9 |
Correct |
1 ms |
340 KB |
Output is correct |
10 |
Correct |
1 ms |
304 KB |
Output is correct |
11 |
Correct |
1 ms |
340 KB |
Output is correct |
12 |
Correct |
1 ms |
340 KB |
Output is correct |
13 |
Correct |
3 ms |
5032 KB |
Output is correct |
14 |
Correct |
3 ms |
5076 KB |
Output is correct |
15 |
Correct |
3 ms |
5076 KB |
Output is correct |
16 |
Correct |
3 ms |
5076 KB |
Output is correct |
17 |
Correct |
3 ms |
5076 KB |
Output is correct |
18 |
Correct |
3 ms |
5076 KB |
Output is correct |
19 |
Correct |
3 ms |
5076 KB |
Output is correct |
20 |
Correct |
3 ms |
5076 KB |
Output is correct |
21 |
Correct |
3 ms |
5076 KB |
Output is correct |
22 |
Correct |
1 ms |
304 KB |
Output is correct |
23 |
Correct |
1 ms |
212 KB |
Output is correct |
24 |
Correct |
1 ms |
304 KB |
Output is correct |
25 |
Correct |
1 ms |
212 KB |
Output is correct |
26 |
Correct |
1 ms |
304 KB |
Output is correct |
27 |
Correct |
1 ms |
304 KB |
Output is correct |
28 |
Correct |
3 ms |
680 KB |
Output is correct |
29 |
Correct |
2 ms |
468 KB |
Output is correct |
30 |
Correct |
2 ms |
432 KB |
Output is correct |
31 |
Correct |
1 ms |
468 KB |
Output is correct |
32 |
Correct |
2 ms |
468 KB |
Output is correct |
33 |
Correct |
3 ms |
4284 KB |
Output is correct |
34 |
Correct |
3 ms |
3284 KB |
Output is correct |
35 |
Correct |
3 ms |
2988 KB |
Output is correct |
36 |
Correct |
3 ms |
4948 KB |
Output is correct |
37 |
Correct |
3 ms |
4020 KB |
Output is correct |
38 |
Correct |
3 ms |
4436 KB |
Output is correct |
39 |
Correct |
1 ms |
340 KB |
Output is correct |
40 |
Correct |
3 ms |
3796 KB |
Output is correct |
41 |
Correct |
1 ms |
304 KB |
Output is correct |
42 |
Correct |
4 ms |
4680 KB |
Output is correct |
43 |
Correct |
3 ms |
4656 KB |
Output is correct |
44 |
Correct |
1 ms |
340 KB |
Output is correct |
45 |
Correct |
3 ms |
944 KB |
Output is correct |
46 |
Correct |
3 ms |
816 KB |
Output is correct |
47 |
Correct |
3 ms |
724 KB |
Output is correct |
48 |
Correct |
3 ms |
596 KB |
Output is correct |
49 |
Correct |
3 ms |
596 KB |
Output is correct |
50 |
Correct |
3 ms |
5076 KB |
Output is correct |
51 |
Correct |
3 ms |
5044 KB |
Output is correct |
52 |
Correct |
3 ms |
5076 KB |
Output is correct |
53 |
Correct |
3 ms |
5076 KB |
Output is correct |
54 |
Correct |
3 ms |
5048 KB |
Output is correct |
55 |
Correct |
3 ms |
5076 KB |
Output is correct |
56 |
Correct |
3 ms |
5076 KB |
Output is correct |
57 |
Correct |
1 ms |
360 KB |
Output is correct |
58 |
Correct |
3 ms |
5040 KB |
Output is correct |
59 |
Correct |
1 ms |
372 KB |
Output is correct |
60 |
Correct |
3 ms |
4992 KB |
Output is correct |
61 |
Correct |
1 ms |
340 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
304 KB |
Output is correct |
2 |
Correct |
1 ms |
212 KB |
Output is correct |
3 |
Correct |
1 ms |
212 KB |
Output is correct |
4 |
Correct |
1 ms |
212 KB |
Output is correct |
5 |
Correct |
1 ms |
212 KB |
Output is correct |
6 |
Correct |
1 ms |
212 KB |
Output is correct |
7 |
Correct |
1 ms |
212 KB |
Output is correct |
8 |
Correct |
1 ms |
212 KB |
Output is correct |
9 |
Correct |
1 ms |
340 KB |
Output is correct |
10 |
Correct |
1 ms |
340 KB |
Output is correct |
11 |
Correct |
1 ms |
340 KB |
Output is correct |
12 |
Correct |
1 ms |
304 KB |
Output is correct |
13 |
Correct |
1 ms |
340 KB |
Output is correct |
14 |
Correct |
1 ms |
340 KB |
Output is correct |
15 |
Correct |
3 ms |
5032 KB |
Output is correct |
16 |
Correct |
3 ms |
5076 KB |
Output is correct |
17 |
Correct |
3 ms |
5076 KB |
Output is correct |
18 |
Correct |
3 ms |
5076 KB |
Output is correct |
19 |
Correct |
3 ms |
5076 KB |
Output is correct |
20 |
Correct |
3 ms |
5076 KB |
Output is correct |
21 |
Correct |
3 ms |
5076 KB |
Output is correct |
22 |
Correct |
3 ms |
5076 KB |
Output is correct |
23 |
Correct |
3 ms |
5076 KB |
Output is correct |
24 |
Correct |
21 ms |
6500 KB |
Output is correct |
25 |
Correct |
15 ms |
6308 KB |
Output is correct |
26 |
Correct |
12 ms |
6356 KB |
Output is correct |
27 |
Correct |
1 ms |
304 KB |
Output is correct |
28 |
Correct |
1 ms |
212 KB |
Output is correct |
29 |
Correct |
1 ms |
304 KB |
Output is correct |
30 |
Correct |
1 ms |
304 KB |
Output is correct |
31 |
Correct |
3 ms |
680 KB |
Output is correct |
32 |
Correct |
2 ms |
468 KB |
Output is correct |
33 |
Correct |
2 ms |
432 KB |
Output is correct |
34 |
Correct |
1 ms |
468 KB |
Output is correct |
35 |
Correct |
2 ms |
468 KB |
Output is correct |
36 |
Correct |
3 ms |
4284 KB |
Output is correct |
37 |
Correct |
3 ms |
3284 KB |
Output is correct |
38 |
Correct |
3 ms |
2988 KB |
Output is correct |
39 |
Correct |
3 ms |
4948 KB |
Output is correct |
40 |
Correct |
3 ms |
4020 KB |
Output is correct |
41 |
Correct |
3 ms |
4436 KB |
Output is correct |
42 |
Correct |
1 ms |
340 KB |
Output is correct |
43 |
Correct |
3 ms |
3796 KB |
Output is correct |
44 |
Correct |
1 ms |
304 KB |
Output is correct |
45 |
Correct |
4 ms |
4680 KB |
Output is correct |
46 |
Correct |
3 ms |
4656 KB |
Output is correct |
47 |
Correct |
1 ms |
340 KB |
Output is correct |
48 |
Correct |
3 ms |
944 KB |
Output is correct |
49 |
Correct |
3 ms |
816 KB |
Output is correct |
50 |
Correct |
3 ms |
724 KB |
Output is correct |
51 |
Correct |
3 ms |
596 KB |
Output is correct |
52 |
Correct |
3 ms |
596 KB |
Output is correct |
53 |
Correct |
3 ms |
5076 KB |
Output is correct |
54 |
Correct |
3 ms |
5044 KB |
Output is correct |
55 |
Correct |
3 ms |
5076 KB |
Output is correct |
56 |
Correct |
3 ms |
5076 KB |
Output is correct |
57 |
Correct |
3 ms |
5048 KB |
Output is correct |
58 |
Correct |
3 ms |
5076 KB |
Output is correct |
59 |
Correct |
3 ms |
5076 KB |
Output is correct |
60 |
Correct |
1 ms |
360 KB |
Output is correct |
61 |
Correct |
3 ms |
5040 KB |
Output is correct |
62 |
Correct |
1 ms |
372 KB |
Output is correct |
63 |
Correct |
3 ms |
4992 KB |
Output is correct |
64 |
Correct |
1 ms |
340 KB |
Output is correct |
65 |
Correct |
10 ms |
2516 KB |
Output is correct |
66 |
Correct |
4 ms |
1228 KB |
Output is correct |
67 |
Correct |
18 ms |
3124 KB |
Output is correct |
68 |
Correct |
10 ms |
1888 KB |
Output is correct |
69 |
Correct |
20 ms |
2772 KB |
Output is correct |
70 |
Correct |
7 ms |
4920 KB |
Output is correct |
71 |
Correct |
9 ms |
4252 KB |
Output is correct |
72 |
Correct |
7 ms |
3812 KB |
Output is correct |
73 |
Correct |
6 ms |
3924 KB |
Output is correct |
74 |
Correct |
9 ms |
4668 KB |
Output is correct |
75 |
Correct |
8 ms |
5460 KB |
Output is correct |
76 |
Correct |
20 ms |
5068 KB |
Output is correct |
77 |
Correct |
14 ms |
5996 KB |
Output is correct |
78 |
Correct |
16 ms |
6772 KB |
Output is correct |
79 |
Correct |
20 ms |
4948 KB |
Output is correct |
80 |
Correct |
24 ms |
5040 KB |
Output is correct |
81 |
Correct |
29 ms |
4948 KB |
Output is correct |
82 |
Correct |
39 ms |
4940 KB |
Output is correct |
83 |
Correct |
30 ms |
4944 KB |
Output is correct |
84 |
Correct |
8 ms |
5844 KB |
Output is correct |
85 |
Correct |
9 ms |
5856 KB |
Output is correct |
86 |
Correct |
8 ms |
5816 KB |
Output is correct |
87 |
Correct |
8 ms |
5844 KB |
Output is correct |
88 |
Correct |
11 ms |
5844 KB |
Output is correct |
89 |
Correct |
8 ms |
5820 KB |
Output is correct |
90 |
Correct |
20 ms |
7176 KB |
Output is correct |
91 |
Correct |
18 ms |
7152 KB |
Output is correct |
92 |
Correct |
19 ms |
7152 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
304 KB |
Output is correct |
2 |
Correct |
1 ms |
212 KB |
Output is correct |
3 |
Correct |
1 ms |
212 KB |
Output is correct |
4 |
Correct |
1 ms |
212 KB |
Output is correct |
5 |
Correct |
1 ms |
212 KB |
Output is correct |
6 |
Correct |
1 ms |
212 KB |
Output is correct |
7 |
Correct |
1 ms |
212 KB |
Output is correct |
8 |
Correct |
1 ms |
212 KB |
Output is correct |
9 |
Correct |
1 ms |
340 KB |
Output is correct |
10 |
Correct |
1 ms |
340 KB |
Output is correct |
11 |
Correct |
1 ms |
340 KB |
Output is correct |
12 |
Correct |
1 ms |
304 KB |
Output is correct |
13 |
Correct |
1 ms |
340 KB |
Output is correct |
14 |
Correct |
1 ms |
340 KB |
Output is correct |
15 |
Correct |
3 ms |
5032 KB |
Output is correct |
16 |
Correct |
3 ms |
5076 KB |
Output is correct |
17 |
Correct |
3 ms |
5076 KB |
Output is correct |
18 |
Correct |
3 ms |
5076 KB |
Output is correct |
19 |
Correct |
3 ms |
5076 KB |
Output is correct |
20 |
Correct |
3 ms |
5076 KB |
Output is correct |
21 |
Correct |
3 ms |
5076 KB |
Output is correct |
22 |
Correct |
3 ms |
5076 KB |
Output is correct |
23 |
Correct |
3 ms |
5076 KB |
Output is correct |
24 |
Correct |
21 ms |
6500 KB |
Output is correct |
25 |
Correct |
15 ms |
6308 KB |
Output is correct |
26 |
Correct |
12 ms |
6356 KB |
Output is correct |
27 |
Correct |
10 ms |
2304 KB |
Output is correct |
28 |
Correct |
10 ms |
2256 KB |
Output is correct |
29 |
Correct |
9 ms |
2360 KB |
Output is correct |
30 |
Correct |
9 ms |
2368 KB |
Output is correct |
31 |
Correct |
10 ms |
2364 KB |
Output is correct |
32 |
Correct |
9 ms |
2260 KB |
Output is correct |
33 |
Correct |
16 ms |
7672 KB |
Output is correct |
34 |
Correct |
17 ms |
7564 KB |
Output is correct |
35 |
Correct |
19 ms |
7636 KB |
Output is correct |
36 |
Correct |
16 ms |
7612 KB |
Output is correct |
37 |
Correct |
16 ms |
7636 KB |
Output is correct |
38 |
Correct |
16 ms |
7628 KB |
Output is correct |
39 |
Correct |
24 ms |
8676 KB |
Output is correct |
40 |
Correct |
23 ms |
8760 KB |
Output is correct |
41 |
Correct |
23 ms |
8664 KB |
Output is correct |
42 |
Correct |
1 ms |
304 KB |
Output is correct |
43 |
Correct |
1 ms |
212 KB |
Output is correct |
44 |
Correct |
1 ms |
304 KB |
Output is correct |
45 |
Correct |
1 ms |
304 KB |
Output is correct |
46 |
Correct |
3 ms |
680 KB |
Output is correct |
47 |
Correct |
2 ms |
468 KB |
Output is correct |
48 |
Correct |
2 ms |
432 KB |
Output is correct |
49 |
Correct |
1 ms |
468 KB |
Output is correct |
50 |
Correct |
2 ms |
468 KB |
Output is correct |
51 |
Correct |
3 ms |
4284 KB |
Output is correct |
52 |
Correct |
3 ms |
3284 KB |
Output is correct |
53 |
Correct |
3 ms |
2988 KB |
Output is correct |
54 |
Correct |
3 ms |
4948 KB |
Output is correct |
55 |
Correct |
3 ms |
4020 KB |
Output is correct |
56 |
Correct |
3 ms |
4436 KB |
Output is correct |
57 |
Correct |
1 ms |
340 KB |
Output is correct |
58 |
Correct |
3 ms |
3796 KB |
Output is correct |
59 |
Correct |
1 ms |
304 KB |
Output is correct |
60 |
Correct |
4 ms |
4680 KB |
Output is correct |
61 |
Correct |
3 ms |
4656 KB |
Output is correct |
62 |
Correct |
1 ms |
340 KB |
Output is correct |
63 |
Correct |
3 ms |
944 KB |
Output is correct |
64 |
Correct |
3 ms |
816 KB |
Output is correct |
65 |
Correct |
3 ms |
724 KB |
Output is correct |
66 |
Correct |
3 ms |
596 KB |
Output is correct |
67 |
Correct |
3 ms |
596 KB |
Output is correct |
68 |
Correct |
3 ms |
5076 KB |
Output is correct |
69 |
Correct |
3 ms |
5044 KB |
Output is correct |
70 |
Correct |
3 ms |
5076 KB |
Output is correct |
71 |
Correct |
3 ms |
5076 KB |
Output is correct |
72 |
Correct |
3 ms |
5048 KB |
Output is correct |
73 |
Correct |
3 ms |
5076 KB |
Output is correct |
74 |
Correct |
3 ms |
5076 KB |
Output is correct |
75 |
Correct |
1 ms |
360 KB |
Output is correct |
76 |
Correct |
3 ms |
5040 KB |
Output is correct |
77 |
Correct |
1 ms |
372 KB |
Output is correct |
78 |
Correct |
3 ms |
4992 KB |
Output is correct |
79 |
Correct |
1 ms |
340 KB |
Output is correct |
80 |
Correct |
10 ms |
2516 KB |
Output is correct |
81 |
Correct |
4 ms |
1228 KB |
Output is correct |
82 |
Correct |
18 ms |
3124 KB |
Output is correct |
83 |
Correct |
10 ms |
1888 KB |
Output is correct |
84 |
Correct |
20 ms |
2772 KB |
Output is correct |
85 |
Correct |
7 ms |
4920 KB |
Output is correct |
86 |
Correct |
9 ms |
4252 KB |
Output is correct |
87 |
Correct |
7 ms |
3812 KB |
Output is correct |
88 |
Correct |
6 ms |
3924 KB |
Output is correct |
89 |
Correct |
9 ms |
4668 KB |
Output is correct |
90 |
Correct |
8 ms |
5460 KB |
Output is correct |
91 |
Correct |
20 ms |
5068 KB |
Output is correct |
92 |
Correct |
14 ms |
5996 KB |
Output is correct |
93 |
Correct |
16 ms |
6772 KB |
Output is correct |
94 |
Correct |
20 ms |
4948 KB |
Output is correct |
95 |
Correct |
24 ms |
5040 KB |
Output is correct |
96 |
Correct |
29 ms |
4948 KB |
Output is correct |
97 |
Correct |
39 ms |
4940 KB |
Output is correct |
98 |
Correct |
30 ms |
4944 KB |
Output is correct |
99 |
Correct |
8 ms |
5844 KB |
Output is correct |
100 |
Correct |
9 ms |
5856 KB |
Output is correct |
101 |
Correct |
8 ms |
5816 KB |
Output is correct |
102 |
Correct |
8 ms |
5844 KB |
Output is correct |
103 |
Correct |
11 ms |
5844 KB |
Output is correct |
104 |
Correct |
8 ms |
5820 KB |
Output is correct |
105 |
Correct |
20 ms |
7176 KB |
Output is correct |
106 |
Correct |
18 ms |
7152 KB |
Output is correct |
107 |
Correct |
19 ms |
7152 KB |
Output is correct |
108 |
Correct |
13 ms |
3264 KB |
Output is correct |
109 |
Execution timed out |
1588 ms |
353004 KB |
Time limit exceeded |
110 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
304 KB |
Output is correct |
2 |
Correct |
1 ms |
212 KB |
Output is correct |
3 |
Correct |
1 ms |
212 KB |
Output is correct |
4 |
Correct |
1 ms |
212 KB |
Output is correct |
5 |
Correct |
1 ms |
212 KB |
Output is correct |
6 |
Correct |
1 ms |
212 KB |
Output is correct |
7 |
Correct |
1 ms |
212 KB |
Output is correct |
8 |
Correct |
1 ms |
212 KB |
Output is correct |
9 |
Correct |
1 ms |
340 KB |
Output is correct |
10 |
Correct |
1 ms |
340 KB |
Output is correct |
11 |
Correct |
1 ms |
340 KB |
Output is correct |
12 |
Correct |
1 ms |
304 KB |
Output is correct |
13 |
Correct |
1 ms |
340 KB |
Output is correct |
14 |
Correct |
1 ms |
340 KB |
Output is correct |
15 |
Correct |
3 ms |
5032 KB |
Output is correct |
16 |
Correct |
3 ms |
5076 KB |
Output is correct |
17 |
Correct |
3 ms |
5076 KB |
Output is correct |
18 |
Correct |
3 ms |
5076 KB |
Output is correct |
19 |
Correct |
3 ms |
5076 KB |
Output is correct |
20 |
Correct |
3 ms |
5076 KB |
Output is correct |
21 |
Correct |
3 ms |
5076 KB |
Output is correct |
22 |
Correct |
3 ms |
5076 KB |
Output is correct |
23 |
Correct |
3 ms |
5076 KB |
Output is correct |
24 |
Correct |
21 ms |
6500 KB |
Output is correct |
25 |
Correct |
15 ms |
6308 KB |
Output is correct |
26 |
Correct |
12 ms |
6356 KB |
Output is correct |
27 |
Correct |
10 ms |
2304 KB |
Output is correct |
28 |
Correct |
10 ms |
2256 KB |
Output is correct |
29 |
Correct |
9 ms |
2360 KB |
Output is correct |
30 |
Correct |
9 ms |
2368 KB |
Output is correct |
31 |
Correct |
10 ms |
2364 KB |
Output is correct |
32 |
Correct |
9 ms |
2260 KB |
Output is correct |
33 |
Correct |
16 ms |
7672 KB |
Output is correct |
34 |
Correct |
17 ms |
7564 KB |
Output is correct |
35 |
Correct |
19 ms |
7636 KB |
Output is correct |
36 |
Correct |
16 ms |
7612 KB |
Output is correct |
37 |
Correct |
16 ms |
7636 KB |
Output is correct |
38 |
Correct |
16 ms |
7628 KB |
Output is correct |
39 |
Correct |
24 ms |
8676 KB |
Output is correct |
40 |
Correct |
23 ms |
8760 KB |
Output is correct |
41 |
Correct |
23 ms |
8664 KB |
Output is correct |
42 |
Correct |
55 ms |
9676 KB |
Output is correct |
43 |
Correct |
30 ms |
6112 KB |
Output is correct |
44 |
Correct |
51 ms |
10432 KB |
Output is correct |
45 |
Correct |
33 ms |
6984 KB |
Output is correct |
46 |
Correct |
35 ms |
6348 KB |
Output is correct |
47 |
Correct |
64 ms |
10672 KB |
Output is correct |
48 |
Correct |
85 ms |
22800 KB |
Output is correct |
49 |
Correct |
44 ms |
14836 KB |
Output is correct |
50 |
Correct |
62 ms |
18084 KB |
Output is correct |
51 |
Correct |
71 ms |
17696 KB |
Output is correct |
52 |
Correct |
88 ms |
18012 KB |
Output is correct |
53 |
Correct |
61 ms |
15196 KB |
Output is correct |
54 |
Correct |
54 ms |
10684 KB |
Output is correct |
55 |
Correct |
54 ms |
10644 KB |
Output is correct |
56 |
Correct |
49 ms |
10572 KB |
Output is correct |
57 |
Correct |
54 ms |
10596 KB |
Output is correct |
58 |
Correct |
49 ms |
10624 KB |
Output is correct |
59 |
Correct |
54 ms |
10620 KB |
Output is correct |
60 |
Correct |
77 ms |
24528 KB |
Output is correct |
61 |
Correct |
76 ms |
24612 KB |
Output is correct |
62 |
Correct |
86 ms |
24616 KB |
Output is correct |
63 |
Correct |
90 ms |
24752 KB |
Output is correct |
64 |
Correct |
97 ms |
24604 KB |
Output is correct |
65 |
Correct |
87 ms |
24604 KB |
Output is correct |
66 |
Correct |
134 ms |
23524 KB |
Output is correct |
67 |
Correct |
99 ms |
23428 KB |
Output is correct |
68 |
Correct |
119 ms |
23484 KB |
Output is correct |
69 |
Correct |
1 ms |
304 KB |
Output is correct |
70 |
Correct |
1 ms |
212 KB |
Output is correct |
71 |
Correct |
1 ms |
304 KB |
Output is correct |
72 |
Correct |
1 ms |
304 KB |
Output is correct |
73 |
Correct |
3 ms |
680 KB |
Output is correct |
74 |
Correct |
2 ms |
468 KB |
Output is correct |
75 |
Correct |
2 ms |
432 KB |
Output is correct |
76 |
Correct |
1 ms |
468 KB |
Output is correct |
77 |
Correct |
2 ms |
468 KB |
Output is correct |
78 |
Correct |
3 ms |
4284 KB |
Output is correct |
79 |
Correct |
3 ms |
3284 KB |
Output is correct |
80 |
Correct |
3 ms |
2988 KB |
Output is correct |
81 |
Correct |
3 ms |
4948 KB |
Output is correct |
82 |
Correct |
3 ms |
4020 KB |
Output is correct |
83 |
Correct |
3 ms |
4436 KB |
Output is correct |
84 |
Correct |
1 ms |
340 KB |
Output is correct |
85 |
Correct |
3 ms |
3796 KB |
Output is correct |
86 |
Correct |
1 ms |
304 KB |
Output is correct |
87 |
Correct |
4 ms |
4680 KB |
Output is correct |
88 |
Correct |
3 ms |
4656 KB |
Output is correct |
89 |
Correct |
1 ms |
340 KB |
Output is correct |
90 |
Correct |
3 ms |
944 KB |
Output is correct |
91 |
Correct |
3 ms |
816 KB |
Output is correct |
92 |
Correct |
3 ms |
724 KB |
Output is correct |
93 |
Correct |
3 ms |
596 KB |
Output is correct |
94 |
Correct |
3 ms |
596 KB |
Output is correct |
95 |
Correct |
3 ms |
5076 KB |
Output is correct |
96 |
Correct |
3 ms |
5044 KB |
Output is correct |
97 |
Correct |
3 ms |
5076 KB |
Output is correct |
98 |
Correct |
3 ms |
5076 KB |
Output is correct |
99 |
Correct |
3 ms |
5048 KB |
Output is correct |
100 |
Correct |
3 ms |
5076 KB |
Output is correct |
101 |
Correct |
3 ms |
5076 KB |
Output is correct |
102 |
Correct |
1 ms |
360 KB |
Output is correct |
103 |
Correct |
3 ms |
5040 KB |
Output is correct |
104 |
Correct |
1 ms |
372 KB |
Output is correct |
105 |
Correct |
3 ms |
4992 KB |
Output is correct |
106 |
Correct |
1 ms |
340 KB |
Output is correct |
107 |
Correct |
10 ms |
2516 KB |
Output is correct |
108 |
Correct |
4 ms |
1228 KB |
Output is correct |
109 |
Correct |
18 ms |
3124 KB |
Output is correct |
110 |
Correct |
10 ms |
1888 KB |
Output is correct |
111 |
Correct |
20 ms |
2772 KB |
Output is correct |
112 |
Correct |
7 ms |
4920 KB |
Output is correct |
113 |
Correct |
9 ms |
4252 KB |
Output is correct |
114 |
Correct |
7 ms |
3812 KB |
Output is correct |
115 |
Correct |
6 ms |
3924 KB |
Output is correct |
116 |
Correct |
9 ms |
4668 KB |
Output is correct |
117 |
Correct |
8 ms |
5460 KB |
Output is correct |
118 |
Correct |
20 ms |
5068 KB |
Output is correct |
119 |
Correct |
14 ms |
5996 KB |
Output is correct |
120 |
Correct |
16 ms |
6772 KB |
Output is correct |
121 |
Correct |
20 ms |
4948 KB |
Output is correct |
122 |
Correct |
24 ms |
5040 KB |
Output is correct |
123 |
Correct |
29 ms |
4948 KB |
Output is correct |
124 |
Correct |
39 ms |
4940 KB |
Output is correct |
125 |
Correct |
30 ms |
4944 KB |
Output is correct |
126 |
Correct |
8 ms |
5844 KB |
Output is correct |
127 |
Correct |
9 ms |
5856 KB |
Output is correct |
128 |
Correct |
8 ms |
5816 KB |
Output is correct |
129 |
Correct |
8 ms |
5844 KB |
Output is correct |
130 |
Correct |
11 ms |
5844 KB |
Output is correct |
131 |
Correct |
8 ms |
5820 KB |
Output is correct |
132 |
Correct |
20 ms |
7176 KB |
Output is correct |
133 |
Correct |
18 ms |
7152 KB |
Output is correct |
134 |
Correct |
19 ms |
7152 KB |
Output is correct |
135 |
Correct |
13 ms |
3264 KB |
Output is correct |
136 |
Execution timed out |
1588 ms |
353004 KB |
Time limit exceeded |
137 |
Halted |
0 ms |
0 KB |
- |