#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
//#include<bits/extc++.h>
//__gnu_pbds
vector<pair<int,int> > a;
vector<int> b;
const int N = 15005;
vector<bitset<N> > req;
vector<int> pa(N);
vector<bitset<N>> dp[N];
int n;
int m;
void printb(bitset<N> &k){
cout<<"printing: ";
for(int i=0;i<=pa[n];i++){
cout<<k[i];
}
cout<<"\n";
}
void cons(pair<int,int> cur,int val,vector<int> &result){
int i = cur.first;
int j = cur.second;
//cout<<i<<" "<<j<<" "<<val<<endl;
if(dp[i][j-1][val-b[i]]){
result.push_back(i);
if(j-1) cons({i,j-1},val-b[i],result);
}else {
cons({i-1,j},val,result);
}
}
int main(){
ios_base::sync_with_stdio(0),cin.tie(0),cout.tie(0);
cin>>n;
a.resize(n+1);
for(int i=1;i<=n;i++){ cin>>a[i].first;a[i].second=i;}
cin>>m;
b.resize(m+1);
for(int i=1;i<=m;i++) cin>>b[i];
sort(b.begin()+1,b.end(),greater<int>());
sort(a.begin()+1,a.end());
for(int i=1;i<=n;i++) pa[i] = pa[i-1]+a[i].first;
int head =1;
int cur=0;
bitset<N> reqnow;
req.push_back(reqnow);
for(int i=1;i<=N;i++){
while(head<=n && a[head].first<=i){
head++;
}
while(cur<N && cur<=pa[head-1]+(i*(n-head+1))){
reqnow[cur]=1;
cur++;
}
req.push_back(reqnow);
}
for(int i=1;i<=m;i++){
int J = min(pa[n],(pa[n]/b[i])+2);
bitset<N> s;
dp[i].push_back(s);
dp[i][0][0]=1;
for(int j=1;j<=J;j++){
s.reset();
s|=((dp[i][j-1])<<b[i]);
if(dp[i-1].size()>j) s|=dp[i-1][j];
s&=req[j];
dp[i].push_back(s);
}
}
pair<int,int> works;
for(int j=1;j<=pa[n];j++){
if(works.first) break;
for(int i=m;i>=1;i--){
if(works.first) break;
if(j>=dp[i].size()) break;
if(dp[i][j][pa[n]]){
works = {i,j};
break;
}
}
}
if(!works.first){
cout<<-1<<"\n";
return 0;
}
cout<<works.second<<"\n";
vector<int> result;
cons(works,pa[n],result);
for(int i=0;i<result.size();i++){
result[i] = b[result[i]];
}
sort(result.begin(),result.end(),greater<int>());
priority_queue<pair<int,int> > pq;
for(int i=1;i<=n;i++) pq.push(a[i]);
for(auto g : result){
vector<int> ans;
vector<pair<int,int> > goback;
for(int a=0;a<g;a++){
pair<int,int> temp = pq.top();
pq.pop();
ans.push_back(temp.second);
temp.first--;
if(temp.first) goback.push_back(temp);
}
cout<<g<<" ";
for(int i=0;i<ans.size();i++) cout<<ans[i]<<" ";
cout<<"\n";
for(auto temp : goback) pq.push(temp);
}
return 0;
}
Compilation message
cookies.cpp: In function 'int main()':
cookies.cpp:70:21: warning: comparison of integer expressions of different signedness: 'std::vector<std::bitset<15005> >::size_type' {aka 'long unsigned int'} and 'int' [-Wsign-compare]
70 | if(dp[i-1].size()>j) s|=dp[i-1][j];
| ~~~~~~~~~~~~~~^~
cookies.cpp:80:8: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<std::bitset<15005> >::size_type' {aka 'long unsigned int'} [-Wsign-compare]
80 | if(j>=dp[i].size()) break;
| ~^~~~~~~~~~~~~~
cookies.cpp:94:15: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
94 | for(int i=0;i<result.size();i++){
| ~^~~~~~~~~~~~~~
cookies.cpp:112:16: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
112 | for(int i=0;i<ans.size();i++) cout<<ans[i]<<" ";
| ~^~~~~~~~~~~
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
12 ms |
31244 KB |
Output is correct |
2 |
Correct |
12 ms |
31756 KB |
Output is correct |
3 |
Correct |
12 ms |
31496 KB |
Output is correct |
4 |
Correct |
13 ms |
31916 KB |
Output is correct |
5 |
Correct |
11 ms |
32524 KB |
Output is correct |
6 |
Correct |
14 ms |
31496 KB |
Output is correct |
7 |
Correct |
12 ms |
31500 KB |
Output is correct |
8 |
Correct |
13 ms |
31244 KB |
Output is correct |
9 |
Correct |
12 ms |
33036 KB |
Output is correct |
10 |
Correct |
19 ms |
39724 KB |
Output is correct |
11 |
Correct |
13 ms |
31500 KB |
Output is correct |
12 |
Correct |
15 ms |
33428 KB |
Output is correct |
13 |
Correct |
13 ms |
32064 KB |
Output is correct |
14 |
Correct |
14 ms |
32776 KB |
Output is correct |
15 |
Correct |
14 ms |
32268 KB |
Output is correct |
16 |
Correct |
14 ms |
32264 KB |
Output is correct |
17 |
Correct |
14 ms |
32520 KB |
Output is correct |
18 |
Correct |
12 ms |
32780 KB |
Output is correct |
19 |
Correct |
12 ms |
32012 KB |
Output is correct |
20 |
Correct |
11 ms |
32524 KB |
Output is correct |
21 |
Correct |
13 ms |
32268 KB |
Output is correct |
22 |
Correct |
20 ms |
34624 KB |
Output is correct |
23 |
Correct |
15 ms |
33608 KB |
Output is correct |
24 |
Correct |
15 ms |
32520 KB |
Output is correct |
25 |
Correct |
13 ms |
32580 KB |
Output is correct |
26 |
Correct |
13 ms |
33036 KB |
Output is correct |
27 |
Correct |
11 ms |
30984 KB |
Output is correct |
28 |
Correct |
13 ms |
31756 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
11 ms |
31244 KB |
Output is correct |
2 |
Correct |
11 ms |
33036 KB |
Output is correct |
3 |
Correct |
12 ms |
31500 KB |
Output is correct |
4 |
Correct |
11 ms |
31328 KB |
Output is correct |
5 |
Correct |
13 ms |
31496 KB |
Output is correct |
6 |
Correct |
11 ms |
31244 KB |
Output is correct |
7 |
Correct |
12 ms |
31244 KB |
Output is correct |
8 |
Correct |
13 ms |
32268 KB |
Output is correct |
9 |
Correct |
17 ms |
43336 KB |
Output is correct |
10 |
Correct |
42 ms |
77124 KB |
Output is correct |
11 |
Correct |
11 ms |
31244 KB |
Output is correct |
12 |
Correct |
12 ms |
32524 KB |
Output is correct |
13 |
Correct |
11 ms |
32780 KB |
Output is correct |
14 |
Correct |
12 ms |
31756 KB |
Output is correct |
15 |
Correct |
11 ms |
32268 KB |
Output is correct |
16 |
Correct |
12 ms |
31244 KB |
Output is correct |
17 |
Correct |
14 ms |
32012 KB |
Output is correct |
18 |
Correct |
21 ms |
43844 KB |
Output is correct |
19 |
Correct |
26 ms |
56152 KB |
Output is correct |
20 |
Correct |
14 ms |
32288 KB |
Output is correct |
21 |
Correct |
14 ms |
32012 KB |
Output is correct |
22 |
Correct |
13 ms |
32780 KB |
Output is correct |
23 |
Correct |
11 ms |
31500 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
13 ms |
32012 KB |
Output is correct |
2 |
Correct |
11 ms |
31756 KB |
Output is correct |
3 |
Correct |
13 ms |
31244 KB |
Output is correct |
4 |
Correct |
11 ms |
33036 KB |
Output is correct |
5 |
Correct |
11 ms |
32348 KB |
Output is correct |
6 |
Correct |
11 ms |
33036 KB |
Output is correct |
7 |
Correct |
11 ms |
31244 KB |
Output is correct |
8 |
Correct |
12 ms |
32268 KB |
Output is correct |
9 |
Correct |
11 ms |
31244 KB |
Output is correct |
10 |
Correct |
11 ms |
31240 KB |
Output is correct |
11 |
Correct |
12 ms |
31752 KB |
Output is correct |
12 |
Correct |
12 ms |
32012 KB |
Output is correct |
13 |
Correct |
13 ms |
31756 KB |
Output is correct |
14 |
Correct |
12 ms |
32780 KB |
Output is correct |
15 |
Correct |
12 ms |
31500 KB |
Output is correct |
16 |
Correct |
11 ms |
31496 KB |
Output is correct |
17 |
Correct |
11 ms |
32524 KB |
Output is correct |
18 |
Correct |
11 ms |
32460 KB |
Output is correct |
19 |
Correct |
11 ms |
31244 KB |
Output is correct |
20 |
Correct |
12 ms |
31476 KB |
Output is correct |
21 |
Correct |
11 ms |
32780 KB |
Output is correct |
22 |
Correct |
12 ms |
33036 KB |
Output is correct |
23 |
Correct |
12 ms |
31500 KB |
Output is correct |
24 |
Correct |
14 ms |
32748 KB |
Output is correct |
25 |
Correct |
12 ms |
31500 KB |
Output is correct |
26 |
Correct |
11 ms |
32524 KB |
Output is correct |
27 |
Correct |
12 ms |
33032 KB |
Output is correct |
28 |
Correct |
11 ms |
32780 KB |
Output is correct |
29 |
Correct |
11 ms |
32708 KB |
Output is correct |
30 |
Correct |
11 ms |
31752 KB |
Output is correct |
31 |
Correct |
12 ms |
31512 KB |
Output is correct |
32 |
Correct |
12 ms |
32280 KB |
Output is correct |
33 |
Correct |
11 ms |
32024 KB |
Output is correct |
34 |
Correct |
11 ms |
32792 KB |
Output is correct |
35 |
Correct |
12 ms |
32376 KB |
Output is correct |
36 |
Correct |
11 ms |
31240 KB |
Output is correct |
37 |
Correct |
11 ms |
32412 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
12 ms |
31244 KB |
Output is correct |
2 |
Correct |
12 ms |
31756 KB |
Output is correct |
3 |
Correct |
12 ms |
31496 KB |
Output is correct |
4 |
Correct |
13 ms |
31916 KB |
Output is correct |
5 |
Correct |
11 ms |
32524 KB |
Output is correct |
6 |
Correct |
14 ms |
31496 KB |
Output is correct |
7 |
Correct |
12 ms |
31500 KB |
Output is correct |
8 |
Correct |
13 ms |
31244 KB |
Output is correct |
9 |
Correct |
12 ms |
33036 KB |
Output is correct |
10 |
Correct |
19 ms |
39724 KB |
Output is correct |
11 |
Correct |
13 ms |
31500 KB |
Output is correct |
12 |
Correct |
15 ms |
33428 KB |
Output is correct |
13 |
Correct |
13 ms |
32064 KB |
Output is correct |
14 |
Correct |
14 ms |
32776 KB |
Output is correct |
15 |
Correct |
14 ms |
32268 KB |
Output is correct |
16 |
Correct |
14 ms |
32264 KB |
Output is correct |
17 |
Correct |
14 ms |
32520 KB |
Output is correct |
18 |
Correct |
12 ms |
32780 KB |
Output is correct |
19 |
Correct |
12 ms |
32012 KB |
Output is correct |
20 |
Correct |
11 ms |
32524 KB |
Output is correct |
21 |
Correct |
13 ms |
32268 KB |
Output is correct |
22 |
Correct |
20 ms |
34624 KB |
Output is correct |
23 |
Correct |
15 ms |
33608 KB |
Output is correct |
24 |
Correct |
15 ms |
32520 KB |
Output is correct |
25 |
Correct |
13 ms |
32580 KB |
Output is correct |
26 |
Correct |
13 ms |
33036 KB |
Output is correct |
27 |
Correct |
11 ms |
30984 KB |
Output is correct |
28 |
Correct |
13 ms |
31756 KB |
Output is correct |
29 |
Correct |
13 ms |
32012 KB |
Output is correct |
30 |
Correct |
11 ms |
31756 KB |
Output is correct |
31 |
Correct |
13 ms |
31244 KB |
Output is correct |
32 |
Correct |
11 ms |
33036 KB |
Output is correct |
33 |
Correct |
11 ms |
32348 KB |
Output is correct |
34 |
Correct |
11 ms |
33036 KB |
Output is correct |
35 |
Correct |
11 ms |
31244 KB |
Output is correct |
36 |
Correct |
12 ms |
32268 KB |
Output is correct |
37 |
Correct |
11 ms |
31244 KB |
Output is correct |
38 |
Correct |
11 ms |
31240 KB |
Output is correct |
39 |
Correct |
12 ms |
31752 KB |
Output is correct |
40 |
Correct |
12 ms |
32012 KB |
Output is correct |
41 |
Correct |
13 ms |
31756 KB |
Output is correct |
42 |
Correct |
12 ms |
32780 KB |
Output is correct |
43 |
Correct |
12 ms |
31500 KB |
Output is correct |
44 |
Correct |
11 ms |
31496 KB |
Output is correct |
45 |
Correct |
11 ms |
32524 KB |
Output is correct |
46 |
Correct |
11 ms |
32460 KB |
Output is correct |
47 |
Correct |
11 ms |
31244 KB |
Output is correct |
48 |
Correct |
12 ms |
31476 KB |
Output is correct |
49 |
Correct |
11 ms |
32780 KB |
Output is correct |
50 |
Correct |
12 ms |
33036 KB |
Output is correct |
51 |
Correct |
12 ms |
31500 KB |
Output is correct |
52 |
Correct |
14 ms |
32748 KB |
Output is correct |
53 |
Correct |
12 ms |
31500 KB |
Output is correct |
54 |
Correct |
11 ms |
32524 KB |
Output is correct |
55 |
Correct |
12 ms |
33032 KB |
Output is correct |
56 |
Correct |
11 ms |
32780 KB |
Output is correct |
57 |
Correct |
11 ms |
32708 KB |
Output is correct |
58 |
Correct |
11 ms |
31752 KB |
Output is correct |
59 |
Correct |
12 ms |
31512 KB |
Output is correct |
60 |
Correct |
12 ms |
32280 KB |
Output is correct |
61 |
Correct |
11 ms |
32024 KB |
Output is correct |
62 |
Correct |
11 ms |
32792 KB |
Output is correct |
63 |
Correct |
12 ms |
32376 KB |
Output is correct |
64 |
Correct |
11 ms |
31240 KB |
Output is correct |
65 |
Correct |
11 ms |
32412 KB |
Output is correct |
66 |
Correct |
13 ms |
32776 KB |
Output is correct |
67 |
Correct |
13 ms |
32136 KB |
Output is correct |
68 |
Correct |
11 ms |
31252 KB |
Output is correct |
69 |
Correct |
14 ms |
31812 KB |
Output is correct |
70 |
Correct |
12 ms |
30988 KB |
Output is correct |
71 |
Correct |
13 ms |
33032 KB |
Output is correct |
72 |
Correct |
12 ms |
31448 KB |
Output is correct |
73 |
Correct |
12 ms |
32784 KB |
Output is correct |
74 |
Correct |
12 ms |
33032 KB |
Output is correct |
75 |
Correct |
13 ms |
32520 KB |
Output is correct |
76 |
Correct |
15 ms |
31244 KB |
Output is correct |
77 |
Correct |
13 ms |
32852 KB |
Output is correct |
78 |
Correct |
13 ms |
32012 KB |
Output is correct |
79 |
Correct |
13 ms |
32524 KB |
Output is correct |
80 |
Correct |
13 ms |
31756 KB |
Output is correct |
81 |
Correct |
12 ms |
32268 KB |
Output is correct |
82 |
Correct |
14 ms |
32580 KB |
Output is correct |
83 |
Correct |
12 ms |
33032 KB |
Output is correct |
84 |
Correct |
16 ms |
33952 KB |
Output is correct |
85 |
Correct |
13 ms |
32536 KB |
Output is correct |
86 |
Correct |
15 ms |
32580 KB |
Output is correct |
87 |
Correct |
15 ms |
32068 KB |
Output is correct |
88 |
Correct |
15 ms |
32584 KB |
Output is correct |
89 |
Correct |
15 ms |
32576 KB |
Output is correct |
90 |
Correct |
14 ms |
33608 KB |
Output is correct |
91 |
Correct |
14 ms |
33424 KB |
Output is correct |
92 |
Correct |
15 ms |
33352 KB |
Output is correct |
93 |
Correct |
16 ms |
35656 KB |
Output is correct |
94 |
Correct |
16 ms |
35944 KB |
Output is correct |
95 |
Correct |
15 ms |
32852 KB |
Output is correct |
96 |
Correct |
13 ms |
31824 KB |
Output is correct |
97 |
Correct |
15 ms |
31556 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
12 ms |
31244 KB |
Output is correct |
2 |
Correct |
12 ms |
31756 KB |
Output is correct |
3 |
Correct |
12 ms |
31496 KB |
Output is correct |
4 |
Correct |
13 ms |
31916 KB |
Output is correct |
5 |
Correct |
11 ms |
32524 KB |
Output is correct |
6 |
Correct |
14 ms |
31496 KB |
Output is correct |
7 |
Correct |
12 ms |
31500 KB |
Output is correct |
8 |
Correct |
13 ms |
31244 KB |
Output is correct |
9 |
Correct |
12 ms |
33036 KB |
Output is correct |
10 |
Correct |
19 ms |
39724 KB |
Output is correct |
11 |
Correct |
13 ms |
31500 KB |
Output is correct |
12 |
Correct |
15 ms |
33428 KB |
Output is correct |
13 |
Correct |
13 ms |
32064 KB |
Output is correct |
14 |
Correct |
14 ms |
32776 KB |
Output is correct |
15 |
Correct |
14 ms |
32268 KB |
Output is correct |
16 |
Correct |
14 ms |
32264 KB |
Output is correct |
17 |
Correct |
14 ms |
32520 KB |
Output is correct |
18 |
Correct |
12 ms |
32780 KB |
Output is correct |
19 |
Correct |
12 ms |
32012 KB |
Output is correct |
20 |
Correct |
11 ms |
32524 KB |
Output is correct |
21 |
Correct |
13 ms |
32268 KB |
Output is correct |
22 |
Correct |
20 ms |
34624 KB |
Output is correct |
23 |
Correct |
15 ms |
33608 KB |
Output is correct |
24 |
Correct |
15 ms |
32520 KB |
Output is correct |
25 |
Correct |
13 ms |
32580 KB |
Output is correct |
26 |
Correct |
13 ms |
33036 KB |
Output is correct |
27 |
Correct |
11 ms |
30984 KB |
Output is correct |
28 |
Correct |
13 ms |
31756 KB |
Output is correct |
29 |
Correct |
13 ms |
32012 KB |
Output is correct |
30 |
Correct |
11 ms |
31756 KB |
Output is correct |
31 |
Correct |
13 ms |
31244 KB |
Output is correct |
32 |
Correct |
11 ms |
33036 KB |
Output is correct |
33 |
Correct |
11 ms |
32348 KB |
Output is correct |
34 |
Correct |
11 ms |
33036 KB |
Output is correct |
35 |
Correct |
11 ms |
31244 KB |
Output is correct |
36 |
Correct |
12 ms |
32268 KB |
Output is correct |
37 |
Correct |
11 ms |
31244 KB |
Output is correct |
38 |
Correct |
11 ms |
31240 KB |
Output is correct |
39 |
Correct |
12 ms |
31752 KB |
Output is correct |
40 |
Correct |
12 ms |
32012 KB |
Output is correct |
41 |
Correct |
13 ms |
31756 KB |
Output is correct |
42 |
Correct |
12 ms |
32780 KB |
Output is correct |
43 |
Correct |
12 ms |
31500 KB |
Output is correct |
44 |
Correct |
11 ms |
31496 KB |
Output is correct |
45 |
Correct |
11 ms |
32524 KB |
Output is correct |
46 |
Correct |
11 ms |
32460 KB |
Output is correct |
47 |
Correct |
11 ms |
31244 KB |
Output is correct |
48 |
Correct |
12 ms |
31476 KB |
Output is correct |
49 |
Correct |
11 ms |
32780 KB |
Output is correct |
50 |
Correct |
12 ms |
33036 KB |
Output is correct |
51 |
Correct |
12 ms |
31500 KB |
Output is correct |
52 |
Correct |
14 ms |
32748 KB |
Output is correct |
53 |
Correct |
12 ms |
31500 KB |
Output is correct |
54 |
Correct |
11 ms |
32524 KB |
Output is correct |
55 |
Correct |
12 ms |
33032 KB |
Output is correct |
56 |
Correct |
11 ms |
32780 KB |
Output is correct |
57 |
Correct |
11 ms |
32708 KB |
Output is correct |
58 |
Correct |
11 ms |
31752 KB |
Output is correct |
59 |
Correct |
12 ms |
31512 KB |
Output is correct |
60 |
Correct |
12 ms |
32280 KB |
Output is correct |
61 |
Correct |
11 ms |
32024 KB |
Output is correct |
62 |
Correct |
11 ms |
32792 KB |
Output is correct |
63 |
Correct |
12 ms |
32376 KB |
Output is correct |
64 |
Correct |
11 ms |
31240 KB |
Output is correct |
65 |
Correct |
11 ms |
32412 KB |
Output is correct |
66 |
Correct |
13 ms |
32776 KB |
Output is correct |
67 |
Correct |
13 ms |
32136 KB |
Output is correct |
68 |
Correct |
11 ms |
31252 KB |
Output is correct |
69 |
Correct |
14 ms |
31812 KB |
Output is correct |
70 |
Correct |
12 ms |
30988 KB |
Output is correct |
71 |
Correct |
13 ms |
33032 KB |
Output is correct |
72 |
Correct |
12 ms |
31448 KB |
Output is correct |
73 |
Correct |
12 ms |
32784 KB |
Output is correct |
74 |
Correct |
12 ms |
33032 KB |
Output is correct |
75 |
Correct |
13 ms |
32520 KB |
Output is correct |
76 |
Correct |
15 ms |
31244 KB |
Output is correct |
77 |
Correct |
13 ms |
32852 KB |
Output is correct |
78 |
Correct |
13 ms |
32012 KB |
Output is correct |
79 |
Correct |
13 ms |
32524 KB |
Output is correct |
80 |
Correct |
13 ms |
31756 KB |
Output is correct |
81 |
Correct |
12 ms |
32268 KB |
Output is correct |
82 |
Correct |
14 ms |
32580 KB |
Output is correct |
83 |
Correct |
12 ms |
33032 KB |
Output is correct |
84 |
Correct |
16 ms |
33952 KB |
Output is correct |
85 |
Correct |
13 ms |
32536 KB |
Output is correct |
86 |
Correct |
15 ms |
32580 KB |
Output is correct |
87 |
Correct |
15 ms |
32068 KB |
Output is correct |
88 |
Correct |
15 ms |
32584 KB |
Output is correct |
89 |
Correct |
15 ms |
32576 KB |
Output is correct |
90 |
Correct |
14 ms |
33608 KB |
Output is correct |
91 |
Correct |
14 ms |
33424 KB |
Output is correct |
92 |
Correct |
15 ms |
33352 KB |
Output is correct |
93 |
Correct |
16 ms |
35656 KB |
Output is correct |
94 |
Correct |
16 ms |
35944 KB |
Output is correct |
95 |
Correct |
15 ms |
32852 KB |
Output is correct |
96 |
Correct |
13 ms |
31824 KB |
Output is correct |
97 |
Correct |
15 ms |
31556 KB |
Output is correct |
98 |
Correct |
19 ms |
42824 KB |
Output is correct |
99 |
Correct |
11 ms |
32780 KB |
Output is correct |
100 |
Correct |
20 ms |
46664 KB |
Output is correct |
101 |
Correct |
14 ms |
32840 KB |
Output is correct |
102 |
Correct |
15 ms |
32840 KB |
Output is correct |
103 |
Correct |
28 ms |
55108 KB |
Output is correct |
104 |
Correct |
27 ms |
55360 KB |
Output is correct |
105 |
Correct |
42 ms |
72492 KB |
Output is correct |
106 |
Correct |
51 ms |
78424 KB |
Output is correct |
107 |
Correct |
42 ms |
74456 KB |
Output is correct |
108 |
Correct |
33 ms |
60992 KB |
Output is correct |
109 |
Correct |
23 ms |
50236 KB |
Output is correct |
110 |
Correct |
22 ms |
49476 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
12 ms |
31244 KB |
Output is correct |
2 |
Correct |
12 ms |
31756 KB |
Output is correct |
3 |
Correct |
12 ms |
31496 KB |
Output is correct |
4 |
Correct |
13 ms |
31916 KB |
Output is correct |
5 |
Correct |
11 ms |
32524 KB |
Output is correct |
6 |
Correct |
14 ms |
31496 KB |
Output is correct |
7 |
Correct |
12 ms |
31500 KB |
Output is correct |
8 |
Correct |
13 ms |
31244 KB |
Output is correct |
9 |
Correct |
12 ms |
33036 KB |
Output is correct |
10 |
Correct |
19 ms |
39724 KB |
Output is correct |
11 |
Correct |
13 ms |
31500 KB |
Output is correct |
12 |
Correct |
15 ms |
33428 KB |
Output is correct |
13 |
Correct |
13 ms |
32064 KB |
Output is correct |
14 |
Correct |
14 ms |
32776 KB |
Output is correct |
15 |
Correct |
14 ms |
32268 KB |
Output is correct |
16 |
Correct |
14 ms |
32264 KB |
Output is correct |
17 |
Correct |
14 ms |
32520 KB |
Output is correct |
18 |
Correct |
12 ms |
32780 KB |
Output is correct |
19 |
Correct |
12 ms |
32012 KB |
Output is correct |
20 |
Correct |
11 ms |
32524 KB |
Output is correct |
21 |
Correct |
13 ms |
32268 KB |
Output is correct |
22 |
Correct |
20 ms |
34624 KB |
Output is correct |
23 |
Correct |
15 ms |
33608 KB |
Output is correct |
24 |
Correct |
15 ms |
32520 KB |
Output is correct |
25 |
Correct |
13 ms |
32580 KB |
Output is correct |
26 |
Correct |
13 ms |
33036 KB |
Output is correct |
27 |
Correct |
11 ms |
30984 KB |
Output is correct |
28 |
Correct |
13 ms |
31756 KB |
Output is correct |
29 |
Correct |
11 ms |
31244 KB |
Output is correct |
30 |
Correct |
11 ms |
33036 KB |
Output is correct |
31 |
Correct |
12 ms |
31500 KB |
Output is correct |
32 |
Correct |
11 ms |
31328 KB |
Output is correct |
33 |
Correct |
13 ms |
31496 KB |
Output is correct |
34 |
Correct |
11 ms |
31244 KB |
Output is correct |
35 |
Correct |
12 ms |
31244 KB |
Output is correct |
36 |
Correct |
13 ms |
32268 KB |
Output is correct |
37 |
Correct |
17 ms |
43336 KB |
Output is correct |
38 |
Correct |
42 ms |
77124 KB |
Output is correct |
39 |
Correct |
11 ms |
31244 KB |
Output is correct |
40 |
Correct |
12 ms |
32524 KB |
Output is correct |
41 |
Correct |
11 ms |
32780 KB |
Output is correct |
42 |
Correct |
12 ms |
31756 KB |
Output is correct |
43 |
Correct |
11 ms |
32268 KB |
Output is correct |
44 |
Correct |
12 ms |
31244 KB |
Output is correct |
45 |
Correct |
14 ms |
32012 KB |
Output is correct |
46 |
Correct |
21 ms |
43844 KB |
Output is correct |
47 |
Correct |
26 ms |
56152 KB |
Output is correct |
48 |
Correct |
14 ms |
32288 KB |
Output is correct |
49 |
Correct |
14 ms |
32012 KB |
Output is correct |
50 |
Correct |
13 ms |
32780 KB |
Output is correct |
51 |
Correct |
11 ms |
31500 KB |
Output is correct |
52 |
Correct |
13 ms |
32012 KB |
Output is correct |
53 |
Correct |
11 ms |
31756 KB |
Output is correct |
54 |
Correct |
13 ms |
31244 KB |
Output is correct |
55 |
Correct |
11 ms |
33036 KB |
Output is correct |
56 |
Correct |
11 ms |
32348 KB |
Output is correct |
57 |
Correct |
11 ms |
33036 KB |
Output is correct |
58 |
Correct |
11 ms |
31244 KB |
Output is correct |
59 |
Correct |
12 ms |
32268 KB |
Output is correct |
60 |
Correct |
11 ms |
31244 KB |
Output is correct |
61 |
Correct |
11 ms |
31240 KB |
Output is correct |
62 |
Correct |
12 ms |
31752 KB |
Output is correct |
63 |
Correct |
12 ms |
32012 KB |
Output is correct |
64 |
Correct |
13 ms |
31756 KB |
Output is correct |
65 |
Correct |
12 ms |
32780 KB |
Output is correct |
66 |
Correct |
12 ms |
31500 KB |
Output is correct |
67 |
Correct |
11 ms |
31496 KB |
Output is correct |
68 |
Correct |
11 ms |
32524 KB |
Output is correct |
69 |
Correct |
11 ms |
32460 KB |
Output is correct |
70 |
Correct |
11 ms |
31244 KB |
Output is correct |
71 |
Correct |
12 ms |
31476 KB |
Output is correct |
72 |
Correct |
11 ms |
32780 KB |
Output is correct |
73 |
Correct |
12 ms |
33036 KB |
Output is correct |
74 |
Correct |
12 ms |
31500 KB |
Output is correct |
75 |
Correct |
14 ms |
32748 KB |
Output is correct |
76 |
Correct |
12 ms |
31500 KB |
Output is correct |
77 |
Correct |
11 ms |
32524 KB |
Output is correct |
78 |
Correct |
12 ms |
33032 KB |
Output is correct |
79 |
Correct |
11 ms |
32780 KB |
Output is correct |
80 |
Correct |
11 ms |
32708 KB |
Output is correct |
81 |
Correct |
11 ms |
31752 KB |
Output is correct |
82 |
Correct |
12 ms |
31512 KB |
Output is correct |
83 |
Correct |
12 ms |
32280 KB |
Output is correct |
84 |
Correct |
11 ms |
32024 KB |
Output is correct |
85 |
Correct |
11 ms |
32792 KB |
Output is correct |
86 |
Correct |
12 ms |
32376 KB |
Output is correct |
87 |
Correct |
11 ms |
31240 KB |
Output is correct |
88 |
Correct |
11 ms |
32412 KB |
Output is correct |
89 |
Correct |
13 ms |
32776 KB |
Output is correct |
90 |
Correct |
13 ms |
32136 KB |
Output is correct |
91 |
Correct |
11 ms |
31252 KB |
Output is correct |
92 |
Correct |
14 ms |
31812 KB |
Output is correct |
93 |
Correct |
12 ms |
30988 KB |
Output is correct |
94 |
Correct |
13 ms |
33032 KB |
Output is correct |
95 |
Correct |
12 ms |
31448 KB |
Output is correct |
96 |
Correct |
12 ms |
32784 KB |
Output is correct |
97 |
Correct |
12 ms |
33032 KB |
Output is correct |
98 |
Correct |
13 ms |
32520 KB |
Output is correct |
99 |
Correct |
15 ms |
31244 KB |
Output is correct |
100 |
Correct |
13 ms |
32852 KB |
Output is correct |
101 |
Correct |
13 ms |
32012 KB |
Output is correct |
102 |
Correct |
13 ms |
32524 KB |
Output is correct |
103 |
Correct |
13 ms |
31756 KB |
Output is correct |
104 |
Correct |
12 ms |
32268 KB |
Output is correct |
105 |
Correct |
14 ms |
32580 KB |
Output is correct |
106 |
Correct |
12 ms |
33032 KB |
Output is correct |
107 |
Correct |
16 ms |
33952 KB |
Output is correct |
108 |
Correct |
13 ms |
32536 KB |
Output is correct |
109 |
Correct |
15 ms |
32580 KB |
Output is correct |
110 |
Correct |
15 ms |
32068 KB |
Output is correct |
111 |
Correct |
15 ms |
32584 KB |
Output is correct |
112 |
Correct |
15 ms |
32576 KB |
Output is correct |
113 |
Correct |
14 ms |
33608 KB |
Output is correct |
114 |
Correct |
14 ms |
33424 KB |
Output is correct |
115 |
Correct |
15 ms |
33352 KB |
Output is correct |
116 |
Correct |
16 ms |
35656 KB |
Output is correct |
117 |
Correct |
16 ms |
35944 KB |
Output is correct |
118 |
Correct |
15 ms |
32852 KB |
Output is correct |
119 |
Correct |
13 ms |
31824 KB |
Output is correct |
120 |
Correct |
15 ms |
31556 KB |
Output is correct |
121 |
Correct |
19 ms |
42824 KB |
Output is correct |
122 |
Correct |
11 ms |
32780 KB |
Output is correct |
123 |
Correct |
20 ms |
46664 KB |
Output is correct |
124 |
Correct |
14 ms |
32840 KB |
Output is correct |
125 |
Correct |
15 ms |
32840 KB |
Output is correct |
126 |
Correct |
28 ms |
55108 KB |
Output is correct |
127 |
Correct |
27 ms |
55360 KB |
Output is correct |
128 |
Correct |
42 ms |
72492 KB |
Output is correct |
129 |
Correct |
51 ms |
78424 KB |
Output is correct |
130 |
Correct |
42 ms |
74456 KB |
Output is correct |
131 |
Correct |
33 ms |
60992 KB |
Output is correct |
132 |
Correct |
23 ms |
50236 KB |
Output is correct |
133 |
Correct |
22 ms |
49476 KB |
Output is correct |
134 |
Correct |
50 ms |
102792 KB |
Output is correct |
135 |
Correct |
21 ms |
36932 KB |
Output is correct |
136 |
Correct |
15 ms |
31500 KB |
Output is correct |
137 |
Correct |
69 ms |
130860 KB |
Output is correct |
138 |
Correct |
65 ms |
133204 KB |
Output is correct |
139 |
Correct |
176 ms |
269864 KB |
Output is correct |
140 |
Correct |
239 ms |
316200 KB |
Output is correct |
141 |
Correct |
173 ms |
263748 KB |
Output is correct |
142 |
Correct |
130 ms |
193928 KB |
Output is correct |
143 |
Correct |
62 ms |
117280 KB |
Output is correct |
144 |
Correct |
57 ms |
116776 KB |
Output is correct |