#include<bits/stdc++.h>
using namespace std;
#define all(fl) fl.begin(),fl.end()
#define pb push_back
#define fi first
#define se second
#define for1(i,j,k) for(int i=j;i<=k;i++)
#define for2(i,j,k) for(int i=j;i>=k;i--)
#define for3(i,j,k,l) for(int i=j;i<=k;i+=l)
#define lb lower_bound
#define ub upper_bound
#define sz(a) (int)a.size()
#define pii pair<int,int>
#define pli pair<long long,int>
#define gcd __gcd
#define lcm(x,y) x*y/__gcd(x,y)
#define pil pair<int,long long>
#define pll pair<long long,long long>
#define eb emplace_back
const int maxn=3e5+9,maxm=20;
bool a[maxn][maxm+1];
int sum[maxm+1];
int mask[maxn];
pii f[1<<maxm];
pii add(pii p,int q){
if (q==0)return p;
if (p.fi==0){
p.fi=q;
}
else if (p.fi!=0&&p.se==0){
p.se=q;
}
return p;
}
pair<pii,pii> g[1<<maxm];
int nn(int x){
return __builtin_popcount(x);
}
int b[4];
pii add(pii &p, pii &q){
b[0]=p.fi,b[1]=p.se,b[2]=q.fi,b[3]=q.se;
sort(b,b+4);
vector<int>vcl;
vcl.pb(b[0]);
for1(i,1,3){
if (b[i]!=b[i-1])vcl.pb(b[i]);
}
if (sz(vcl)==0)return {0,0};
if (sz(vcl)==1)return {vcl[0],0};
return {vcl[0],vcl[1]};
}
#define piii pair<pii,pii>
pii c[4];
piii update(piii p, piii q){
c[0]=p.fi,c[1]=p.se,c[2]=q.fi,c[3]=q.se;
sort(c,c+4,greater<pii>());
if (c[0].fi==0)return {{0,0},{0,0}};
for1(i,1,3){
if (c[i].se!=c[0].se){
return {c[0],c[i]};
}
}
return {c[0],{0,0}};
}
signed main(){
ios_base::sync_with_stdio(0);
cin.tie(0);
//freopen("temp.INP","r",stdin);
//freopen("temp.OUT","w",stdout);
int n,m;
cin>>n>>m;
for1(i,1,n){
for1(j,1,m){
cin>>a[i][j];
sum[j]+=a[i][j];
if (!a[i][j]){
mask[i]|=(1<<(j-1));
//cout<<i<<" "<<j<<'\n';
}
}
f[mask[i]]=add(f[mask[i]],i);
}
for1(j,0,m-1){
for2(i,(1<<m)-1,0){
if (i>>j&1){
f[i-(1<<j)]=add(f[i-(1<<j)],f[i].fi);
f[i-(1<<j)]=add(f[i-(1<<j)],f[i].se);
}
}
}
for1(i,0,(1<<m)-1){
if (f[i].fi)g[i].fi={nn(i),f[i].fi};
if (f[i].se)g[i].se={nn(i),f[i].se};
}
for1(i,0,(1<<m)-1){
for1(j,0,m-1){
if (i>>j&1){
g[i]=update(g[i],g[i-(1<<j)]);
}
}
}
int limit=n/2;
for1(i,1,n){
int msk=0;
int ans=0;
int turn=0;
for1(j,1,m){
int nw=sum[j]-a[i][j];
if (nw==limit){
//can be 0
msk+=(1<<(j-1));
//cout<<j<<'\n';
if (a[i][j]==0)turn++;
}
else if (nw>limit){
ans++;
}
}
//cout<<msk<<'\n';
if (turn==g[msk].fi.fi)ans+=g[msk].se.fi;
else ans+=g[msk].fi.fi;
cout<<ans<<'\n';
}
//cout<<g[1890].fi<<" "<<g[1890].se;
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1 ms |
340 KB |
Output is correct |
2 |
Correct |
1 ms |
340 KB |
Output is correct |
3 |
Correct |
1 ms |
328 KB |
Output is correct |
4 |
Correct |
1 ms |
328 KB |
Output is correct |
5 |
Correct |
241 ms |
24944 KB |
Output is correct |
6 |
Correct |
206 ms |
24892 KB |
Output is correct |
7 |
Correct |
284 ms |
24840 KB |
Output is correct |
8 |
Correct |
312 ms |
24828 KB |
Output is correct |
9 |
Correct |
319 ms |
24856 KB |
Output is correct |
10 |
Correct |
287 ms |
24832 KB |
Output is correct |
11 |
Correct |
310 ms |
24908 KB |
Output is correct |
12 |
Correct |
309 ms |
24932 KB |
Output is correct |
13 |
Correct |
1 ms |
340 KB |
Output is correct |
14 |
Correct |
1 ms |
340 KB |
Output is correct |
15 |
Correct |
0 ms |
324 KB |
Output is correct |
16 |
Correct |
1 ms |
340 KB |
Output is correct |
17 |
Correct |
1 ms |
340 KB |
Output is correct |
18 |
Correct |
1 ms |
340 KB |
Output is correct |
19 |
Correct |
1 ms |
340 KB |
Output is correct |
20 |
Correct |
1 ms |
340 KB |
Output is correct |
21 |
Correct |
1 ms |
340 KB |
Output is correct |
22 |
Correct |
1 ms |
340 KB |
Output is correct |
23 |
Correct |
1 ms |
332 KB |
Output is correct |
24 |
Correct |
1 ms |
340 KB |
Output is correct |
25 |
Correct |
1 ms |
332 KB |
Output is correct |
26 |
Correct |
1 ms |
332 KB |
Output is correct |
27 |
Correct |
1 ms |
340 KB |
Output is correct |
28 |
Correct |
1 ms |
328 KB |
Output is correct |
29 |
Correct |
1 ms |
340 KB |
Output is correct |
30 |
Correct |
1 ms |
340 KB |
Output is correct |
31 |
Correct |
1 ms |
340 KB |
Output is correct |
32 |
Correct |
1 ms |
340 KB |
Output is correct |
33 |
Correct |
0 ms |
328 KB |
Output is correct |
34 |
Correct |
1 ms |
324 KB |
Output is correct |
35 |
Correct |
1 ms |
340 KB |
Output is correct |
36 |
Correct |
0 ms |
328 KB |
Output is correct |
37 |
Correct |
1 ms |
340 KB |
Output is correct |
38 |
Correct |
1 ms |
340 KB |
Output is correct |
39 |
Correct |
1 ms |
340 KB |
Output is correct |
40 |
Correct |
1 ms |
340 KB |
Output is correct |
41 |
Correct |
3 ms |
724 KB |
Output is correct |
42 |
Correct |
4 ms |
724 KB |
Output is correct |
43 |
Correct |
4 ms |
724 KB |
Output is correct |
44 |
Correct |
4 ms |
724 KB |
Output is correct |
45 |
Correct |
4 ms |
724 KB |
Output is correct |
46 |
Correct |
25 ms |
3400 KB |
Output is correct |
47 |
Correct |
32 ms |
3332 KB |
Output is correct |
48 |
Correct |
39 ms |
3416 KB |
Output is correct |
49 |
Correct |
36 ms |
3316 KB |
Output is correct |
50 |
Correct |
31 ms |
3412 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1 ms |
340 KB |
Output is correct |
2 |
Correct |
1 ms |
340 KB |
Output is correct |
3 |
Correct |
1 ms |
328 KB |
Output is correct |
4 |
Correct |
1 ms |
328 KB |
Output is correct |
5 |
Correct |
241 ms |
24944 KB |
Output is correct |
6 |
Correct |
206 ms |
24892 KB |
Output is correct |
7 |
Correct |
284 ms |
24840 KB |
Output is correct |
8 |
Correct |
312 ms |
24828 KB |
Output is correct |
9 |
Correct |
319 ms |
24856 KB |
Output is correct |
10 |
Correct |
287 ms |
24832 KB |
Output is correct |
11 |
Correct |
310 ms |
24908 KB |
Output is correct |
12 |
Correct |
309 ms |
24932 KB |
Output is correct |
13 |
Correct |
1 ms |
340 KB |
Output is correct |
14 |
Correct |
1 ms |
340 KB |
Output is correct |
15 |
Correct |
0 ms |
324 KB |
Output is correct |
16 |
Correct |
1 ms |
340 KB |
Output is correct |
17 |
Correct |
1 ms |
340 KB |
Output is correct |
18 |
Correct |
1 ms |
340 KB |
Output is correct |
19 |
Correct |
1 ms |
340 KB |
Output is correct |
20 |
Correct |
1 ms |
340 KB |
Output is correct |
21 |
Correct |
1 ms |
340 KB |
Output is correct |
22 |
Correct |
1 ms |
340 KB |
Output is correct |
23 |
Correct |
1 ms |
332 KB |
Output is correct |
24 |
Correct |
1 ms |
340 KB |
Output is correct |
25 |
Correct |
1 ms |
332 KB |
Output is correct |
26 |
Correct |
1 ms |
332 KB |
Output is correct |
27 |
Correct |
1 ms |
340 KB |
Output is correct |
28 |
Correct |
1 ms |
328 KB |
Output is correct |
29 |
Correct |
1 ms |
340 KB |
Output is correct |
30 |
Correct |
1 ms |
340 KB |
Output is correct |
31 |
Correct |
1 ms |
340 KB |
Output is correct |
32 |
Correct |
1 ms |
340 KB |
Output is correct |
33 |
Correct |
0 ms |
328 KB |
Output is correct |
34 |
Correct |
1 ms |
324 KB |
Output is correct |
35 |
Correct |
1 ms |
340 KB |
Output is correct |
36 |
Correct |
0 ms |
328 KB |
Output is correct |
37 |
Correct |
1 ms |
340 KB |
Output is correct |
38 |
Correct |
1 ms |
340 KB |
Output is correct |
39 |
Correct |
1 ms |
340 KB |
Output is correct |
40 |
Correct |
1 ms |
340 KB |
Output is correct |
41 |
Correct |
3 ms |
724 KB |
Output is correct |
42 |
Correct |
4 ms |
724 KB |
Output is correct |
43 |
Correct |
4 ms |
724 KB |
Output is correct |
44 |
Correct |
4 ms |
724 KB |
Output is correct |
45 |
Correct |
4 ms |
724 KB |
Output is correct |
46 |
Correct |
25 ms |
3400 KB |
Output is correct |
47 |
Correct |
32 ms |
3332 KB |
Output is correct |
48 |
Correct |
39 ms |
3416 KB |
Output is correct |
49 |
Correct |
36 ms |
3316 KB |
Output is correct |
50 |
Correct |
31 ms |
3412 KB |
Output is correct |
51 |
Correct |
240 ms |
25068 KB |
Output is correct |
52 |
Correct |
226 ms |
25164 KB |
Output is correct |
53 |
Correct |
259 ms |
25132 KB |
Output is correct |
54 |
Correct |
282 ms |
25104 KB |
Output is correct |
55 |
Correct |
1 ms |
336 KB |
Output is correct |
56 |
Correct |
32 ms |
3596 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1 ms |
340 KB |
Output is correct |
2 |
Correct |
47 ms |
7292 KB |
Output is correct |
3 |
Correct |
43 ms |
8428 KB |
Output is correct |
4 |
Correct |
43 ms |
8436 KB |
Output is correct |
5 |
Correct |
49 ms |
8528 KB |
Output is correct |
6 |
Correct |
34 ms |
8460 KB |
Output is correct |
7 |
Correct |
55 ms |
8392 KB |
Output is correct |
8 |
Correct |
1 ms |
324 KB |
Output is correct |
9 |
Correct |
1 ms |
340 KB |
Output is correct |
10 |
Correct |
0 ms |
324 KB |
Output is correct |
11 |
Correct |
1 ms |
340 KB |
Output is correct |
12 |
Correct |
1 ms |
340 KB |
Output is correct |
13 |
Correct |
1 ms |
340 KB |
Output is correct |
14 |
Correct |
1 ms |
340 KB |
Output is correct |
15 |
Correct |
1 ms |
340 KB |
Output is correct |
16 |
Correct |
1 ms |
340 KB |
Output is correct |
17 |
Correct |
2 ms |
340 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1 ms |
340 KB |
Output is correct |
2 |
Correct |
47 ms |
7292 KB |
Output is correct |
3 |
Correct |
43 ms |
8428 KB |
Output is correct |
4 |
Correct |
43 ms |
8436 KB |
Output is correct |
5 |
Correct |
49 ms |
8528 KB |
Output is correct |
6 |
Correct |
34 ms |
8460 KB |
Output is correct |
7 |
Correct |
55 ms |
8392 KB |
Output is correct |
8 |
Correct |
1 ms |
324 KB |
Output is correct |
9 |
Correct |
1 ms |
340 KB |
Output is correct |
10 |
Correct |
0 ms |
324 KB |
Output is correct |
11 |
Correct |
1 ms |
340 KB |
Output is correct |
12 |
Correct |
1 ms |
340 KB |
Output is correct |
13 |
Correct |
1 ms |
340 KB |
Output is correct |
14 |
Correct |
1 ms |
340 KB |
Output is correct |
15 |
Correct |
1 ms |
340 KB |
Output is correct |
16 |
Correct |
1 ms |
340 KB |
Output is correct |
17 |
Correct |
2 ms |
340 KB |
Output is correct |
18 |
Correct |
1 ms |
340 KB |
Output is correct |
19 |
Correct |
1 ms |
324 KB |
Output is correct |
20 |
Correct |
198 ms |
8492 KB |
Output is correct |
21 |
Correct |
177 ms |
8412 KB |
Output is correct |
22 |
Correct |
171 ms |
8520 KB |
Output is correct |
23 |
Correct |
172 ms |
7660 KB |
Output is correct |
24 |
Correct |
169 ms |
8524 KB |
Output is correct |
25 |
Correct |
177 ms |
8428 KB |
Output is correct |
26 |
Correct |
187 ms |
8464 KB |
Output is correct |
27 |
Correct |
1 ms |
324 KB |
Output is correct |
28 |
Correct |
0 ms |
340 KB |
Output is correct |
29 |
Correct |
1 ms |
340 KB |
Output is correct |
30 |
Correct |
1 ms |
340 KB |
Output is correct |
31 |
Correct |
1 ms |
324 KB |
Output is correct |
32 |
Correct |
1 ms |
320 KB |
Output is correct |
33 |
Correct |
1 ms |
340 KB |
Output is correct |
34 |
Correct |
1 ms |
340 KB |
Output is correct |
35 |
Correct |
1 ms |
340 KB |
Output is correct |
36 |
Correct |
1 ms |
340 KB |
Output is correct |
37 |
Correct |
1 ms |
340 KB |
Output is correct |
38 |
Correct |
0 ms |
340 KB |
Output is correct |
39 |
Correct |
1 ms |
340 KB |
Output is correct |
40 |
Correct |
1 ms |
340 KB |
Output is correct |
41 |
Correct |
1 ms |
340 KB |
Output is correct |
42 |
Correct |
1 ms |
340 KB |
Output is correct |
43 |
Correct |
1 ms |
340 KB |
Output is correct |
44 |
Correct |
1 ms |
340 KB |
Output is correct |
45 |
Correct |
1 ms |
340 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1 ms |
340 KB |
Output is correct |
2 |
Correct |
47 ms |
7292 KB |
Output is correct |
3 |
Correct |
43 ms |
8428 KB |
Output is correct |
4 |
Correct |
43 ms |
8436 KB |
Output is correct |
5 |
Correct |
49 ms |
8528 KB |
Output is correct |
6 |
Correct |
34 ms |
8460 KB |
Output is correct |
7 |
Correct |
55 ms |
8392 KB |
Output is correct |
8 |
Correct |
1 ms |
324 KB |
Output is correct |
9 |
Correct |
1 ms |
340 KB |
Output is correct |
10 |
Correct |
0 ms |
324 KB |
Output is correct |
11 |
Correct |
1 ms |
340 KB |
Output is correct |
12 |
Correct |
1 ms |
340 KB |
Output is correct |
13 |
Correct |
1 ms |
340 KB |
Output is correct |
14 |
Correct |
1 ms |
340 KB |
Output is correct |
15 |
Correct |
1 ms |
340 KB |
Output is correct |
16 |
Correct |
1 ms |
340 KB |
Output is correct |
17 |
Correct |
2 ms |
340 KB |
Output is correct |
18 |
Correct |
1 ms |
340 KB |
Output is correct |
19 |
Correct |
1 ms |
324 KB |
Output is correct |
20 |
Correct |
198 ms |
8492 KB |
Output is correct |
21 |
Correct |
177 ms |
8412 KB |
Output is correct |
22 |
Correct |
171 ms |
8520 KB |
Output is correct |
23 |
Correct |
172 ms |
7660 KB |
Output is correct |
24 |
Correct |
169 ms |
8524 KB |
Output is correct |
25 |
Correct |
177 ms |
8428 KB |
Output is correct |
26 |
Correct |
187 ms |
8464 KB |
Output is correct |
27 |
Correct |
1 ms |
324 KB |
Output is correct |
28 |
Correct |
0 ms |
340 KB |
Output is correct |
29 |
Correct |
1 ms |
340 KB |
Output is correct |
30 |
Correct |
1 ms |
340 KB |
Output is correct |
31 |
Correct |
1 ms |
324 KB |
Output is correct |
32 |
Correct |
1 ms |
320 KB |
Output is correct |
33 |
Correct |
1 ms |
340 KB |
Output is correct |
34 |
Correct |
1 ms |
340 KB |
Output is correct |
35 |
Correct |
1 ms |
340 KB |
Output is correct |
36 |
Correct |
1 ms |
340 KB |
Output is correct |
37 |
Correct |
1 ms |
340 KB |
Output is correct |
38 |
Correct |
0 ms |
340 KB |
Output is correct |
39 |
Correct |
1 ms |
340 KB |
Output is correct |
40 |
Correct |
1 ms |
340 KB |
Output is correct |
41 |
Correct |
1 ms |
340 KB |
Output is correct |
42 |
Correct |
1 ms |
340 KB |
Output is correct |
43 |
Correct |
1 ms |
340 KB |
Output is correct |
44 |
Correct |
1 ms |
340 KB |
Output is correct |
45 |
Correct |
1 ms |
340 KB |
Output is correct |
46 |
Correct |
2 ms |
328 KB |
Output is correct |
47 |
Correct |
252 ms |
8800 KB |
Output is correct |
48 |
Correct |
230 ms |
8684 KB |
Output is correct |
49 |
Correct |
236 ms |
8764 KB |
Output is correct |
50 |
Correct |
222 ms |
8016 KB |
Output is correct |
51 |
Correct |
203 ms |
8868 KB |
Output is correct |
52 |
Correct |
235 ms |
8908 KB |
Output is correct |
53 |
Correct |
256 ms |
9132 KB |
Output is correct |
54 |
Correct |
4 ms |
644 KB |
Output is correct |
55 |
Correct |
4 ms |
724 KB |
Output is correct |
56 |
Correct |
4 ms |
724 KB |
Output is correct |
57 |
Correct |
4 ms |
648 KB |
Output is correct |
58 |
Correct |
4 ms |
712 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1 ms |
340 KB |
Output is correct |
2 |
Correct |
47 ms |
7292 KB |
Output is correct |
3 |
Correct |
43 ms |
8428 KB |
Output is correct |
4 |
Correct |
43 ms |
8436 KB |
Output is correct |
5 |
Correct |
49 ms |
8528 KB |
Output is correct |
6 |
Correct |
34 ms |
8460 KB |
Output is correct |
7 |
Correct |
55 ms |
8392 KB |
Output is correct |
8 |
Correct |
1 ms |
324 KB |
Output is correct |
9 |
Correct |
1 ms |
340 KB |
Output is correct |
10 |
Correct |
0 ms |
324 KB |
Output is correct |
11 |
Correct |
1 ms |
340 KB |
Output is correct |
12 |
Correct |
1 ms |
340 KB |
Output is correct |
13 |
Correct |
1 ms |
340 KB |
Output is correct |
14 |
Correct |
1 ms |
340 KB |
Output is correct |
15 |
Correct |
1 ms |
340 KB |
Output is correct |
16 |
Correct |
1 ms |
340 KB |
Output is correct |
17 |
Correct |
2 ms |
340 KB |
Output is correct |
18 |
Correct |
1 ms |
340 KB |
Output is correct |
19 |
Correct |
1 ms |
324 KB |
Output is correct |
20 |
Correct |
198 ms |
8492 KB |
Output is correct |
21 |
Correct |
177 ms |
8412 KB |
Output is correct |
22 |
Correct |
171 ms |
8520 KB |
Output is correct |
23 |
Correct |
172 ms |
7660 KB |
Output is correct |
24 |
Correct |
169 ms |
8524 KB |
Output is correct |
25 |
Correct |
177 ms |
8428 KB |
Output is correct |
26 |
Correct |
187 ms |
8464 KB |
Output is correct |
27 |
Correct |
1 ms |
324 KB |
Output is correct |
28 |
Correct |
0 ms |
340 KB |
Output is correct |
29 |
Correct |
1 ms |
340 KB |
Output is correct |
30 |
Correct |
1 ms |
340 KB |
Output is correct |
31 |
Correct |
1 ms |
324 KB |
Output is correct |
32 |
Correct |
1 ms |
320 KB |
Output is correct |
33 |
Correct |
1 ms |
340 KB |
Output is correct |
34 |
Correct |
1 ms |
340 KB |
Output is correct |
35 |
Correct |
1 ms |
340 KB |
Output is correct |
36 |
Correct |
1 ms |
340 KB |
Output is correct |
37 |
Correct |
1 ms |
340 KB |
Output is correct |
38 |
Correct |
0 ms |
340 KB |
Output is correct |
39 |
Correct |
1 ms |
340 KB |
Output is correct |
40 |
Correct |
1 ms |
340 KB |
Output is correct |
41 |
Correct |
1 ms |
340 KB |
Output is correct |
42 |
Correct |
1 ms |
340 KB |
Output is correct |
43 |
Correct |
1 ms |
340 KB |
Output is correct |
44 |
Correct |
1 ms |
340 KB |
Output is correct |
45 |
Correct |
1 ms |
340 KB |
Output is correct |
46 |
Correct |
2 ms |
328 KB |
Output is correct |
47 |
Correct |
252 ms |
8800 KB |
Output is correct |
48 |
Correct |
230 ms |
8684 KB |
Output is correct |
49 |
Correct |
236 ms |
8764 KB |
Output is correct |
50 |
Correct |
222 ms |
8016 KB |
Output is correct |
51 |
Correct |
203 ms |
8868 KB |
Output is correct |
52 |
Correct |
235 ms |
8908 KB |
Output is correct |
53 |
Correct |
256 ms |
9132 KB |
Output is correct |
54 |
Correct |
4 ms |
644 KB |
Output is correct |
55 |
Correct |
4 ms |
724 KB |
Output is correct |
56 |
Correct |
4 ms |
724 KB |
Output is correct |
57 |
Correct |
4 ms |
648 KB |
Output is correct |
58 |
Correct |
4 ms |
712 KB |
Output is correct |
59 |
Correct |
285 ms |
10304 KB |
Output is correct |
60 |
Correct |
143 ms |
6732 KB |
Output is correct |
61 |
Correct |
159 ms |
6956 KB |
Output is correct |
62 |
Correct |
156 ms |
7100 KB |
Output is correct |
63 |
Correct |
298 ms |
10004 KB |
Output is correct |
64 |
Correct |
331 ms |
11500 KB |
Output is correct |
65 |
Correct |
331 ms |
11488 KB |
Output is correct |
66 |
Correct |
292 ms |
10680 KB |
Output is correct |
67 |
Correct |
261 ms |
11576 KB |
Output is correct |
68 |
Correct |
311 ms |
11484 KB |
Output is correct |
69 |
Correct |
330 ms |
11888 KB |
Output is correct |
70 |
Correct |
26 ms |
3300 KB |
Output is correct |
71 |
Correct |
30 ms |
3416 KB |
Output is correct |
72 |
Correct |
33 ms |
3380 KB |
Output is correct |
73 |
Correct |
31 ms |
3412 KB |
Output is correct |
74 |
Correct |
31 ms |
3424 KB |
Output is correct |
75 |
Correct |
34 ms |
3600 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1 ms |
340 KB |
Output is correct |
2 |
Correct |
1 ms |
340 KB |
Output is correct |
3 |
Correct |
1 ms |
328 KB |
Output is correct |
4 |
Correct |
1 ms |
328 KB |
Output is correct |
5 |
Correct |
241 ms |
24944 KB |
Output is correct |
6 |
Correct |
206 ms |
24892 KB |
Output is correct |
7 |
Correct |
284 ms |
24840 KB |
Output is correct |
8 |
Correct |
312 ms |
24828 KB |
Output is correct |
9 |
Correct |
319 ms |
24856 KB |
Output is correct |
10 |
Correct |
287 ms |
24832 KB |
Output is correct |
11 |
Correct |
310 ms |
24908 KB |
Output is correct |
12 |
Correct |
309 ms |
24932 KB |
Output is correct |
13 |
Correct |
1 ms |
340 KB |
Output is correct |
14 |
Correct |
1 ms |
340 KB |
Output is correct |
15 |
Correct |
0 ms |
324 KB |
Output is correct |
16 |
Correct |
1 ms |
340 KB |
Output is correct |
17 |
Correct |
1 ms |
340 KB |
Output is correct |
18 |
Correct |
1 ms |
340 KB |
Output is correct |
19 |
Correct |
1 ms |
340 KB |
Output is correct |
20 |
Correct |
1 ms |
340 KB |
Output is correct |
21 |
Correct |
1 ms |
340 KB |
Output is correct |
22 |
Correct |
1 ms |
340 KB |
Output is correct |
23 |
Correct |
1 ms |
332 KB |
Output is correct |
24 |
Correct |
1 ms |
340 KB |
Output is correct |
25 |
Correct |
1 ms |
332 KB |
Output is correct |
26 |
Correct |
1 ms |
332 KB |
Output is correct |
27 |
Correct |
1 ms |
340 KB |
Output is correct |
28 |
Correct |
1 ms |
328 KB |
Output is correct |
29 |
Correct |
1 ms |
340 KB |
Output is correct |
30 |
Correct |
1 ms |
340 KB |
Output is correct |
31 |
Correct |
1 ms |
340 KB |
Output is correct |
32 |
Correct |
1 ms |
340 KB |
Output is correct |
33 |
Correct |
0 ms |
328 KB |
Output is correct |
34 |
Correct |
1 ms |
324 KB |
Output is correct |
35 |
Correct |
1 ms |
340 KB |
Output is correct |
36 |
Correct |
0 ms |
328 KB |
Output is correct |
37 |
Correct |
1 ms |
340 KB |
Output is correct |
38 |
Correct |
1 ms |
340 KB |
Output is correct |
39 |
Correct |
1 ms |
340 KB |
Output is correct |
40 |
Correct |
1 ms |
340 KB |
Output is correct |
41 |
Correct |
3 ms |
724 KB |
Output is correct |
42 |
Correct |
4 ms |
724 KB |
Output is correct |
43 |
Correct |
4 ms |
724 KB |
Output is correct |
44 |
Correct |
4 ms |
724 KB |
Output is correct |
45 |
Correct |
4 ms |
724 KB |
Output is correct |
46 |
Correct |
25 ms |
3400 KB |
Output is correct |
47 |
Correct |
32 ms |
3332 KB |
Output is correct |
48 |
Correct |
39 ms |
3416 KB |
Output is correct |
49 |
Correct |
36 ms |
3316 KB |
Output is correct |
50 |
Correct |
31 ms |
3412 KB |
Output is correct |
51 |
Correct |
240 ms |
25068 KB |
Output is correct |
52 |
Correct |
226 ms |
25164 KB |
Output is correct |
53 |
Correct |
259 ms |
25132 KB |
Output is correct |
54 |
Correct |
282 ms |
25104 KB |
Output is correct |
55 |
Correct |
1 ms |
336 KB |
Output is correct |
56 |
Correct |
32 ms |
3596 KB |
Output is correct |
57 |
Correct |
1 ms |
340 KB |
Output is correct |
58 |
Correct |
47 ms |
7292 KB |
Output is correct |
59 |
Correct |
43 ms |
8428 KB |
Output is correct |
60 |
Correct |
43 ms |
8436 KB |
Output is correct |
61 |
Correct |
49 ms |
8528 KB |
Output is correct |
62 |
Correct |
34 ms |
8460 KB |
Output is correct |
63 |
Correct |
55 ms |
8392 KB |
Output is correct |
64 |
Correct |
1 ms |
324 KB |
Output is correct |
65 |
Correct |
1 ms |
340 KB |
Output is correct |
66 |
Correct |
0 ms |
324 KB |
Output is correct |
67 |
Correct |
1 ms |
340 KB |
Output is correct |
68 |
Correct |
1 ms |
340 KB |
Output is correct |
69 |
Correct |
1 ms |
340 KB |
Output is correct |
70 |
Correct |
1 ms |
340 KB |
Output is correct |
71 |
Correct |
1 ms |
340 KB |
Output is correct |
72 |
Correct |
1 ms |
340 KB |
Output is correct |
73 |
Correct |
2 ms |
340 KB |
Output is correct |
74 |
Correct |
1 ms |
340 KB |
Output is correct |
75 |
Correct |
1 ms |
324 KB |
Output is correct |
76 |
Correct |
198 ms |
8492 KB |
Output is correct |
77 |
Correct |
177 ms |
8412 KB |
Output is correct |
78 |
Correct |
171 ms |
8520 KB |
Output is correct |
79 |
Correct |
172 ms |
7660 KB |
Output is correct |
80 |
Correct |
169 ms |
8524 KB |
Output is correct |
81 |
Correct |
177 ms |
8428 KB |
Output is correct |
82 |
Correct |
187 ms |
8464 KB |
Output is correct |
83 |
Correct |
1 ms |
324 KB |
Output is correct |
84 |
Correct |
0 ms |
340 KB |
Output is correct |
85 |
Correct |
1 ms |
340 KB |
Output is correct |
86 |
Correct |
1 ms |
340 KB |
Output is correct |
87 |
Correct |
1 ms |
324 KB |
Output is correct |
88 |
Correct |
1 ms |
320 KB |
Output is correct |
89 |
Correct |
1 ms |
340 KB |
Output is correct |
90 |
Correct |
1 ms |
340 KB |
Output is correct |
91 |
Correct |
1 ms |
340 KB |
Output is correct |
92 |
Correct |
1 ms |
340 KB |
Output is correct |
93 |
Correct |
1 ms |
340 KB |
Output is correct |
94 |
Correct |
0 ms |
340 KB |
Output is correct |
95 |
Correct |
1 ms |
340 KB |
Output is correct |
96 |
Correct |
1 ms |
340 KB |
Output is correct |
97 |
Correct |
1 ms |
340 KB |
Output is correct |
98 |
Correct |
1 ms |
340 KB |
Output is correct |
99 |
Correct |
1 ms |
340 KB |
Output is correct |
100 |
Correct |
1 ms |
340 KB |
Output is correct |
101 |
Correct |
1 ms |
340 KB |
Output is correct |
102 |
Correct |
2 ms |
328 KB |
Output is correct |
103 |
Correct |
252 ms |
8800 KB |
Output is correct |
104 |
Correct |
230 ms |
8684 KB |
Output is correct |
105 |
Correct |
236 ms |
8764 KB |
Output is correct |
106 |
Correct |
222 ms |
8016 KB |
Output is correct |
107 |
Correct |
203 ms |
8868 KB |
Output is correct |
108 |
Correct |
235 ms |
8908 KB |
Output is correct |
109 |
Correct |
256 ms |
9132 KB |
Output is correct |
110 |
Correct |
4 ms |
644 KB |
Output is correct |
111 |
Correct |
4 ms |
724 KB |
Output is correct |
112 |
Correct |
4 ms |
724 KB |
Output is correct |
113 |
Correct |
4 ms |
648 KB |
Output is correct |
114 |
Correct |
4 ms |
712 KB |
Output is correct |
115 |
Correct |
285 ms |
10304 KB |
Output is correct |
116 |
Correct |
143 ms |
6732 KB |
Output is correct |
117 |
Correct |
159 ms |
6956 KB |
Output is correct |
118 |
Correct |
156 ms |
7100 KB |
Output is correct |
119 |
Correct |
298 ms |
10004 KB |
Output is correct |
120 |
Correct |
331 ms |
11500 KB |
Output is correct |
121 |
Correct |
331 ms |
11488 KB |
Output is correct |
122 |
Correct |
292 ms |
10680 KB |
Output is correct |
123 |
Correct |
261 ms |
11576 KB |
Output is correct |
124 |
Correct |
311 ms |
11484 KB |
Output is correct |
125 |
Correct |
330 ms |
11888 KB |
Output is correct |
126 |
Correct |
26 ms |
3300 KB |
Output is correct |
127 |
Correct |
30 ms |
3416 KB |
Output is correct |
128 |
Correct |
33 ms |
3380 KB |
Output is correct |
129 |
Correct |
31 ms |
3412 KB |
Output is correct |
130 |
Correct |
31 ms |
3424 KB |
Output is correct |
131 |
Correct |
34 ms |
3600 KB |
Output is correct |
132 |
Correct |
629 ms |
44912 KB |
Output is correct |
133 |
Correct |
599 ms |
44732 KB |
Output is correct |
134 |
Correct |
604 ms |
45136 KB |
Output is correct |
135 |
Correct |
660 ms |
44828 KB |
Output is correct |
136 |
Correct |
637 ms |
44888 KB |
Output is correct |
137 |
Correct |
477 ms |
31816 KB |
Output is correct |
138 |
Correct |
481 ms |
31988 KB |
Output is correct |
139 |
Correct |
511 ms |
43728 KB |
Output is correct |
140 |
Correct |
504 ms |
44576 KB |
Output is correct |
141 |
Correct |
635 ms |
44540 KB |
Output is correct |
142 |
Correct |
657 ms |
44896 KB |
Output is correct |