#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef __int128 lll;
typedef long double ld;
typedef pair<ll, ll> pll;
typedef pair<ld, ld> pld;
#define MAX 9223372036854775807LL
#define MIN -9223372036854775807LL
#define INF 0x3f3f3f3f3f3f3f3f
#define fi first
#define se second
#define fastio ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); cout << fixed; cout.precision(10);
#define sp << " "
#define en << "\n"
#define compress(v) sort(v.begin(), v.end()), v.erase(unique(v.begin(), v.end()), v.end())
ll n;
ll a[15010];
ll m;
ll b[15010];
ll sum, S[15010];
priority_queue<ll> pq;
ll now, gaet;
vector< bitset<15010> > dp[15010];
bitset<15010> tmp;
ll ans = INF;
ll I, J, K;
vector<ll> box;
priority_queue<pll> pq2;
vector<ll> ans2[15010];
int main(void)
{
fastio
cin >> n;
for(ll i = 1 ; i <= n ; i++)
{
cin >> a[i];
sum += a[i];
pq.push(a[i]);
}
cin >> m;
for(ll i = 1 ; i <= m ; i++)
cin >> b[i];
now = sum, gaet = 0;
for(ll i = sum ; i >= 1 ; i--)
{
while(!pq.empty() && pq.top() >= i)
{
now -= pq.top();
gaet++;
pq.pop();
}
S[i] = now + gaet * i;
}
for(ll i = 0 ; i <= sum ; i++)
{
dp[i].push_back(tmp);
for(ll j = 1 ; j <= m ; j++)
{
if(b[j] * i <= sum)
dp[i].push_back(tmp);
else
break;
}
}
dp[0].push_back(tmp);
for(ll j = 0 ; j < (ll)dp[0].size() ; j++)
dp[0][j].set(0, 1);
for(ll i = 1 ; i <= sum ; i++)
{
for(ll j = S[i - 1] + 1 ; j <= S[i] ; j++)
tmp.set(j, 1);
ll siz = (ll)dp[i].size() - 1;
ll siz2 = (ll)dp[i - 1].size() - 1;
for(ll j = siz ; j >= 1 ; j--)
{
if(j < siz)
dp[i][j] |= dp[i][j + 1];
if(j <= siz2)
dp[i][j] |= (dp[i - 1][j] << b[j]);
dp[i][j] &= tmp;
}
}
for(ll i = 0 ; i <= sum ; i++)
{
ll siz = (ll)dp[i].size() - 1;
for(ll j = 1 ; j <= siz ; j++)
{
if(dp[i][j][sum])
{
if(ans > i)
{
ans = i;
I = i, J = j, K = sum;
}
}
}
}
if(ans == INF)
{
cout << -1;
return 0;
}
cout << ans en;
while(1)
{
if(I == 0)
break;
if(J < (ll)dp[I].size() - 1 && dp[I][J + 1][K])
{
J = J + 1;
continue;
}
box.push_back(b[J]);
I = I - 1, K = K - b[J];
}
ll num = 1;
for(auto &i : box)
pq2.push({i, num++});
for(ll i = 1 ; i <= n ; i++)
{
vector<pll> tmp3;
for(ll j = 0 ; j < a[i] ; j++)
{
tmp3.push_back(pq2.top());
pq2.pop();
}
for(auto &j : tmp3)
{
ans2[j.se].push_back(i);
if(j.fi > 1)
pq2.push({j.fi - 1, j.se});
}
}
for(ll i = 1 ; i <= ans ; i++)
{
cout << (ll)ans2[i].size() sp;
for(auto &j : ans2[i])
cout << j sp;
cout en;
}
return 0;
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1 ms |
1116 KB |
Output is correct |
2 |
Correct |
1 ms |
1172 KB |
Output is correct |
3 |
Correct |
1 ms |
1116 KB |
Output is correct |
4 |
Correct |
1 ms |
1116 KB |
Output is correct |
5 |
Correct |
1 ms |
1116 KB |
Output is correct |
6 |
Correct |
1 ms |
1116 KB |
Output is correct |
7 |
Correct |
1 ms |
1116 KB |
Output is correct |
8 |
Correct |
2 ms |
2908 KB |
Output is correct |
9 |
Correct |
1 ms |
1884 KB |
Output is correct |
10 |
Correct |
8 ms |
9480 KB |
Output is correct |
11 |
Correct |
2 ms |
2996 KB |
Output is correct |
12 |
Correct |
4 ms |
5724 KB |
Output is correct |
13 |
Correct |
2 ms |
2956 KB |
Output is correct |
14 |
Correct |
2 ms |
3252 KB |
Output is correct |
15 |
Correct |
2 ms |
3252 KB |
Output is correct |
16 |
Correct |
2 ms |
3252 KB |
Output is correct |
17 |
Correct |
1 ms |
2396 KB |
Output is correct |
18 |
Correct |
2 ms |
3160 KB |
Output is correct |
19 |
Correct |
1 ms |
2140 KB |
Output is correct |
20 |
Correct |
1 ms |
2392 KB |
Output is correct |
21 |
Correct |
3 ms |
2956 KB |
Output is correct |
22 |
Correct |
4 ms |
5384 KB |
Output is correct |
23 |
Correct |
3 ms |
4788 KB |
Output is correct |
24 |
Correct |
2 ms |
3360 KB |
Output is correct |
25 |
Correct |
3 ms |
3164 KB |
Output is correct |
26 |
Correct |
1 ms |
2396 KB |
Output is correct |
27 |
Correct |
2 ms |
2140 KB |
Output is correct |
28 |
Correct |
2 ms |
2740 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1 ms |
1116 KB |
Output is correct |
2 |
Correct |
1 ms |
1116 KB |
Output is correct |
3 |
Correct |
1 ms |
1116 KB |
Output is correct |
4 |
Correct |
1 ms |
1116 KB |
Output is correct |
5 |
Correct |
2 ms |
2908 KB |
Output is correct |
6 |
Correct |
1 ms |
1884 KB |
Output is correct |
7 |
Correct |
1 ms |
1116 KB |
Output is correct |
8 |
Correct |
2 ms |
2908 KB |
Output is correct |
9 |
Correct |
9 ms |
12436 KB |
Output is correct |
10 |
Correct |
43 ms |
57768 KB |
Output is correct |
11 |
Correct |
1 ms |
1116 KB |
Output is correct |
12 |
Correct |
1 ms |
1116 KB |
Output is correct |
13 |
Correct |
1 ms |
1116 KB |
Output is correct |
14 |
Correct |
1 ms |
1116 KB |
Output is correct |
15 |
Correct |
1 ms |
1116 KB |
Output is correct |
16 |
Correct |
1 ms |
2140 KB |
Output is correct |
17 |
Correct |
1 ms |
2140 KB |
Output is correct |
18 |
Correct |
23 ms |
36188 KB |
Output is correct |
19 |
Correct |
25 ms |
38528 KB |
Output is correct |
20 |
Correct |
15 ms |
29532 KB |
Output is correct |
21 |
Correct |
15 ms |
29276 KB |
Output is correct |
22 |
Correct |
14 ms |
28764 KB |
Output is correct |
23 |
Correct |
3 ms |
2972 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1 ms |
1116 KB |
Output is correct |
2 |
Correct |
1 ms |
1116 KB |
Output is correct |
3 |
Correct |
1 ms |
1116 KB |
Output is correct |
4 |
Correct |
1 ms |
1116 KB |
Output is correct |
5 |
Correct |
1 ms |
1116 KB |
Output is correct |
6 |
Correct |
1 ms |
1116 KB |
Output is correct |
7 |
Correct |
1 ms |
1116 KB |
Output is correct |
8 |
Correct |
1 ms |
1116 KB |
Output is correct |
9 |
Correct |
1 ms |
1116 KB |
Output is correct |
10 |
Correct |
1 ms |
1116 KB |
Output is correct |
11 |
Correct |
1 ms |
1116 KB |
Output is correct |
12 |
Correct |
1 ms |
1116 KB |
Output is correct |
13 |
Correct |
1 ms |
1116 KB |
Output is correct |
14 |
Correct |
1 ms |
1116 KB |
Output is correct |
15 |
Correct |
1 ms |
1116 KB |
Output is correct |
16 |
Correct |
1 ms |
1116 KB |
Output is correct |
17 |
Correct |
1 ms |
1116 KB |
Output is correct |
18 |
Correct |
1 ms |
1172 KB |
Output is correct |
19 |
Correct |
1 ms |
1116 KB |
Output is correct |
20 |
Correct |
1 ms |
1116 KB |
Output is correct |
21 |
Correct |
1 ms |
1164 KB |
Output is correct |
22 |
Correct |
1 ms |
1116 KB |
Output is correct |
23 |
Correct |
1 ms |
1116 KB |
Output is correct |
24 |
Correct |
1 ms |
1116 KB |
Output is correct |
25 |
Correct |
1 ms |
1116 KB |
Output is correct |
26 |
Correct |
1 ms |
1116 KB |
Output is correct |
27 |
Correct |
1 ms |
1116 KB |
Output is correct |
28 |
Correct |
1 ms |
1116 KB |
Output is correct |
29 |
Correct |
1 ms |
1200 KB |
Output is correct |
30 |
Correct |
1 ms |
1116 KB |
Output is correct |
31 |
Correct |
1 ms |
1116 KB |
Output is correct |
32 |
Correct |
1 ms |
1116 KB |
Output is correct |
33 |
Correct |
1 ms |
1116 KB |
Output is correct |
34 |
Correct |
1 ms |
1116 KB |
Output is correct |
35 |
Correct |
1 ms |
1116 KB |
Output is correct |
36 |
Correct |
1 ms |
1116 KB |
Output is correct |
37 |
Correct |
1 ms |
1116 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1 ms |
1116 KB |
Output is correct |
2 |
Correct |
1 ms |
1172 KB |
Output is correct |
3 |
Correct |
1 ms |
1116 KB |
Output is correct |
4 |
Correct |
1 ms |
1116 KB |
Output is correct |
5 |
Correct |
1 ms |
1116 KB |
Output is correct |
6 |
Correct |
1 ms |
1116 KB |
Output is correct |
7 |
Correct |
1 ms |
1116 KB |
Output is correct |
8 |
Correct |
2 ms |
2908 KB |
Output is correct |
9 |
Correct |
1 ms |
1884 KB |
Output is correct |
10 |
Correct |
8 ms |
9480 KB |
Output is correct |
11 |
Correct |
2 ms |
2996 KB |
Output is correct |
12 |
Correct |
4 ms |
5724 KB |
Output is correct |
13 |
Correct |
2 ms |
2956 KB |
Output is correct |
14 |
Correct |
2 ms |
3252 KB |
Output is correct |
15 |
Correct |
2 ms |
3252 KB |
Output is correct |
16 |
Correct |
2 ms |
3252 KB |
Output is correct |
17 |
Correct |
1 ms |
2396 KB |
Output is correct |
18 |
Correct |
2 ms |
3160 KB |
Output is correct |
19 |
Correct |
1 ms |
2140 KB |
Output is correct |
20 |
Correct |
1 ms |
2392 KB |
Output is correct |
21 |
Correct |
3 ms |
2956 KB |
Output is correct |
22 |
Correct |
4 ms |
5384 KB |
Output is correct |
23 |
Correct |
3 ms |
4788 KB |
Output is correct |
24 |
Correct |
2 ms |
3360 KB |
Output is correct |
25 |
Correct |
3 ms |
3164 KB |
Output is correct |
26 |
Correct |
1 ms |
2396 KB |
Output is correct |
27 |
Correct |
2 ms |
2140 KB |
Output is correct |
28 |
Correct |
2 ms |
2740 KB |
Output is correct |
29 |
Correct |
1 ms |
1116 KB |
Output is correct |
30 |
Correct |
1 ms |
1116 KB |
Output is correct |
31 |
Correct |
1 ms |
1116 KB |
Output is correct |
32 |
Correct |
1 ms |
1116 KB |
Output is correct |
33 |
Correct |
1 ms |
1116 KB |
Output is correct |
34 |
Correct |
1 ms |
1116 KB |
Output is correct |
35 |
Correct |
1 ms |
1116 KB |
Output is correct |
36 |
Correct |
1 ms |
1116 KB |
Output is correct |
37 |
Correct |
1 ms |
1116 KB |
Output is correct |
38 |
Correct |
1 ms |
1116 KB |
Output is correct |
39 |
Correct |
1 ms |
1116 KB |
Output is correct |
40 |
Correct |
1 ms |
1116 KB |
Output is correct |
41 |
Correct |
1 ms |
1116 KB |
Output is correct |
42 |
Correct |
1 ms |
1116 KB |
Output is correct |
43 |
Correct |
1 ms |
1116 KB |
Output is correct |
44 |
Correct |
1 ms |
1116 KB |
Output is correct |
45 |
Correct |
1 ms |
1116 KB |
Output is correct |
46 |
Correct |
1 ms |
1172 KB |
Output is correct |
47 |
Correct |
1 ms |
1116 KB |
Output is correct |
48 |
Correct |
1 ms |
1116 KB |
Output is correct |
49 |
Correct |
1 ms |
1164 KB |
Output is correct |
50 |
Correct |
1 ms |
1116 KB |
Output is correct |
51 |
Correct |
1 ms |
1116 KB |
Output is correct |
52 |
Correct |
1 ms |
1116 KB |
Output is correct |
53 |
Correct |
1 ms |
1116 KB |
Output is correct |
54 |
Correct |
1 ms |
1116 KB |
Output is correct |
55 |
Correct |
1 ms |
1116 KB |
Output is correct |
56 |
Correct |
1 ms |
1116 KB |
Output is correct |
57 |
Correct |
1 ms |
1200 KB |
Output is correct |
58 |
Correct |
1 ms |
1116 KB |
Output is correct |
59 |
Correct |
1 ms |
1116 KB |
Output is correct |
60 |
Correct |
1 ms |
1116 KB |
Output is correct |
61 |
Correct |
1 ms |
1116 KB |
Output is correct |
62 |
Correct |
1 ms |
1116 KB |
Output is correct |
63 |
Correct |
1 ms |
1116 KB |
Output is correct |
64 |
Correct |
1 ms |
1116 KB |
Output is correct |
65 |
Correct |
1 ms |
1116 KB |
Output is correct |
66 |
Correct |
1 ms |
1116 KB |
Output is correct |
67 |
Correct |
2 ms |
2908 KB |
Output is correct |
68 |
Correct |
1 ms |
2140 KB |
Output is correct |
69 |
Correct |
1 ms |
2140 KB |
Output is correct |
70 |
Correct |
1 ms |
2396 KB |
Output is correct |
71 |
Correct |
2 ms |
3932 KB |
Output is correct |
72 |
Correct |
2 ms |
3164 KB |
Output is correct |
73 |
Correct |
1 ms |
2140 KB |
Output is correct |
74 |
Correct |
1 ms |
2396 KB |
Output is correct |
75 |
Correct |
2 ms |
3932 KB |
Output is correct |
76 |
Correct |
2 ms |
3420 KB |
Output is correct |
77 |
Correct |
2 ms |
3932 KB |
Output is correct |
78 |
Correct |
2 ms |
3420 KB |
Output is correct |
79 |
Correct |
3 ms |
4028 KB |
Output is correct |
80 |
Correct |
3 ms |
4188 KB |
Output is correct |
81 |
Correct |
2 ms |
2396 KB |
Output is correct |
82 |
Correct |
3 ms |
4188 KB |
Output is correct |
83 |
Correct |
1 ms |
2152 KB |
Output is correct |
84 |
Correct |
3 ms |
4700 KB |
Output is correct |
85 |
Correct |
3 ms |
3932 KB |
Output is correct |
86 |
Correct |
4 ms |
5468 KB |
Output is correct |
87 |
Correct |
4 ms |
4956 KB |
Output is correct |
88 |
Correct |
4 ms |
5212 KB |
Output is correct |
89 |
Correct |
4 ms |
5468 KB |
Output is correct |
90 |
Correct |
3 ms |
5212 KB |
Output is correct |
91 |
Correct |
3 ms |
5112 KB |
Output is correct |
92 |
Correct |
5 ms |
6292 KB |
Output is correct |
93 |
Correct |
5 ms |
6152 KB |
Output is correct |
94 |
Correct |
4 ms |
6068 KB |
Output is correct |
95 |
Correct |
3 ms |
4956 KB |
Output is correct |
96 |
Correct |
3 ms |
4188 KB |
Output is correct |
97 |
Correct |
4 ms |
4188 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1 ms |
1116 KB |
Output is correct |
2 |
Correct |
1 ms |
1172 KB |
Output is correct |
3 |
Correct |
1 ms |
1116 KB |
Output is correct |
4 |
Correct |
1 ms |
1116 KB |
Output is correct |
5 |
Correct |
1 ms |
1116 KB |
Output is correct |
6 |
Correct |
1 ms |
1116 KB |
Output is correct |
7 |
Correct |
1 ms |
1116 KB |
Output is correct |
8 |
Correct |
2 ms |
2908 KB |
Output is correct |
9 |
Correct |
1 ms |
1884 KB |
Output is correct |
10 |
Correct |
8 ms |
9480 KB |
Output is correct |
11 |
Correct |
2 ms |
2996 KB |
Output is correct |
12 |
Correct |
4 ms |
5724 KB |
Output is correct |
13 |
Correct |
2 ms |
2956 KB |
Output is correct |
14 |
Correct |
2 ms |
3252 KB |
Output is correct |
15 |
Correct |
2 ms |
3252 KB |
Output is correct |
16 |
Correct |
2 ms |
3252 KB |
Output is correct |
17 |
Correct |
1 ms |
2396 KB |
Output is correct |
18 |
Correct |
2 ms |
3160 KB |
Output is correct |
19 |
Correct |
1 ms |
2140 KB |
Output is correct |
20 |
Correct |
1 ms |
2392 KB |
Output is correct |
21 |
Correct |
3 ms |
2956 KB |
Output is correct |
22 |
Correct |
4 ms |
5384 KB |
Output is correct |
23 |
Correct |
3 ms |
4788 KB |
Output is correct |
24 |
Correct |
2 ms |
3360 KB |
Output is correct |
25 |
Correct |
3 ms |
3164 KB |
Output is correct |
26 |
Correct |
1 ms |
2396 KB |
Output is correct |
27 |
Correct |
2 ms |
2140 KB |
Output is correct |
28 |
Correct |
2 ms |
2740 KB |
Output is correct |
29 |
Correct |
1 ms |
1116 KB |
Output is correct |
30 |
Correct |
1 ms |
1116 KB |
Output is correct |
31 |
Correct |
1 ms |
1116 KB |
Output is correct |
32 |
Correct |
1 ms |
1116 KB |
Output is correct |
33 |
Correct |
1 ms |
1116 KB |
Output is correct |
34 |
Correct |
1 ms |
1116 KB |
Output is correct |
35 |
Correct |
1 ms |
1116 KB |
Output is correct |
36 |
Correct |
1 ms |
1116 KB |
Output is correct |
37 |
Correct |
1 ms |
1116 KB |
Output is correct |
38 |
Correct |
1 ms |
1116 KB |
Output is correct |
39 |
Correct |
1 ms |
1116 KB |
Output is correct |
40 |
Correct |
1 ms |
1116 KB |
Output is correct |
41 |
Correct |
1 ms |
1116 KB |
Output is correct |
42 |
Correct |
1 ms |
1116 KB |
Output is correct |
43 |
Correct |
1 ms |
1116 KB |
Output is correct |
44 |
Correct |
1 ms |
1116 KB |
Output is correct |
45 |
Correct |
1 ms |
1116 KB |
Output is correct |
46 |
Correct |
1 ms |
1172 KB |
Output is correct |
47 |
Correct |
1 ms |
1116 KB |
Output is correct |
48 |
Correct |
1 ms |
1116 KB |
Output is correct |
49 |
Correct |
1 ms |
1164 KB |
Output is correct |
50 |
Correct |
1 ms |
1116 KB |
Output is correct |
51 |
Correct |
1 ms |
1116 KB |
Output is correct |
52 |
Correct |
1 ms |
1116 KB |
Output is correct |
53 |
Correct |
1 ms |
1116 KB |
Output is correct |
54 |
Correct |
1 ms |
1116 KB |
Output is correct |
55 |
Correct |
1 ms |
1116 KB |
Output is correct |
56 |
Correct |
1 ms |
1116 KB |
Output is correct |
57 |
Correct |
1 ms |
1200 KB |
Output is correct |
58 |
Correct |
1 ms |
1116 KB |
Output is correct |
59 |
Correct |
1 ms |
1116 KB |
Output is correct |
60 |
Correct |
1 ms |
1116 KB |
Output is correct |
61 |
Correct |
1 ms |
1116 KB |
Output is correct |
62 |
Correct |
1 ms |
1116 KB |
Output is correct |
63 |
Correct |
1 ms |
1116 KB |
Output is correct |
64 |
Correct |
1 ms |
1116 KB |
Output is correct |
65 |
Correct |
1 ms |
1116 KB |
Output is correct |
66 |
Correct |
1 ms |
1116 KB |
Output is correct |
67 |
Correct |
2 ms |
2908 KB |
Output is correct |
68 |
Correct |
1 ms |
2140 KB |
Output is correct |
69 |
Correct |
1 ms |
2140 KB |
Output is correct |
70 |
Correct |
1 ms |
2396 KB |
Output is correct |
71 |
Correct |
2 ms |
3932 KB |
Output is correct |
72 |
Correct |
2 ms |
3164 KB |
Output is correct |
73 |
Correct |
1 ms |
2140 KB |
Output is correct |
74 |
Correct |
1 ms |
2396 KB |
Output is correct |
75 |
Correct |
2 ms |
3932 KB |
Output is correct |
76 |
Correct |
2 ms |
3420 KB |
Output is correct |
77 |
Correct |
2 ms |
3932 KB |
Output is correct |
78 |
Correct |
2 ms |
3420 KB |
Output is correct |
79 |
Correct |
3 ms |
4028 KB |
Output is correct |
80 |
Correct |
3 ms |
4188 KB |
Output is correct |
81 |
Correct |
2 ms |
2396 KB |
Output is correct |
82 |
Correct |
3 ms |
4188 KB |
Output is correct |
83 |
Correct |
1 ms |
2152 KB |
Output is correct |
84 |
Correct |
3 ms |
4700 KB |
Output is correct |
85 |
Correct |
3 ms |
3932 KB |
Output is correct |
86 |
Correct |
4 ms |
5468 KB |
Output is correct |
87 |
Correct |
4 ms |
4956 KB |
Output is correct |
88 |
Correct |
4 ms |
5212 KB |
Output is correct |
89 |
Correct |
4 ms |
5468 KB |
Output is correct |
90 |
Correct |
3 ms |
5212 KB |
Output is correct |
91 |
Correct |
3 ms |
5112 KB |
Output is correct |
92 |
Correct |
5 ms |
6292 KB |
Output is correct |
93 |
Correct |
5 ms |
6152 KB |
Output is correct |
94 |
Correct |
4 ms |
6068 KB |
Output is correct |
95 |
Correct |
3 ms |
4956 KB |
Output is correct |
96 |
Correct |
3 ms |
4188 KB |
Output is correct |
97 |
Correct |
4 ms |
4188 KB |
Output is correct |
98 |
Correct |
9 ms |
12436 KB |
Output is correct |
99 |
Correct |
2 ms |
2908 KB |
Output is correct |
100 |
Correct |
15 ms |
15964 KB |
Output is correct |
101 |
Correct |
6 ms |
9820 KB |
Output is correct |
102 |
Correct |
6 ms |
10076 KB |
Output is correct |
103 |
Correct |
22 ms |
26972 KB |
Output is correct |
104 |
Correct |
20 ms |
25436 KB |
Output is correct |
105 |
Correct |
38 ms |
41320 KB |
Output is correct |
106 |
Correct |
42 ms |
43432 KB |
Output is correct |
107 |
Correct |
34 ms |
37176 KB |
Output is correct |
108 |
Correct |
26 ms |
30556 KB |
Output is correct |
109 |
Correct |
17 ms |
20548 KB |
Output is correct |
110 |
Correct |
24 ms |
20316 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1 ms |
1116 KB |
Output is correct |
2 |
Correct |
1 ms |
1172 KB |
Output is correct |
3 |
Correct |
1 ms |
1116 KB |
Output is correct |
4 |
Correct |
1 ms |
1116 KB |
Output is correct |
5 |
Correct |
1 ms |
1116 KB |
Output is correct |
6 |
Correct |
1 ms |
1116 KB |
Output is correct |
7 |
Correct |
1 ms |
1116 KB |
Output is correct |
8 |
Correct |
2 ms |
2908 KB |
Output is correct |
9 |
Correct |
1 ms |
1884 KB |
Output is correct |
10 |
Correct |
8 ms |
9480 KB |
Output is correct |
11 |
Correct |
2 ms |
2996 KB |
Output is correct |
12 |
Correct |
4 ms |
5724 KB |
Output is correct |
13 |
Correct |
2 ms |
2956 KB |
Output is correct |
14 |
Correct |
2 ms |
3252 KB |
Output is correct |
15 |
Correct |
2 ms |
3252 KB |
Output is correct |
16 |
Correct |
2 ms |
3252 KB |
Output is correct |
17 |
Correct |
1 ms |
2396 KB |
Output is correct |
18 |
Correct |
2 ms |
3160 KB |
Output is correct |
19 |
Correct |
1 ms |
2140 KB |
Output is correct |
20 |
Correct |
1 ms |
2392 KB |
Output is correct |
21 |
Correct |
3 ms |
2956 KB |
Output is correct |
22 |
Correct |
4 ms |
5384 KB |
Output is correct |
23 |
Correct |
3 ms |
4788 KB |
Output is correct |
24 |
Correct |
2 ms |
3360 KB |
Output is correct |
25 |
Correct |
3 ms |
3164 KB |
Output is correct |
26 |
Correct |
1 ms |
2396 KB |
Output is correct |
27 |
Correct |
2 ms |
2140 KB |
Output is correct |
28 |
Correct |
2 ms |
2740 KB |
Output is correct |
29 |
Correct |
1 ms |
1116 KB |
Output is correct |
30 |
Correct |
1 ms |
1116 KB |
Output is correct |
31 |
Correct |
1 ms |
1116 KB |
Output is correct |
32 |
Correct |
1 ms |
1116 KB |
Output is correct |
33 |
Correct |
2 ms |
2908 KB |
Output is correct |
34 |
Correct |
1 ms |
1884 KB |
Output is correct |
35 |
Correct |
1 ms |
1116 KB |
Output is correct |
36 |
Correct |
2 ms |
2908 KB |
Output is correct |
37 |
Correct |
9 ms |
12436 KB |
Output is correct |
38 |
Correct |
43 ms |
57768 KB |
Output is correct |
39 |
Correct |
1 ms |
1116 KB |
Output is correct |
40 |
Correct |
1 ms |
1116 KB |
Output is correct |
41 |
Correct |
1 ms |
1116 KB |
Output is correct |
42 |
Correct |
1 ms |
1116 KB |
Output is correct |
43 |
Correct |
1 ms |
1116 KB |
Output is correct |
44 |
Correct |
1 ms |
2140 KB |
Output is correct |
45 |
Correct |
1 ms |
2140 KB |
Output is correct |
46 |
Correct |
23 ms |
36188 KB |
Output is correct |
47 |
Correct |
25 ms |
38528 KB |
Output is correct |
48 |
Correct |
15 ms |
29532 KB |
Output is correct |
49 |
Correct |
15 ms |
29276 KB |
Output is correct |
50 |
Correct |
14 ms |
28764 KB |
Output is correct |
51 |
Correct |
3 ms |
2972 KB |
Output is correct |
52 |
Correct |
1 ms |
1116 KB |
Output is correct |
53 |
Correct |
1 ms |
1116 KB |
Output is correct |
54 |
Correct |
1 ms |
1116 KB |
Output is correct |
55 |
Correct |
1 ms |
1116 KB |
Output is correct |
56 |
Correct |
1 ms |
1116 KB |
Output is correct |
57 |
Correct |
1 ms |
1116 KB |
Output is correct |
58 |
Correct |
1 ms |
1116 KB |
Output is correct |
59 |
Correct |
1 ms |
1116 KB |
Output is correct |
60 |
Correct |
1 ms |
1116 KB |
Output is correct |
61 |
Correct |
1 ms |
1116 KB |
Output is correct |
62 |
Correct |
1 ms |
1116 KB |
Output is correct |
63 |
Correct |
1 ms |
1116 KB |
Output is correct |
64 |
Correct |
1 ms |
1116 KB |
Output is correct |
65 |
Correct |
1 ms |
1116 KB |
Output is correct |
66 |
Correct |
1 ms |
1116 KB |
Output is correct |
67 |
Correct |
1 ms |
1116 KB |
Output is correct |
68 |
Correct |
1 ms |
1116 KB |
Output is correct |
69 |
Correct |
1 ms |
1172 KB |
Output is correct |
70 |
Correct |
1 ms |
1116 KB |
Output is correct |
71 |
Correct |
1 ms |
1116 KB |
Output is correct |
72 |
Correct |
1 ms |
1164 KB |
Output is correct |
73 |
Correct |
1 ms |
1116 KB |
Output is correct |
74 |
Correct |
1 ms |
1116 KB |
Output is correct |
75 |
Correct |
1 ms |
1116 KB |
Output is correct |
76 |
Correct |
1 ms |
1116 KB |
Output is correct |
77 |
Correct |
1 ms |
1116 KB |
Output is correct |
78 |
Correct |
1 ms |
1116 KB |
Output is correct |
79 |
Correct |
1 ms |
1116 KB |
Output is correct |
80 |
Correct |
1 ms |
1200 KB |
Output is correct |
81 |
Correct |
1 ms |
1116 KB |
Output is correct |
82 |
Correct |
1 ms |
1116 KB |
Output is correct |
83 |
Correct |
1 ms |
1116 KB |
Output is correct |
84 |
Correct |
1 ms |
1116 KB |
Output is correct |
85 |
Correct |
1 ms |
1116 KB |
Output is correct |
86 |
Correct |
1 ms |
1116 KB |
Output is correct |
87 |
Correct |
1 ms |
1116 KB |
Output is correct |
88 |
Correct |
1 ms |
1116 KB |
Output is correct |
89 |
Correct |
1 ms |
1116 KB |
Output is correct |
90 |
Correct |
2 ms |
2908 KB |
Output is correct |
91 |
Correct |
1 ms |
2140 KB |
Output is correct |
92 |
Correct |
1 ms |
2140 KB |
Output is correct |
93 |
Correct |
1 ms |
2396 KB |
Output is correct |
94 |
Correct |
2 ms |
3932 KB |
Output is correct |
95 |
Correct |
2 ms |
3164 KB |
Output is correct |
96 |
Correct |
1 ms |
2140 KB |
Output is correct |
97 |
Correct |
1 ms |
2396 KB |
Output is correct |
98 |
Correct |
2 ms |
3932 KB |
Output is correct |
99 |
Correct |
2 ms |
3420 KB |
Output is correct |
100 |
Correct |
2 ms |
3932 KB |
Output is correct |
101 |
Correct |
2 ms |
3420 KB |
Output is correct |
102 |
Correct |
3 ms |
4028 KB |
Output is correct |
103 |
Correct |
3 ms |
4188 KB |
Output is correct |
104 |
Correct |
2 ms |
2396 KB |
Output is correct |
105 |
Correct |
3 ms |
4188 KB |
Output is correct |
106 |
Correct |
1 ms |
2152 KB |
Output is correct |
107 |
Correct |
3 ms |
4700 KB |
Output is correct |
108 |
Correct |
3 ms |
3932 KB |
Output is correct |
109 |
Correct |
4 ms |
5468 KB |
Output is correct |
110 |
Correct |
4 ms |
4956 KB |
Output is correct |
111 |
Correct |
4 ms |
5212 KB |
Output is correct |
112 |
Correct |
4 ms |
5468 KB |
Output is correct |
113 |
Correct |
3 ms |
5212 KB |
Output is correct |
114 |
Correct |
3 ms |
5112 KB |
Output is correct |
115 |
Correct |
5 ms |
6292 KB |
Output is correct |
116 |
Correct |
5 ms |
6152 KB |
Output is correct |
117 |
Correct |
4 ms |
6068 KB |
Output is correct |
118 |
Correct |
3 ms |
4956 KB |
Output is correct |
119 |
Correct |
3 ms |
4188 KB |
Output is correct |
120 |
Correct |
4 ms |
4188 KB |
Output is correct |
121 |
Correct |
9 ms |
12436 KB |
Output is correct |
122 |
Correct |
2 ms |
2908 KB |
Output is correct |
123 |
Correct |
15 ms |
15964 KB |
Output is correct |
124 |
Correct |
6 ms |
9820 KB |
Output is correct |
125 |
Correct |
6 ms |
10076 KB |
Output is correct |
126 |
Correct |
22 ms |
26972 KB |
Output is correct |
127 |
Correct |
20 ms |
25436 KB |
Output is correct |
128 |
Correct |
38 ms |
41320 KB |
Output is correct |
129 |
Correct |
42 ms |
43432 KB |
Output is correct |
130 |
Correct |
34 ms |
37176 KB |
Output is correct |
131 |
Correct |
26 ms |
30556 KB |
Output is correct |
132 |
Correct |
17 ms |
20548 KB |
Output is correct |
133 |
Correct |
24 ms |
20316 KB |
Output is correct |
134 |
Correct |
55 ms |
72076 KB |
Output is correct |
135 |
Correct |
20 ms |
35420 KB |
Output is correct |
136 |
Correct |
17 ms |
29788 KB |
Output is correct |
137 |
Correct |
86 ms |
109236 KB |
Output is correct |
138 |
Correct |
105 ms |
114380 KB |
Output is correct |
139 |
Correct |
235 ms |
242520 KB |
Output is correct |
140 |
Correct |
222 ms |
249076 KB |
Output is correct |
141 |
Correct |
175 ms |
203696 KB |
Output is correct |
142 |
Correct |
155 ms |
173020 KB |
Output is correct |
143 |
Correct |
75 ms |
97660 KB |
Output is correct |
144 |
Correct |
120 ms |
97912 KB |
Output is correct |