#include "mars.h"
#include<bits/stdc++.h>
using namespace std;
const int maxn = 50;
#define pii pair<int,int>
#define fi first
#define se second
int dx[]={0,0,1,-1},
dy[]={1,-1,0,0};
char c[maxn][maxn];
int f[maxn][maxn],cnt,K;
bool check(int x,int y){
return (x<0 || y<0 || x>K || y>K || min(x,y)>2 || c[x][y]=='0');
}
void dfs(int x,int y){
for(int t=0;t<4;t++){
int xt=x+dx[t],yt=y+dy[t];
if(check(xt,yt) || f[xt][yt]) continue;
f[xt][yt]=f[x][y];
dfs(xt,yt);
}
}
int par[maxn*maxn];
bool used[maxn*maxn];
int findpar(int u){
if(u!=par[u]) return par[u]=findpar(par[u]);
return u;
}
void unions(int u,int v){
u=findpar(u);v=findpar(v);
if(u==v) return;
par[v]=u;
}
string process(std::vector <std::vector<std::string>> a, int x, int y, int k, int n)
{
if(max(x,y)<=2*(n-k-2)) return a[0][0];
else if(x>y){
a[0][0][1]=a[1][0][0];
for(int i=0;i<=2*k;i++) a[0][0][2+i]=a[2][0][i];
return a[0][0];
}
else if(x<y){
a[0][0][1]=a[0][1][0];
for(int i=0;i<=2*k;i++) a[0][0][2+i]=a[0][2][i];
return a[0][0];
}
else if(x==2*(n-k-1)-1){
for(int i=0;i<=2*k;i++) a[0][0][1+i]=a[1][2][i];
for(int i=0;i<=2*k;i++) a[0][0][1+2*k+1+i]=a[2][1][i];
return a[0][0];
}
else{
for(int i=0;i<=2;i++) for(int j=0;j<=2;j++) c[i][j]=a[i][j][0];
for(int i=1;i<=2*k;i++){
c[0][2+i]=a[0][2][i];
c[1][2+i]=a[1][2][i];
c[2+i][0]=a[2][0][i];
c[2+i][1]=a[2][1][i];
}
for(int i=0;i<=2*(k-1);i++){
c[2][3+i]=a[1][1][1+i];
c[3+i][2]=a[1][1][1+2*(k-1)+1+i];
}
if(k){
c[2][2*k+2]=a[2][2][1];
c[2*k+2][2]=a[2][2][2];
}
vector<vector<pii>> p;
vector<pii> cur;
for(int i=2*k+2;i>=2;i--){
for(int j=2;j<=2*k+2 && min(i,j)<=2;j++){
//if(k) cout << c[i][j];
if(c[i][j]=='1') cur.push_back({i,j});
else if(!cur.empty()){
p.push_back(cur);
cur.clear();
}
}
//if(k) cout << '\n';
}
if(!cur.empty()) p.push_back(cur);
memset(f,0,sizeof(f));
int sz=(int)p.size();
string S;cnt=0;
vector<int> x(sz,0);
if(k){
for(int i=0;i<2*sz;i++) S+=a[2][2][3+i];
//cout << "*" << k << ' ' << S << '\n';
vector<int> cc;
for(int i=0;i<sz;i++){
if(S[i<<1]=='1'){
x[i]=++cnt;
cc.push_back(i);
}
if(S[i<<1|1]=='1'){
x[i]=x[cc.back()];
cc.pop_back();
}
if(S[i<<1]=='0' && S[i<<1|1]=='0') x[i]=x[cc.back()];
}
//cout << x[0] << ' ' << x[1] << '\n';
for(int i=0;i<sz;i++) for(auto [u,v]:p[i]) f[u][v]=x[i];
}
K=2*k+2;
for(int i=0;i<=2*k+2;i++){
for(int j=0;j<=2*k+2 && min(i,j)<=2;j++){
if(c[i][j]=='1'){
if(!f[i][j]) f[i][j]=++cnt;
dfs(i,j);
}
//if(k) cout << c[i][j];
}
//if(k) cout << '\n';
}
for(int i=1;i<=cnt;i++) par[i]=i,used[i]=false;
for(int i=0;i<=2*k+2;i++) for(int j=0;j<=2*k+2 && min(i,j)<=2;j++){
if(c[i][j]!='1') continue;
for(int t=0;t<4;t++){
int xt=i+dx[t],yt=j+dy[t];
if(check(xt,yt)) continue;
unions(f[i][j],f[xt][yt]);
}
}
/*
for(int i=0;i<=2*k+2;i++){
for(int j=0;j<=2*k+2 && min(i,j)<=2;j++) cout << findpar(f[i][j]);
cout << '\n';
}
*/
for(int i=0;i<=2*k+2;i++){
for(int j=0;j<=2*k+2 && min(i,j)==0;j++){
f[i][j]=findpar(f[i][j]);
used[f[i][j]]=true;
//cout << f[i][j];
}
//cout << '\n';
}
//cout << '*' << cnt << '\n';
int num=0;
if(k){
for(int i=9;i>=0;i--) num=num<<1|(a[2][2][3+2*sz+i]-'0');
//cout << '*' << num << '\n';
}
for(int i=1;i<=cnt;i++) if(findpar(i)==i && !used[i]) num++;
if(k==n-1){
for(int i=1;i<=cnt;i++) if(findpar(i)==i && used[i]) num++;
string res;
for(int i=0;i<10;i++) res+=char((num>>i&1)+'0');
while((int)res.length()<100) res+='0';
return res;
}
string res;
res+=c[0][0];
res+=c[0][2*k+2];
res+=c[2*k+2][0];
p.clear();
cur.clear();
for(int i=2*k+2;i>=0;i--) for(int j=0;j<=2*k+2 && min(i,j)==0;j++){
if(c[i][j]=='1') cur.push_back({i,j});
else if(!cur.empty()){
p.push_back(cur);
cur.clear();
}
}
if(!cur.empty()) p.push_back(cur);
sz=(int)p.size();
x.assign(sz,0);
for(int i=0;i<sz;i++) x[i]=f[p[i][0].fi][p[i][0].se];
string add(2*sz,'0');
vector<int> lst(cnt+1,-1);
for(int i=0;i<sz;i++){
if(lst[x[i]]==-1) add[i<<1]='1';
lst[x[i]]=i;
}
for(int i=1;i<=cnt;i++) if(lst[i]!=-1) add[lst[i]<<1|1]='1';
//cout << "***" << add << '\n';
res+=add;
for(int i=0;i<10;i++) res+=char((num>>i&1)+'0');
while((int)res.length()<100) res+='0';
return res;
}
return std::string(100 ,'0');
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
4 ms |
3544 KB |
Output is correct |
2 |
Correct |
5 ms |
3988 KB |
Output is correct |
3 |
Correct |
7 ms |
3652 KB |
Output is correct |
4 |
Correct |
8 ms |
4056 KB |
Output is correct |
5 |
Correct |
7 ms |
4148 KB |
Output is correct |
6 |
Correct |
6 ms |
4240 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
4 ms |
3544 KB |
Output is correct |
2 |
Correct |
5 ms |
3988 KB |
Output is correct |
3 |
Correct |
7 ms |
3652 KB |
Output is correct |
4 |
Correct |
8 ms |
4056 KB |
Output is correct |
5 |
Correct |
7 ms |
4148 KB |
Output is correct |
6 |
Correct |
6 ms |
4240 KB |
Output is correct |
7 |
Correct |
8 ms |
4252 KB |
Output is correct |
8 |
Correct |
9 ms |
3884 KB |
Output is correct |
9 |
Correct |
10 ms |
3888 KB |
Output is correct |
10 |
Correct |
8 ms |
4092 KB |
Output is correct |
11 |
Correct |
8 ms |
3860 KB |
Output is correct |
12 |
Correct |
10 ms |
3408 KB |
Output is correct |
13 |
Correct |
8 ms |
3940 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
4 ms |
3544 KB |
Output is correct |
2 |
Correct |
5 ms |
3988 KB |
Output is correct |
3 |
Correct |
7 ms |
3652 KB |
Output is correct |
4 |
Correct |
8 ms |
4056 KB |
Output is correct |
5 |
Correct |
7 ms |
4148 KB |
Output is correct |
6 |
Correct |
6 ms |
4240 KB |
Output is correct |
7 |
Correct |
8 ms |
4252 KB |
Output is correct |
8 |
Correct |
9 ms |
3884 KB |
Output is correct |
9 |
Correct |
10 ms |
3888 KB |
Output is correct |
10 |
Correct |
8 ms |
4092 KB |
Output is correct |
11 |
Correct |
8 ms |
3860 KB |
Output is correct |
12 |
Correct |
10 ms |
3408 KB |
Output is correct |
13 |
Correct |
8 ms |
3940 KB |
Output is correct |
14 |
Correct |
16 ms |
4296 KB |
Output is correct |
15 |
Correct |
23 ms |
4176 KB |
Output is correct |
16 |
Correct |
23 ms |
4312 KB |
Output is correct |
17 |
Correct |
24 ms |
4136 KB |
Output is correct |
18 |
Correct |
23 ms |
3904 KB |
Output is correct |
19 |
Correct |
23 ms |
4424 KB |
Output is correct |
20 |
Correct |
23 ms |
4088 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
4 ms |
3544 KB |
Output is correct |
2 |
Correct |
5 ms |
3988 KB |
Output is correct |
3 |
Correct |
7 ms |
3652 KB |
Output is correct |
4 |
Correct |
8 ms |
4056 KB |
Output is correct |
5 |
Correct |
7 ms |
4148 KB |
Output is correct |
6 |
Correct |
6 ms |
4240 KB |
Output is correct |
7 |
Correct |
8 ms |
4252 KB |
Output is correct |
8 |
Correct |
9 ms |
3884 KB |
Output is correct |
9 |
Correct |
10 ms |
3888 KB |
Output is correct |
10 |
Correct |
8 ms |
4092 KB |
Output is correct |
11 |
Correct |
8 ms |
3860 KB |
Output is correct |
12 |
Correct |
10 ms |
3408 KB |
Output is correct |
13 |
Correct |
8 ms |
3940 KB |
Output is correct |
14 |
Correct |
16 ms |
4296 KB |
Output is correct |
15 |
Correct |
23 ms |
4176 KB |
Output is correct |
16 |
Correct |
23 ms |
4312 KB |
Output is correct |
17 |
Correct |
24 ms |
4136 KB |
Output is correct |
18 |
Correct |
23 ms |
3904 KB |
Output is correct |
19 |
Correct |
23 ms |
4424 KB |
Output is correct |
20 |
Correct |
23 ms |
4088 KB |
Output is correct |
21 |
Correct |
35 ms |
4740 KB |
Output is correct |
22 |
Correct |
48 ms |
4272 KB |
Output is correct |
23 |
Correct |
47 ms |
4596 KB |
Output is correct |
24 |
Correct |
52 ms |
3864 KB |
Output is correct |
25 |
Correct |
51 ms |
4588 KB |
Output is correct |
26 |
Correct |
47 ms |
4380 KB |
Output is correct |
27 |
Correct |
47 ms |
4228 KB |
Output is correct |
28 |
Correct |
47 ms |
4308 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
4 ms |
3544 KB |
Output is correct |
2 |
Correct |
5 ms |
3988 KB |
Output is correct |
3 |
Correct |
7 ms |
3652 KB |
Output is correct |
4 |
Correct |
8 ms |
4056 KB |
Output is correct |
5 |
Correct |
7 ms |
4148 KB |
Output is correct |
6 |
Correct |
6 ms |
4240 KB |
Output is correct |
7 |
Correct |
8 ms |
4252 KB |
Output is correct |
8 |
Correct |
9 ms |
3884 KB |
Output is correct |
9 |
Correct |
10 ms |
3888 KB |
Output is correct |
10 |
Correct |
8 ms |
4092 KB |
Output is correct |
11 |
Correct |
8 ms |
3860 KB |
Output is correct |
12 |
Correct |
10 ms |
3408 KB |
Output is correct |
13 |
Correct |
8 ms |
3940 KB |
Output is correct |
14 |
Correct |
16 ms |
4296 KB |
Output is correct |
15 |
Correct |
23 ms |
4176 KB |
Output is correct |
16 |
Correct |
23 ms |
4312 KB |
Output is correct |
17 |
Correct |
24 ms |
4136 KB |
Output is correct |
18 |
Correct |
23 ms |
3904 KB |
Output is correct |
19 |
Correct |
23 ms |
4424 KB |
Output is correct |
20 |
Correct |
23 ms |
4088 KB |
Output is correct |
21 |
Correct |
35 ms |
4740 KB |
Output is correct |
22 |
Correct |
48 ms |
4272 KB |
Output is correct |
23 |
Correct |
47 ms |
4596 KB |
Output is correct |
24 |
Correct |
52 ms |
3864 KB |
Output is correct |
25 |
Correct |
51 ms |
4588 KB |
Output is correct |
26 |
Correct |
47 ms |
4380 KB |
Output is correct |
27 |
Correct |
47 ms |
4228 KB |
Output is correct |
28 |
Correct |
47 ms |
4308 KB |
Output is correct |
29 |
Correct |
69 ms |
4376 KB |
Output is correct |
30 |
Correct |
86 ms |
4224 KB |
Output is correct |
31 |
Correct |
92 ms |
4780 KB |
Output is correct |
32 |
Correct |
89 ms |
4352 KB |
Output is correct |
33 |
Correct |
91 ms |
4292 KB |
Output is correct |
34 |
Correct |
89 ms |
4404 KB |
Output is correct |
35 |
Correct |
98 ms |
4048 KB |
Output is correct |
36 |
Correct |
90 ms |
4160 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
4 ms |
3544 KB |
Output is correct |
2 |
Correct |
5 ms |
3988 KB |
Output is correct |
3 |
Correct |
7 ms |
3652 KB |
Output is correct |
4 |
Correct |
8 ms |
4056 KB |
Output is correct |
5 |
Correct |
7 ms |
4148 KB |
Output is correct |
6 |
Correct |
6 ms |
4240 KB |
Output is correct |
7 |
Correct |
8 ms |
4252 KB |
Output is correct |
8 |
Correct |
9 ms |
3884 KB |
Output is correct |
9 |
Correct |
10 ms |
3888 KB |
Output is correct |
10 |
Correct |
8 ms |
4092 KB |
Output is correct |
11 |
Correct |
8 ms |
3860 KB |
Output is correct |
12 |
Correct |
10 ms |
3408 KB |
Output is correct |
13 |
Correct |
8 ms |
3940 KB |
Output is correct |
14 |
Correct |
16 ms |
4296 KB |
Output is correct |
15 |
Correct |
23 ms |
4176 KB |
Output is correct |
16 |
Correct |
23 ms |
4312 KB |
Output is correct |
17 |
Correct |
24 ms |
4136 KB |
Output is correct |
18 |
Correct |
23 ms |
3904 KB |
Output is correct |
19 |
Correct |
23 ms |
4424 KB |
Output is correct |
20 |
Correct |
23 ms |
4088 KB |
Output is correct |
21 |
Correct |
35 ms |
4740 KB |
Output is correct |
22 |
Correct |
48 ms |
4272 KB |
Output is correct |
23 |
Correct |
47 ms |
4596 KB |
Output is correct |
24 |
Correct |
52 ms |
3864 KB |
Output is correct |
25 |
Correct |
51 ms |
4588 KB |
Output is correct |
26 |
Correct |
47 ms |
4380 KB |
Output is correct |
27 |
Correct |
47 ms |
4228 KB |
Output is correct |
28 |
Correct |
47 ms |
4308 KB |
Output is correct |
29 |
Correct |
69 ms |
4376 KB |
Output is correct |
30 |
Correct |
86 ms |
4224 KB |
Output is correct |
31 |
Correct |
92 ms |
4780 KB |
Output is correct |
32 |
Correct |
89 ms |
4352 KB |
Output is correct |
33 |
Correct |
91 ms |
4292 KB |
Output is correct |
34 |
Correct |
89 ms |
4404 KB |
Output is correct |
35 |
Correct |
98 ms |
4048 KB |
Output is correct |
36 |
Correct |
90 ms |
4160 KB |
Output is correct |
37 |
Correct |
130 ms |
4492 KB |
Output is correct |
38 |
Correct |
164 ms |
4652 KB |
Output is correct |
39 |
Correct |
158 ms |
4852 KB |
Output is correct |
40 |
Correct |
159 ms |
4796 KB |
Output is correct |
41 |
Correct |
160 ms |
4672 KB |
Output is correct |
42 |
Correct |
162 ms |
4764 KB |
Output is correct |
43 |
Correct |
157 ms |
4704 KB |
Output is correct |
44 |
Correct |
158 ms |
4704 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
4 ms |
3544 KB |
Output is correct |
2 |
Correct |
5 ms |
3988 KB |
Output is correct |
3 |
Correct |
7 ms |
3652 KB |
Output is correct |
4 |
Correct |
8 ms |
4056 KB |
Output is correct |
5 |
Correct |
7 ms |
4148 KB |
Output is correct |
6 |
Correct |
6 ms |
4240 KB |
Output is correct |
7 |
Correct |
8 ms |
4252 KB |
Output is correct |
8 |
Correct |
9 ms |
3884 KB |
Output is correct |
9 |
Correct |
10 ms |
3888 KB |
Output is correct |
10 |
Correct |
8 ms |
4092 KB |
Output is correct |
11 |
Correct |
8 ms |
3860 KB |
Output is correct |
12 |
Correct |
10 ms |
3408 KB |
Output is correct |
13 |
Correct |
8 ms |
3940 KB |
Output is correct |
14 |
Correct |
16 ms |
4296 KB |
Output is correct |
15 |
Correct |
23 ms |
4176 KB |
Output is correct |
16 |
Correct |
23 ms |
4312 KB |
Output is correct |
17 |
Correct |
24 ms |
4136 KB |
Output is correct |
18 |
Correct |
23 ms |
3904 KB |
Output is correct |
19 |
Correct |
23 ms |
4424 KB |
Output is correct |
20 |
Correct |
23 ms |
4088 KB |
Output is correct |
21 |
Correct |
35 ms |
4740 KB |
Output is correct |
22 |
Correct |
48 ms |
4272 KB |
Output is correct |
23 |
Correct |
47 ms |
4596 KB |
Output is correct |
24 |
Correct |
52 ms |
3864 KB |
Output is correct |
25 |
Correct |
51 ms |
4588 KB |
Output is correct |
26 |
Correct |
47 ms |
4380 KB |
Output is correct |
27 |
Correct |
47 ms |
4228 KB |
Output is correct |
28 |
Correct |
47 ms |
4308 KB |
Output is correct |
29 |
Correct |
69 ms |
4376 KB |
Output is correct |
30 |
Correct |
86 ms |
4224 KB |
Output is correct |
31 |
Correct |
92 ms |
4780 KB |
Output is correct |
32 |
Correct |
89 ms |
4352 KB |
Output is correct |
33 |
Correct |
91 ms |
4292 KB |
Output is correct |
34 |
Correct |
89 ms |
4404 KB |
Output is correct |
35 |
Correct |
98 ms |
4048 KB |
Output is correct |
36 |
Correct |
90 ms |
4160 KB |
Output is correct |
37 |
Correct |
130 ms |
4492 KB |
Output is correct |
38 |
Correct |
164 ms |
4652 KB |
Output is correct |
39 |
Correct |
158 ms |
4852 KB |
Output is correct |
40 |
Correct |
159 ms |
4796 KB |
Output is correct |
41 |
Correct |
160 ms |
4672 KB |
Output is correct |
42 |
Correct |
162 ms |
4764 KB |
Output is correct |
43 |
Correct |
157 ms |
4704 KB |
Output is correct |
44 |
Correct |
158 ms |
4704 KB |
Output is correct |
45 |
Correct |
198 ms |
4428 KB |
Output is correct |
46 |
Correct |
243 ms |
5644 KB |
Output is correct |
47 |
Correct |
244 ms |
4988 KB |
Output is correct |
48 |
Correct |
251 ms |
4620 KB |
Output is correct |
49 |
Correct |
248 ms |
5400 KB |
Output is correct |
50 |
Correct |
235 ms |
4948 KB |
Output is correct |
51 |
Correct |
253 ms |
4580 KB |
Output is correct |
52 |
Correct |
251 ms |
5060 KB |
Output is correct |
53 |
Correct |
245 ms |
5068 KB |
Output is correct |
54 |
Correct |
239 ms |
4680 KB |
Output is correct |
55 |
Correct |
242 ms |
4612 KB |
Output is correct |
56 |
Correct |
247 ms |
4992 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
4 ms |
3544 KB |
Output is correct |
2 |
Correct |
5 ms |
3988 KB |
Output is correct |
3 |
Correct |
7 ms |
3652 KB |
Output is correct |
4 |
Correct |
8 ms |
4056 KB |
Output is correct |
5 |
Correct |
7 ms |
4148 KB |
Output is correct |
6 |
Correct |
6 ms |
4240 KB |
Output is correct |
7 |
Correct |
8 ms |
4252 KB |
Output is correct |
8 |
Correct |
9 ms |
3884 KB |
Output is correct |
9 |
Correct |
10 ms |
3888 KB |
Output is correct |
10 |
Correct |
8 ms |
4092 KB |
Output is correct |
11 |
Correct |
8 ms |
3860 KB |
Output is correct |
12 |
Correct |
10 ms |
3408 KB |
Output is correct |
13 |
Correct |
8 ms |
3940 KB |
Output is correct |
14 |
Correct |
16 ms |
4296 KB |
Output is correct |
15 |
Correct |
23 ms |
4176 KB |
Output is correct |
16 |
Correct |
23 ms |
4312 KB |
Output is correct |
17 |
Correct |
24 ms |
4136 KB |
Output is correct |
18 |
Correct |
23 ms |
3904 KB |
Output is correct |
19 |
Correct |
23 ms |
4424 KB |
Output is correct |
20 |
Correct |
23 ms |
4088 KB |
Output is correct |
21 |
Correct |
35 ms |
4740 KB |
Output is correct |
22 |
Correct |
48 ms |
4272 KB |
Output is correct |
23 |
Correct |
47 ms |
4596 KB |
Output is correct |
24 |
Correct |
52 ms |
3864 KB |
Output is correct |
25 |
Correct |
51 ms |
4588 KB |
Output is correct |
26 |
Correct |
47 ms |
4380 KB |
Output is correct |
27 |
Correct |
47 ms |
4228 KB |
Output is correct |
28 |
Correct |
47 ms |
4308 KB |
Output is correct |
29 |
Correct |
69 ms |
4376 KB |
Output is correct |
30 |
Correct |
86 ms |
4224 KB |
Output is correct |
31 |
Correct |
92 ms |
4780 KB |
Output is correct |
32 |
Correct |
89 ms |
4352 KB |
Output is correct |
33 |
Correct |
91 ms |
4292 KB |
Output is correct |
34 |
Correct |
89 ms |
4404 KB |
Output is correct |
35 |
Correct |
98 ms |
4048 KB |
Output is correct |
36 |
Correct |
90 ms |
4160 KB |
Output is correct |
37 |
Correct |
130 ms |
4492 KB |
Output is correct |
38 |
Correct |
164 ms |
4652 KB |
Output is correct |
39 |
Correct |
158 ms |
4852 KB |
Output is correct |
40 |
Correct |
159 ms |
4796 KB |
Output is correct |
41 |
Correct |
160 ms |
4672 KB |
Output is correct |
42 |
Correct |
162 ms |
4764 KB |
Output is correct |
43 |
Correct |
157 ms |
4704 KB |
Output is correct |
44 |
Correct |
158 ms |
4704 KB |
Output is correct |
45 |
Correct |
198 ms |
4428 KB |
Output is correct |
46 |
Correct |
243 ms |
5644 KB |
Output is correct |
47 |
Correct |
244 ms |
4988 KB |
Output is correct |
48 |
Correct |
251 ms |
4620 KB |
Output is correct |
49 |
Correct |
248 ms |
5400 KB |
Output is correct |
50 |
Correct |
235 ms |
4948 KB |
Output is correct |
51 |
Correct |
253 ms |
4580 KB |
Output is correct |
52 |
Correct |
251 ms |
5060 KB |
Output is correct |
53 |
Correct |
245 ms |
5068 KB |
Output is correct |
54 |
Correct |
239 ms |
4680 KB |
Output is correct |
55 |
Correct |
242 ms |
4612 KB |
Output is correct |
56 |
Correct |
247 ms |
4992 KB |
Output is correct |
57 |
Correct |
302 ms |
5480 KB |
Output is correct |
58 |
Correct |
363 ms |
5480 KB |
Output is correct |
59 |
Correct |
390 ms |
5328 KB |
Output is correct |
60 |
Correct |
374 ms |
5776 KB |
Output is correct |
61 |
Correct |
363 ms |
5968 KB |
Output is correct |
62 |
Correct |
363 ms |
5784 KB |
Output is correct |
63 |
Correct |
365 ms |
5712 KB |
Output is correct |
64 |
Correct |
374 ms |
6004 KB |
Output is correct |
65 |
Correct |
363 ms |
5928 KB |
Output is correct |
66 |
Correct |
367 ms |
5376 KB |
Output is correct |
67 |
Correct |
376 ms |
5388 KB |
Output is correct |
68 |
Correct |
370 ms |
6116 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
4 ms |
3544 KB |
Output is correct |
2 |
Correct |
5 ms |
3988 KB |
Output is correct |
3 |
Correct |
7 ms |
3652 KB |
Output is correct |
4 |
Correct |
8 ms |
4056 KB |
Output is correct |
5 |
Correct |
7 ms |
4148 KB |
Output is correct |
6 |
Correct |
6 ms |
4240 KB |
Output is correct |
7 |
Correct |
8 ms |
4252 KB |
Output is correct |
8 |
Correct |
9 ms |
3884 KB |
Output is correct |
9 |
Correct |
10 ms |
3888 KB |
Output is correct |
10 |
Correct |
8 ms |
4092 KB |
Output is correct |
11 |
Correct |
8 ms |
3860 KB |
Output is correct |
12 |
Correct |
10 ms |
3408 KB |
Output is correct |
13 |
Correct |
8 ms |
3940 KB |
Output is correct |
14 |
Correct |
16 ms |
4296 KB |
Output is correct |
15 |
Correct |
23 ms |
4176 KB |
Output is correct |
16 |
Correct |
23 ms |
4312 KB |
Output is correct |
17 |
Correct |
24 ms |
4136 KB |
Output is correct |
18 |
Correct |
23 ms |
3904 KB |
Output is correct |
19 |
Correct |
23 ms |
4424 KB |
Output is correct |
20 |
Correct |
23 ms |
4088 KB |
Output is correct |
21 |
Correct |
35 ms |
4740 KB |
Output is correct |
22 |
Correct |
48 ms |
4272 KB |
Output is correct |
23 |
Correct |
47 ms |
4596 KB |
Output is correct |
24 |
Correct |
52 ms |
3864 KB |
Output is correct |
25 |
Correct |
51 ms |
4588 KB |
Output is correct |
26 |
Correct |
47 ms |
4380 KB |
Output is correct |
27 |
Correct |
47 ms |
4228 KB |
Output is correct |
28 |
Correct |
47 ms |
4308 KB |
Output is correct |
29 |
Correct |
69 ms |
4376 KB |
Output is correct |
30 |
Correct |
86 ms |
4224 KB |
Output is correct |
31 |
Correct |
92 ms |
4780 KB |
Output is correct |
32 |
Correct |
89 ms |
4352 KB |
Output is correct |
33 |
Correct |
91 ms |
4292 KB |
Output is correct |
34 |
Correct |
89 ms |
4404 KB |
Output is correct |
35 |
Correct |
98 ms |
4048 KB |
Output is correct |
36 |
Correct |
90 ms |
4160 KB |
Output is correct |
37 |
Correct |
130 ms |
4492 KB |
Output is correct |
38 |
Correct |
164 ms |
4652 KB |
Output is correct |
39 |
Correct |
158 ms |
4852 KB |
Output is correct |
40 |
Correct |
159 ms |
4796 KB |
Output is correct |
41 |
Correct |
160 ms |
4672 KB |
Output is correct |
42 |
Correct |
162 ms |
4764 KB |
Output is correct |
43 |
Correct |
157 ms |
4704 KB |
Output is correct |
44 |
Correct |
158 ms |
4704 KB |
Output is correct |
45 |
Correct |
198 ms |
4428 KB |
Output is correct |
46 |
Correct |
243 ms |
5644 KB |
Output is correct |
47 |
Correct |
244 ms |
4988 KB |
Output is correct |
48 |
Correct |
251 ms |
4620 KB |
Output is correct |
49 |
Correct |
248 ms |
5400 KB |
Output is correct |
50 |
Correct |
235 ms |
4948 KB |
Output is correct |
51 |
Correct |
253 ms |
4580 KB |
Output is correct |
52 |
Correct |
251 ms |
5060 KB |
Output is correct |
53 |
Correct |
245 ms |
5068 KB |
Output is correct |
54 |
Correct |
239 ms |
4680 KB |
Output is correct |
55 |
Correct |
242 ms |
4612 KB |
Output is correct |
56 |
Correct |
247 ms |
4992 KB |
Output is correct |
57 |
Correct |
302 ms |
5480 KB |
Output is correct |
58 |
Correct |
363 ms |
5480 KB |
Output is correct |
59 |
Correct |
390 ms |
5328 KB |
Output is correct |
60 |
Correct |
374 ms |
5776 KB |
Output is correct |
61 |
Correct |
363 ms |
5968 KB |
Output is correct |
62 |
Correct |
363 ms |
5784 KB |
Output is correct |
63 |
Correct |
365 ms |
5712 KB |
Output is correct |
64 |
Correct |
374 ms |
6004 KB |
Output is correct |
65 |
Correct |
363 ms |
5928 KB |
Output is correct |
66 |
Correct |
367 ms |
5376 KB |
Output is correct |
67 |
Correct |
376 ms |
5388 KB |
Output is correct |
68 |
Correct |
370 ms |
6116 KB |
Output is correct |
69 |
Correct |
433 ms |
6004 KB |
Output is correct |
70 |
Correct |
514 ms |
5876 KB |
Output is correct |
71 |
Correct |
525 ms |
6500 KB |
Output is correct |
72 |
Correct |
522 ms |
6628 KB |
Output is correct |
73 |
Correct |
514 ms |
6624 KB |
Output is correct |
74 |
Correct |
521 ms |
6600 KB |
Output is correct |
75 |
Correct |
506 ms |
5868 KB |
Output is correct |
76 |
Correct |
518 ms |
6356 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
4 ms |
3544 KB |
Output is correct |
2 |
Correct |
5 ms |
3988 KB |
Output is correct |
3 |
Correct |
7 ms |
3652 KB |
Output is correct |
4 |
Correct |
8 ms |
4056 KB |
Output is correct |
5 |
Correct |
7 ms |
4148 KB |
Output is correct |
6 |
Correct |
6 ms |
4240 KB |
Output is correct |
7 |
Correct |
8 ms |
4252 KB |
Output is correct |
8 |
Correct |
9 ms |
3884 KB |
Output is correct |
9 |
Correct |
10 ms |
3888 KB |
Output is correct |
10 |
Correct |
8 ms |
4092 KB |
Output is correct |
11 |
Correct |
8 ms |
3860 KB |
Output is correct |
12 |
Correct |
10 ms |
3408 KB |
Output is correct |
13 |
Correct |
8 ms |
3940 KB |
Output is correct |
14 |
Correct |
16 ms |
4296 KB |
Output is correct |
15 |
Correct |
23 ms |
4176 KB |
Output is correct |
16 |
Correct |
23 ms |
4312 KB |
Output is correct |
17 |
Correct |
24 ms |
4136 KB |
Output is correct |
18 |
Correct |
23 ms |
3904 KB |
Output is correct |
19 |
Correct |
23 ms |
4424 KB |
Output is correct |
20 |
Correct |
23 ms |
4088 KB |
Output is correct |
21 |
Correct |
35 ms |
4740 KB |
Output is correct |
22 |
Correct |
48 ms |
4272 KB |
Output is correct |
23 |
Correct |
47 ms |
4596 KB |
Output is correct |
24 |
Correct |
52 ms |
3864 KB |
Output is correct |
25 |
Correct |
51 ms |
4588 KB |
Output is correct |
26 |
Correct |
47 ms |
4380 KB |
Output is correct |
27 |
Correct |
47 ms |
4228 KB |
Output is correct |
28 |
Correct |
47 ms |
4308 KB |
Output is correct |
29 |
Correct |
69 ms |
4376 KB |
Output is correct |
30 |
Correct |
86 ms |
4224 KB |
Output is correct |
31 |
Correct |
92 ms |
4780 KB |
Output is correct |
32 |
Correct |
89 ms |
4352 KB |
Output is correct |
33 |
Correct |
91 ms |
4292 KB |
Output is correct |
34 |
Correct |
89 ms |
4404 KB |
Output is correct |
35 |
Correct |
98 ms |
4048 KB |
Output is correct |
36 |
Correct |
90 ms |
4160 KB |
Output is correct |
37 |
Correct |
130 ms |
4492 KB |
Output is correct |
38 |
Correct |
164 ms |
4652 KB |
Output is correct |
39 |
Correct |
158 ms |
4852 KB |
Output is correct |
40 |
Correct |
159 ms |
4796 KB |
Output is correct |
41 |
Correct |
160 ms |
4672 KB |
Output is correct |
42 |
Correct |
162 ms |
4764 KB |
Output is correct |
43 |
Correct |
157 ms |
4704 KB |
Output is correct |
44 |
Correct |
158 ms |
4704 KB |
Output is correct |
45 |
Correct |
198 ms |
4428 KB |
Output is correct |
46 |
Correct |
243 ms |
5644 KB |
Output is correct |
47 |
Correct |
244 ms |
4988 KB |
Output is correct |
48 |
Correct |
251 ms |
4620 KB |
Output is correct |
49 |
Correct |
248 ms |
5400 KB |
Output is correct |
50 |
Correct |
235 ms |
4948 KB |
Output is correct |
51 |
Correct |
253 ms |
4580 KB |
Output is correct |
52 |
Correct |
251 ms |
5060 KB |
Output is correct |
53 |
Correct |
245 ms |
5068 KB |
Output is correct |
54 |
Correct |
239 ms |
4680 KB |
Output is correct |
55 |
Correct |
242 ms |
4612 KB |
Output is correct |
56 |
Correct |
247 ms |
4992 KB |
Output is correct |
57 |
Correct |
302 ms |
5480 KB |
Output is correct |
58 |
Correct |
363 ms |
5480 KB |
Output is correct |
59 |
Correct |
390 ms |
5328 KB |
Output is correct |
60 |
Correct |
374 ms |
5776 KB |
Output is correct |
61 |
Correct |
363 ms |
5968 KB |
Output is correct |
62 |
Correct |
363 ms |
5784 KB |
Output is correct |
63 |
Correct |
365 ms |
5712 KB |
Output is correct |
64 |
Correct |
374 ms |
6004 KB |
Output is correct |
65 |
Correct |
363 ms |
5928 KB |
Output is correct |
66 |
Correct |
367 ms |
5376 KB |
Output is correct |
67 |
Correct |
376 ms |
5388 KB |
Output is correct |
68 |
Correct |
370 ms |
6116 KB |
Output is correct |
69 |
Correct |
433 ms |
6004 KB |
Output is correct |
70 |
Correct |
514 ms |
5876 KB |
Output is correct |
71 |
Correct |
525 ms |
6500 KB |
Output is correct |
72 |
Correct |
522 ms |
6628 KB |
Output is correct |
73 |
Correct |
514 ms |
6624 KB |
Output is correct |
74 |
Correct |
521 ms |
6600 KB |
Output is correct |
75 |
Correct |
506 ms |
5868 KB |
Output is correct |
76 |
Correct |
518 ms |
6356 KB |
Output is correct |
77 |
Correct |
517 ms |
5772 KB |
Output is correct |
78 |
Correct |
722 ms |
6380 KB |
Output is correct |
79 |
Correct |
716 ms |
6224 KB |
Output is correct |
80 |
Correct |
727 ms |
6272 KB |
Output is correct |
81 |
Correct |
701 ms |
6608 KB |
Output is correct |
82 |
Correct |
715 ms |
6848 KB |
Output is correct |
83 |
Correct |
706 ms |
6452 KB |
Output is correct |
84 |
Correct |
705 ms |
6412 KB |
Output is correct |