#include<bits/stdc++.h>
using namespace std;
const int MAX_SOM=15000+5;
using bits=bitset<MAX_SOM>;
int nbPiles,nbPossi,valNouv,somGlob,enCours,minPris,dernPris;
vector<int> possi,listePris;
vector<vector<bits>> estPossi;
bits toutZer;
int nbOccu[MAX_SOM],cumu[MAX_SOM];
set<pair<int,int>> etat;
vector<pair<int,int>> aRemettre;
set<pair<int,int>>::iterator it;
signed main() {
ios_base::sync_with_stdio(false);
cin.tie(NULL);
cout.tie(NULL);
cin>>nbPiles;
for (int i=0;i<nbPiles;i++) {
cin>>valNouv;
somGlob+=valNouv;
nbOccu[valNouv]++;
etat.insert({-valNouv,i+1});
}
enCours=nbPiles;
for (int i=1;i<MAX_SOM;i++) {
cumu[i]=cumu[i-1]+enCours;
enCours-=nbOccu[i];
//cout<<i<<" : "<<cumu[i]<<endl;
}
cin>>nbPossi;
for (int i=0;i<nbPossi;i++) {
cin>>valNouv;
possi.push_back(valNouv);
}
reverse(possi.begin(),possi.end());
for (int i=nbPossi-1;i>=0;i--) {
estPossi.push_back({});
}
minPris=MAX_SOM;
for (int i=0;i<nbPossi;i++) {
for (int j=0;j<=MAX_SOM/possi[i];j++) {
estPossi[i].push_back(toutZer);
}
}
estPossi[0][0][0]=true;
for (int i=0;i<nbPossi;i++) {
for (int j=0;j<=MAX_SOM/possi[i];j++) {
if (i!=0 and possi[i-1]*j<=MAX_SOM) {
estPossi[i][j]|=estPossi[i-1][j];
}
if (j!=0) {
estPossi[i][j]|=(estPossi[i][j-1]<<possi[i]);
}
estPossi[i][j]<<=(MAX_SOM-1-cumu[j]);
estPossi[i][j]>>=(MAX_SOM-1-cumu[j]);
if (estPossi[i][j][somGlob] and j<minPris) {
minPris=j;
dernPris=i;
}
//cout<<i<<" "<<j<<" : "<<estPossi[i][j]<<endl;
}
}
if (minPris==MAX_SOM) {
cout<<-1<<endl;
return 0;
}
cout<<minPris<<endl;
while (minPris!=0) {
if (dernPris!=0 and possi[dernPris-1]*minPris<=MAX_SOM and estPossi[dernPris-1][minPris][somGlob]) {
dernPris--;
}
else {
listePris.push_back(possi[dernPris]);
somGlob-=possi[dernPris];
minPris--;
}
}
for (int i:listePris) {
cout<<i<<" ";
for (int j=0;j<i;j++) {
it=etat.begin();
cout<<(*it).second<<" ";
aRemettre.push_back({(*it).first+1,(*it).second});
etat.erase(it);
}
for (auto k:aRemettre) {
etat.insert(k);
}
aRemettre.clear();
cout<<endl;
}
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
63 ms |
53612 KB |
Output is correct |
2 |
Correct |
31 ms |
30620 KB |
Output is correct |
3 |
Correct |
34 ms |
30680 KB |
Output is correct |
4 |
Correct |
16 ms |
15584 KB |
Output is correct |
5 |
Correct |
49 ms |
44452 KB |
Output is correct |
6 |
Correct |
27 ms |
32212 KB |
Output is correct |
7 |
Correct |
55 ms |
43148 KB |
Output is correct |
8 |
Correct |
31 ms |
30632 KB |
Output is correct |
9 |
Correct |
1 ms |
468 KB |
Output is correct |
10 |
Correct |
213 ms |
192664 KB |
Output is correct |
11 |
Correct |
15 ms |
20692 KB |
Output is correct |
12 |
Correct |
108 ms |
103764 KB |
Output is correct |
13 |
Correct |
25 ms |
25872 KB |
Output is correct |
14 |
Correct |
30 ms |
29812 KB |
Output is correct |
15 |
Correct |
22 ms |
26576 KB |
Output is correct |
16 |
Correct |
35 ms |
26168 KB |
Output is correct |
17 |
Correct |
16 ms |
11000 KB |
Output is correct |
18 |
Correct |
31 ms |
27088 KB |
Output is correct |
19 |
Correct |
6 ms |
6396 KB |
Output is correct |
20 |
Correct |
2 ms |
2696 KB |
Output is correct |
21 |
Correct |
41 ms |
29404 KB |
Output is correct |
22 |
Correct |
85 ms |
87128 KB |
Output is correct |
23 |
Correct |
72 ms |
76228 KB |
Output is correct |
24 |
Correct |
37 ms |
37908 KB |
Output is correct |
25 |
Correct |
38 ms |
37116 KB |
Output is correct |
26 |
Correct |
10 ms |
8264 KB |
Output is correct |
27 |
Correct |
7 ms |
7424 KB |
Output is correct |
28 |
Correct |
17 ms |
17800 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
8 ms |
7964 KB |
Output is correct |
2 |
Correct |
32 ms |
30604 KB |
Output is correct |
3 |
Correct |
32 ms |
30644 KB |
Output is correct |
4 |
Correct |
15 ms |
15492 KB |
Output is correct |
5 |
Correct |
32 ms |
30596 KB |
Output is correct |
6 |
Correct |
1 ms |
468 KB |
Output is correct |
7 |
Correct |
32 ms |
30596 KB |
Output is correct |
8 |
Correct |
32 ms |
30568 KB |
Output is correct |
9 |
Correct |
36 ms |
30596 KB |
Output is correct |
10 |
Correct |
54 ms |
30596 KB |
Output is correct |
11 |
Correct |
31 ms |
30580 KB |
Output is correct |
12 |
Correct |
19 ms |
15592 KB |
Output is correct |
13 |
Correct |
16 ms |
15592 KB |
Output is correct |
14 |
Correct |
17 ms |
15592 KB |
Output is correct |
15 |
Correct |
16 ms |
15588 KB |
Output is correct |
16 |
Correct |
4 ms |
4212 KB |
Output is correct |
17 |
Correct |
3 ms |
4212 KB |
Output is correct |
18 |
Correct |
15 ms |
7964 KB |
Output is correct |
19 |
Correct |
21 ms |
15564 KB |
Output is correct |
20 |
Correct |
4 ms |
1004 KB |
Output is correct |
21 |
Correct |
3 ms |
596 KB |
Output is correct |
22 |
Correct |
3 ms |
744 KB |
Output is correct |
23 |
Correct |
1 ms |
596 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
73 ms |
53688 KB |
Output is correct |
2 |
Correct |
10 ms |
7964 KB |
Output is correct |
3 |
Correct |
31 ms |
30596 KB |
Output is correct |
4 |
Correct |
31 ms |
30592 KB |
Output is correct |
5 |
Correct |
15 ms |
15592 KB |
Output is correct |
6 |
Correct |
48 ms |
44444 KB |
Output is correct |
7 |
Correct |
29 ms |
32236 KB |
Output is correct |
8 |
Correct |
47 ms |
43036 KB |
Output is correct |
9 |
Correct |
37 ms |
30660 KB |
Output is correct |
10 |
Correct |
31 ms |
30604 KB |
Output is correct |
11 |
Correct |
16 ms |
15592 KB |
Output is correct |
12 |
Correct |
15 ms |
15512 KB |
Output is correct |
13 |
Correct |
12 ms |
15552 KB |
Output is correct |
14 |
Correct |
14 ms |
15592 KB |
Output is correct |
15 |
Correct |
46 ms |
44416 KB |
Output is correct |
16 |
Correct |
27 ms |
32192 KB |
Output is correct |
17 |
Correct |
62 ms |
53636 KB |
Output is correct |
18 |
Correct |
20 ms |
22408 KB |
Output is correct |
19 |
Correct |
63 ms |
46724 KB |
Output is correct |
20 |
Correct |
37 ms |
39076 KB |
Output is correct |
21 |
Correct |
30 ms |
27944 KB |
Output is correct |
22 |
Correct |
27 ms |
28004 KB |
Output is correct |
23 |
Correct |
31 ms |
28052 KB |
Output is correct |
24 |
Correct |
57 ms |
51260 KB |
Output is correct |
25 |
Correct |
30 ms |
27048 KB |
Output is correct |
26 |
Correct |
28 ms |
25768 KB |
Output is correct |
27 |
Correct |
50 ms |
45332 KB |
Output is correct |
28 |
Correct |
49 ms |
49248 KB |
Output is correct |
29 |
Correct |
49 ms |
42188 KB |
Output is correct |
30 |
Correct |
43 ms |
42168 KB |
Output is correct |
31 |
Correct |
83 ms |
69144 KB |
Output is correct |
32 |
Correct |
25 ms |
23672 KB |
Output is correct |
33 |
Correct |
49 ms |
42696 KB |
Output is correct |
34 |
Correct |
34 ms |
31944 KB |
Output is correct |
35 |
Correct |
70 ms |
63476 KB |
Output is correct |
36 |
Correct |
104 ms |
92844 KB |
Output is correct |
37 |
Correct |
47 ms |
37504 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
63 ms |
53612 KB |
Output is correct |
2 |
Correct |
31 ms |
30620 KB |
Output is correct |
3 |
Correct |
34 ms |
30680 KB |
Output is correct |
4 |
Correct |
16 ms |
15584 KB |
Output is correct |
5 |
Correct |
49 ms |
44452 KB |
Output is correct |
6 |
Correct |
27 ms |
32212 KB |
Output is correct |
7 |
Correct |
55 ms |
43148 KB |
Output is correct |
8 |
Correct |
31 ms |
30632 KB |
Output is correct |
9 |
Correct |
1 ms |
468 KB |
Output is correct |
10 |
Correct |
213 ms |
192664 KB |
Output is correct |
11 |
Correct |
15 ms |
20692 KB |
Output is correct |
12 |
Correct |
108 ms |
103764 KB |
Output is correct |
13 |
Correct |
25 ms |
25872 KB |
Output is correct |
14 |
Correct |
30 ms |
29812 KB |
Output is correct |
15 |
Correct |
22 ms |
26576 KB |
Output is correct |
16 |
Correct |
35 ms |
26168 KB |
Output is correct |
17 |
Correct |
16 ms |
11000 KB |
Output is correct |
18 |
Correct |
31 ms |
27088 KB |
Output is correct |
19 |
Correct |
6 ms |
6396 KB |
Output is correct |
20 |
Correct |
2 ms |
2696 KB |
Output is correct |
21 |
Correct |
41 ms |
29404 KB |
Output is correct |
22 |
Correct |
85 ms |
87128 KB |
Output is correct |
23 |
Correct |
72 ms |
76228 KB |
Output is correct |
24 |
Correct |
37 ms |
37908 KB |
Output is correct |
25 |
Correct |
38 ms |
37116 KB |
Output is correct |
26 |
Correct |
10 ms |
8264 KB |
Output is correct |
27 |
Correct |
7 ms |
7424 KB |
Output is correct |
28 |
Correct |
17 ms |
17800 KB |
Output is correct |
29 |
Correct |
73 ms |
53688 KB |
Output is correct |
30 |
Correct |
10 ms |
7964 KB |
Output is correct |
31 |
Correct |
31 ms |
30596 KB |
Output is correct |
32 |
Correct |
31 ms |
30592 KB |
Output is correct |
33 |
Correct |
15 ms |
15592 KB |
Output is correct |
34 |
Correct |
48 ms |
44444 KB |
Output is correct |
35 |
Correct |
29 ms |
32236 KB |
Output is correct |
36 |
Correct |
47 ms |
43036 KB |
Output is correct |
37 |
Correct |
37 ms |
30660 KB |
Output is correct |
38 |
Correct |
31 ms |
30604 KB |
Output is correct |
39 |
Correct |
16 ms |
15592 KB |
Output is correct |
40 |
Correct |
15 ms |
15512 KB |
Output is correct |
41 |
Correct |
12 ms |
15552 KB |
Output is correct |
42 |
Correct |
14 ms |
15592 KB |
Output is correct |
43 |
Correct |
46 ms |
44416 KB |
Output is correct |
44 |
Correct |
27 ms |
32192 KB |
Output is correct |
45 |
Correct |
62 ms |
53636 KB |
Output is correct |
46 |
Correct |
20 ms |
22408 KB |
Output is correct |
47 |
Correct |
63 ms |
46724 KB |
Output is correct |
48 |
Correct |
37 ms |
39076 KB |
Output is correct |
49 |
Correct |
30 ms |
27944 KB |
Output is correct |
50 |
Correct |
27 ms |
28004 KB |
Output is correct |
51 |
Correct |
31 ms |
28052 KB |
Output is correct |
52 |
Correct |
57 ms |
51260 KB |
Output is correct |
53 |
Correct |
30 ms |
27048 KB |
Output is correct |
54 |
Correct |
28 ms |
25768 KB |
Output is correct |
55 |
Correct |
50 ms |
45332 KB |
Output is correct |
56 |
Correct |
49 ms |
49248 KB |
Output is correct |
57 |
Correct |
49 ms |
42188 KB |
Output is correct |
58 |
Correct |
43 ms |
42168 KB |
Output is correct |
59 |
Correct |
83 ms |
69144 KB |
Output is correct |
60 |
Correct |
25 ms |
23672 KB |
Output is correct |
61 |
Correct |
49 ms |
42696 KB |
Output is correct |
62 |
Correct |
34 ms |
31944 KB |
Output is correct |
63 |
Correct |
70 ms |
63476 KB |
Output is correct |
64 |
Correct |
104 ms |
92844 KB |
Output is correct |
65 |
Correct |
47 ms |
37504 KB |
Output is correct |
66 |
Correct |
22 ms |
20260 KB |
Output is correct |
67 |
Correct |
32 ms |
30636 KB |
Output is correct |
68 |
Correct |
4 ms |
4212 KB |
Output is correct |
69 |
Correct |
3 ms |
4212 KB |
Output is correct |
70 |
Correct |
9 ms |
9004 KB |
Output is correct |
71 |
Correct |
53 ms |
50144 KB |
Output is correct |
72 |
Correct |
35 ms |
34656 KB |
Output is correct |
73 |
Correct |
5 ms |
5984 KB |
Output is correct |
74 |
Correct |
10 ms |
10972 KB |
Output is correct |
75 |
Correct |
48 ms |
46708 KB |
Output is correct |
76 |
Correct |
44 ms |
43088 KB |
Output is correct |
77 |
Correct |
59 ms |
51484 KB |
Output is correct |
78 |
Correct |
42 ms |
40464 KB |
Output is correct |
79 |
Correct |
69 ms |
57792 KB |
Output is correct |
80 |
Correct |
55 ms |
50760 KB |
Output is correct |
81 |
Correct |
13 ms |
12360 KB |
Output is correct |
82 |
Correct |
73 ms |
60360 KB |
Output is correct |
83 |
Correct |
4 ms |
4724 KB |
Output is correct |
84 |
Correct |
74 ms |
69272 KB |
Output is correct |
85 |
Correct |
56 ms |
56324 KB |
Output is correct |
86 |
Correct |
98 ms |
88544 KB |
Output is correct |
87 |
Correct |
91 ms |
81124 KB |
Output is correct |
88 |
Correct |
95 ms |
83464 KB |
Output is correct |
89 |
Correct |
105 ms |
92924 KB |
Output is correct |
90 |
Correct |
87 ms |
77312 KB |
Output is correct |
91 |
Correct |
87 ms |
78468 KB |
Output is correct |
92 |
Correct |
130 ms |
115388 KB |
Output is correct |
93 |
Correct |
111 ms |
114188 KB |
Output is correct |
94 |
Correct |
109 ms |
106656 KB |
Output is correct |
95 |
Correct |
94 ms |
82764 KB |
Output is correct |
96 |
Correct |
77 ms |
57900 KB |
Output is correct |
97 |
Correct |
61 ms |
58268 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
63 ms |
53612 KB |
Output is correct |
2 |
Correct |
31 ms |
30620 KB |
Output is correct |
3 |
Correct |
34 ms |
30680 KB |
Output is correct |
4 |
Correct |
16 ms |
15584 KB |
Output is correct |
5 |
Correct |
49 ms |
44452 KB |
Output is correct |
6 |
Correct |
27 ms |
32212 KB |
Output is correct |
7 |
Correct |
55 ms |
43148 KB |
Output is correct |
8 |
Correct |
31 ms |
30632 KB |
Output is correct |
9 |
Correct |
1 ms |
468 KB |
Output is correct |
10 |
Correct |
213 ms |
192664 KB |
Output is correct |
11 |
Correct |
15 ms |
20692 KB |
Output is correct |
12 |
Correct |
108 ms |
103764 KB |
Output is correct |
13 |
Correct |
25 ms |
25872 KB |
Output is correct |
14 |
Correct |
30 ms |
29812 KB |
Output is correct |
15 |
Correct |
22 ms |
26576 KB |
Output is correct |
16 |
Correct |
35 ms |
26168 KB |
Output is correct |
17 |
Correct |
16 ms |
11000 KB |
Output is correct |
18 |
Correct |
31 ms |
27088 KB |
Output is correct |
19 |
Correct |
6 ms |
6396 KB |
Output is correct |
20 |
Correct |
2 ms |
2696 KB |
Output is correct |
21 |
Correct |
41 ms |
29404 KB |
Output is correct |
22 |
Correct |
85 ms |
87128 KB |
Output is correct |
23 |
Correct |
72 ms |
76228 KB |
Output is correct |
24 |
Correct |
37 ms |
37908 KB |
Output is correct |
25 |
Correct |
38 ms |
37116 KB |
Output is correct |
26 |
Correct |
10 ms |
8264 KB |
Output is correct |
27 |
Correct |
7 ms |
7424 KB |
Output is correct |
28 |
Correct |
17 ms |
17800 KB |
Output is correct |
29 |
Correct |
73 ms |
53688 KB |
Output is correct |
30 |
Correct |
10 ms |
7964 KB |
Output is correct |
31 |
Correct |
31 ms |
30596 KB |
Output is correct |
32 |
Correct |
31 ms |
30592 KB |
Output is correct |
33 |
Correct |
15 ms |
15592 KB |
Output is correct |
34 |
Correct |
48 ms |
44444 KB |
Output is correct |
35 |
Correct |
29 ms |
32236 KB |
Output is correct |
36 |
Correct |
47 ms |
43036 KB |
Output is correct |
37 |
Correct |
37 ms |
30660 KB |
Output is correct |
38 |
Correct |
31 ms |
30604 KB |
Output is correct |
39 |
Correct |
16 ms |
15592 KB |
Output is correct |
40 |
Correct |
15 ms |
15512 KB |
Output is correct |
41 |
Correct |
12 ms |
15552 KB |
Output is correct |
42 |
Correct |
14 ms |
15592 KB |
Output is correct |
43 |
Correct |
46 ms |
44416 KB |
Output is correct |
44 |
Correct |
27 ms |
32192 KB |
Output is correct |
45 |
Correct |
62 ms |
53636 KB |
Output is correct |
46 |
Correct |
20 ms |
22408 KB |
Output is correct |
47 |
Correct |
63 ms |
46724 KB |
Output is correct |
48 |
Correct |
37 ms |
39076 KB |
Output is correct |
49 |
Correct |
30 ms |
27944 KB |
Output is correct |
50 |
Correct |
27 ms |
28004 KB |
Output is correct |
51 |
Correct |
31 ms |
28052 KB |
Output is correct |
52 |
Correct |
57 ms |
51260 KB |
Output is correct |
53 |
Correct |
30 ms |
27048 KB |
Output is correct |
54 |
Correct |
28 ms |
25768 KB |
Output is correct |
55 |
Correct |
50 ms |
45332 KB |
Output is correct |
56 |
Correct |
49 ms |
49248 KB |
Output is correct |
57 |
Correct |
49 ms |
42188 KB |
Output is correct |
58 |
Correct |
43 ms |
42168 KB |
Output is correct |
59 |
Correct |
83 ms |
69144 KB |
Output is correct |
60 |
Correct |
25 ms |
23672 KB |
Output is correct |
61 |
Correct |
49 ms |
42696 KB |
Output is correct |
62 |
Correct |
34 ms |
31944 KB |
Output is correct |
63 |
Correct |
70 ms |
63476 KB |
Output is correct |
64 |
Correct |
104 ms |
92844 KB |
Output is correct |
65 |
Correct |
47 ms |
37504 KB |
Output is correct |
66 |
Correct |
22 ms |
20260 KB |
Output is correct |
67 |
Correct |
32 ms |
30636 KB |
Output is correct |
68 |
Correct |
4 ms |
4212 KB |
Output is correct |
69 |
Correct |
3 ms |
4212 KB |
Output is correct |
70 |
Correct |
9 ms |
9004 KB |
Output is correct |
71 |
Correct |
53 ms |
50144 KB |
Output is correct |
72 |
Correct |
35 ms |
34656 KB |
Output is correct |
73 |
Correct |
5 ms |
5984 KB |
Output is correct |
74 |
Correct |
10 ms |
10972 KB |
Output is correct |
75 |
Correct |
48 ms |
46708 KB |
Output is correct |
76 |
Correct |
44 ms |
43088 KB |
Output is correct |
77 |
Correct |
59 ms |
51484 KB |
Output is correct |
78 |
Correct |
42 ms |
40464 KB |
Output is correct |
79 |
Correct |
69 ms |
57792 KB |
Output is correct |
80 |
Correct |
55 ms |
50760 KB |
Output is correct |
81 |
Correct |
13 ms |
12360 KB |
Output is correct |
82 |
Correct |
73 ms |
60360 KB |
Output is correct |
83 |
Correct |
4 ms |
4724 KB |
Output is correct |
84 |
Correct |
74 ms |
69272 KB |
Output is correct |
85 |
Correct |
56 ms |
56324 KB |
Output is correct |
86 |
Correct |
98 ms |
88544 KB |
Output is correct |
87 |
Correct |
91 ms |
81124 KB |
Output is correct |
88 |
Correct |
95 ms |
83464 KB |
Output is correct |
89 |
Correct |
105 ms |
92924 KB |
Output is correct |
90 |
Correct |
87 ms |
77312 KB |
Output is correct |
91 |
Correct |
87 ms |
78468 KB |
Output is correct |
92 |
Correct |
130 ms |
115388 KB |
Output is correct |
93 |
Correct |
111 ms |
114188 KB |
Output is correct |
94 |
Correct |
109 ms |
106656 KB |
Output is correct |
95 |
Correct |
94 ms |
82764 KB |
Output is correct |
96 |
Correct |
77 ms |
57900 KB |
Output is correct |
97 |
Correct |
61 ms |
58268 KB |
Output is correct |
98 |
Correct |
41 ms |
30776 KB |
Output is correct |
99 |
Correct |
1 ms |
596 KB |
Output is correct |
100 |
Correct |
53 ms |
44956 KB |
Output is correct |
101 |
Correct |
15 ms |
14452 KB |
Output is correct |
102 |
Correct |
18 ms |
17084 KB |
Output is correct |
103 |
Correct |
98 ms |
87288 KB |
Output is correct |
104 |
Correct |
92 ms |
80224 KB |
Output is correct |
105 |
Correct |
176 ms |
158956 KB |
Output is correct |
106 |
Correct |
145 ms |
165860 KB |
Output is correct |
107 |
Correct |
135 ms |
136888 KB |
Output is correct |
108 |
Correct |
127 ms |
109572 KB |
Output is correct |
109 |
Correct |
67 ms |
58484 KB |
Output is correct |
110 |
Correct |
65 ms |
58532 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
63 ms |
53612 KB |
Output is correct |
2 |
Correct |
31 ms |
30620 KB |
Output is correct |
3 |
Correct |
34 ms |
30680 KB |
Output is correct |
4 |
Correct |
16 ms |
15584 KB |
Output is correct |
5 |
Correct |
49 ms |
44452 KB |
Output is correct |
6 |
Correct |
27 ms |
32212 KB |
Output is correct |
7 |
Correct |
55 ms |
43148 KB |
Output is correct |
8 |
Correct |
31 ms |
30632 KB |
Output is correct |
9 |
Correct |
1 ms |
468 KB |
Output is correct |
10 |
Correct |
213 ms |
192664 KB |
Output is correct |
11 |
Correct |
15 ms |
20692 KB |
Output is correct |
12 |
Correct |
108 ms |
103764 KB |
Output is correct |
13 |
Correct |
25 ms |
25872 KB |
Output is correct |
14 |
Correct |
30 ms |
29812 KB |
Output is correct |
15 |
Correct |
22 ms |
26576 KB |
Output is correct |
16 |
Correct |
35 ms |
26168 KB |
Output is correct |
17 |
Correct |
16 ms |
11000 KB |
Output is correct |
18 |
Correct |
31 ms |
27088 KB |
Output is correct |
19 |
Correct |
6 ms |
6396 KB |
Output is correct |
20 |
Correct |
2 ms |
2696 KB |
Output is correct |
21 |
Correct |
41 ms |
29404 KB |
Output is correct |
22 |
Correct |
85 ms |
87128 KB |
Output is correct |
23 |
Correct |
72 ms |
76228 KB |
Output is correct |
24 |
Correct |
37 ms |
37908 KB |
Output is correct |
25 |
Correct |
38 ms |
37116 KB |
Output is correct |
26 |
Correct |
10 ms |
8264 KB |
Output is correct |
27 |
Correct |
7 ms |
7424 KB |
Output is correct |
28 |
Correct |
17 ms |
17800 KB |
Output is correct |
29 |
Correct |
8 ms |
7964 KB |
Output is correct |
30 |
Correct |
32 ms |
30604 KB |
Output is correct |
31 |
Correct |
32 ms |
30644 KB |
Output is correct |
32 |
Correct |
15 ms |
15492 KB |
Output is correct |
33 |
Correct |
32 ms |
30596 KB |
Output is correct |
34 |
Correct |
1 ms |
468 KB |
Output is correct |
35 |
Correct |
32 ms |
30596 KB |
Output is correct |
36 |
Correct |
32 ms |
30568 KB |
Output is correct |
37 |
Correct |
36 ms |
30596 KB |
Output is correct |
38 |
Correct |
54 ms |
30596 KB |
Output is correct |
39 |
Correct |
31 ms |
30580 KB |
Output is correct |
40 |
Correct |
19 ms |
15592 KB |
Output is correct |
41 |
Correct |
16 ms |
15592 KB |
Output is correct |
42 |
Correct |
17 ms |
15592 KB |
Output is correct |
43 |
Correct |
16 ms |
15588 KB |
Output is correct |
44 |
Correct |
4 ms |
4212 KB |
Output is correct |
45 |
Correct |
3 ms |
4212 KB |
Output is correct |
46 |
Correct |
15 ms |
7964 KB |
Output is correct |
47 |
Correct |
21 ms |
15564 KB |
Output is correct |
48 |
Correct |
4 ms |
1004 KB |
Output is correct |
49 |
Correct |
3 ms |
596 KB |
Output is correct |
50 |
Correct |
3 ms |
744 KB |
Output is correct |
51 |
Correct |
1 ms |
596 KB |
Output is correct |
52 |
Correct |
73 ms |
53688 KB |
Output is correct |
53 |
Correct |
10 ms |
7964 KB |
Output is correct |
54 |
Correct |
31 ms |
30596 KB |
Output is correct |
55 |
Correct |
31 ms |
30592 KB |
Output is correct |
56 |
Correct |
15 ms |
15592 KB |
Output is correct |
57 |
Correct |
48 ms |
44444 KB |
Output is correct |
58 |
Correct |
29 ms |
32236 KB |
Output is correct |
59 |
Correct |
47 ms |
43036 KB |
Output is correct |
60 |
Correct |
37 ms |
30660 KB |
Output is correct |
61 |
Correct |
31 ms |
30604 KB |
Output is correct |
62 |
Correct |
16 ms |
15592 KB |
Output is correct |
63 |
Correct |
15 ms |
15512 KB |
Output is correct |
64 |
Correct |
12 ms |
15552 KB |
Output is correct |
65 |
Correct |
14 ms |
15592 KB |
Output is correct |
66 |
Correct |
46 ms |
44416 KB |
Output is correct |
67 |
Correct |
27 ms |
32192 KB |
Output is correct |
68 |
Correct |
62 ms |
53636 KB |
Output is correct |
69 |
Correct |
20 ms |
22408 KB |
Output is correct |
70 |
Correct |
63 ms |
46724 KB |
Output is correct |
71 |
Correct |
37 ms |
39076 KB |
Output is correct |
72 |
Correct |
30 ms |
27944 KB |
Output is correct |
73 |
Correct |
27 ms |
28004 KB |
Output is correct |
74 |
Correct |
31 ms |
28052 KB |
Output is correct |
75 |
Correct |
57 ms |
51260 KB |
Output is correct |
76 |
Correct |
30 ms |
27048 KB |
Output is correct |
77 |
Correct |
28 ms |
25768 KB |
Output is correct |
78 |
Correct |
50 ms |
45332 KB |
Output is correct |
79 |
Correct |
49 ms |
49248 KB |
Output is correct |
80 |
Correct |
49 ms |
42188 KB |
Output is correct |
81 |
Correct |
43 ms |
42168 KB |
Output is correct |
82 |
Correct |
83 ms |
69144 KB |
Output is correct |
83 |
Correct |
25 ms |
23672 KB |
Output is correct |
84 |
Correct |
49 ms |
42696 KB |
Output is correct |
85 |
Correct |
34 ms |
31944 KB |
Output is correct |
86 |
Correct |
70 ms |
63476 KB |
Output is correct |
87 |
Correct |
104 ms |
92844 KB |
Output is correct |
88 |
Correct |
47 ms |
37504 KB |
Output is correct |
89 |
Correct |
22 ms |
20260 KB |
Output is correct |
90 |
Correct |
32 ms |
30636 KB |
Output is correct |
91 |
Correct |
4 ms |
4212 KB |
Output is correct |
92 |
Correct |
3 ms |
4212 KB |
Output is correct |
93 |
Correct |
9 ms |
9004 KB |
Output is correct |
94 |
Correct |
53 ms |
50144 KB |
Output is correct |
95 |
Correct |
35 ms |
34656 KB |
Output is correct |
96 |
Correct |
5 ms |
5984 KB |
Output is correct |
97 |
Correct |
10 ms |
10972 KB |
Output is correct |
98 |
Correct |
48 ms |
46708 KB |
Output is correct |
99 |
Correct |
44 ms |
43088 KB |
Output is correct |
100 |
Correct |
59 ms |
51484 KB |
Output is correct |
101 |
Correct |
42 ms |
40464 KB |
Output is correct |
102 |
Correct |
69 ms |
57792 KB |
Output is correct |
103 |
Correct |
55 ms |
50760 KB |
Output is correct |
104 |
Correct |
13 ms |
12360 KB |
Output is correct |
105 |
Correct |
73 ms |
60360 KB |
Output is correct |
106 |
Correct |
4 ms |
4724 KB |
Output is correct |
107 |
Correct |
74 ms |
69272 KB |
Output is correct |
108 |
Correct |
56 ms |
56324 KB |
Output is correct |
109 |
Correct |
98 ms |
88544 KB |
Output is correct |
110 |
Correct |
91 ms |
81124 KB |
Output is correct |
111 |
Correct |
95 ms |
83464 KB |
Output is correct |
112 |
Correct |
105 ms |
92924 KB |
Output is correct |
113 |
Correct |
87 ms |
77312 KB |
Output is correct |
114 |
Correct |
87 ms |
78468 KB |
Output is correct |
115 |
Correct |
130 ms |
115388 KB |
Output is correct |
116 |
Correct |
111 ms |
114188 KB |
Output is correct |
117 |
Correct |
109 ms |
106656 KB |
Output is correct |
118 |
Correct |
94 ms |
82764 KB |
Output is correct |
119 |
Correct |
77 ms |
57900 KB |
Output is correct |
120 |
Correct |
61 ms |
58268 KB |
Output is correct |
121 |
Correct |
41 ms |
30776 KB |
Output is correct |
122 |
Correct |
1 ms |
596 KB |
Output is correct |
123 |
Correct |
53 ms |
44956 KB |
Output is correct |
124 |
Correct |
15 ms |
14452 KB |
Output is correct |
125 |
Correct |
18 ms |
17084 KB |
Output is correct |
126 |
Correct |
98 ms |
87288 KB |
Output is correct |
127 |
Correct |
92 ms |
80224 KB |
Output is correct |
128 |
Correct |
176 ms |
158956 KB |
Output is correct |
129 |
Correct |
145 ms |
165860 KB |
Output is correct |
130 |
Correct |
135 ms |
136888 KB |
Output is correct |
131 |
Correct |
127 ms |
109572 KB |
Output is correct |
132 |
Correct |
67 ms |
58484 KB |
Output is correct |
133 |
Correct |
65 ms |
58532 KB |
Output is correct |
134 |
Correct |
54 ms |
42880 KB |
Output is correct |
135 |
Correct |
10 ms |
6768 KB |
Output is correct |
136 |
Correct |
6 ms |
1444 KB |
Output is correct |
137 |
Correct |
90 ms |
70080 KB |
Output is correct |
138 |
Correct |
93 ms |
72256 KB |
Output is correct |
139 |
Correct |
255 ms |
202568 KB |
Output is correct |
140 |
Correct |
202 ms |
226052 KB |
Output is correct |
141 |
Correct |
175 ms |
170492 KB |
Output is correct |
142 |
Correct |
167 ms |
131596 KB |
Output is correct |
143 |
Correct |
75 ms |
58720 KB |
Output is correct |
144 |
Correct |
82 ms |
58956 KB |
Output is correct |