# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
982827 |
2024-05-14T19:05:56 Z |
vjudge1 |
Mars (APIO22_mars) |
C++17 |
|
1 ms |
332 KB |
#include "mars.h"
#include <bits/stdc++.h>
#define rep(a,b,c) for(int a=b; a<c; a++)
#define repr(a,b,c) for(int a=b-1; a>c-1; a--)
#define repa(a,b) for(auto a:b)
#define fi first
#define se second
#define pii pair<int, int>
#define ll long long
#define pb push_back
using namespace std;
string process(vector<vector<string>> a, int I, int J, int k, int n){
string s;
s.resize(100);
if(!k){
queue<pii> q;
bool vis[3][3]{};
int c=0, z=0;
rep(i,0,3) rep(j,0,3) if(a[i][j][0]=='0') vis[i][j]=true;
rep(x,0,3){
rep(y,0,3){
if(vis[x][y]) continue;
else c++;
q.push({x,y});
vis[x][y]=true;
z=0;
while(q.size()){
int i=q.front().fi, j=q.front().se;
q.pop();
if((i==I && I) || (j==J && J)) z=1;
if(i<2 && !vis[i+1][j]){
q.push({i+1,j});
vis[i+1][j]=true;
}
if(i && !vis[i-1][j]){
q.push({i-1,j});
vis[i-1][j]=true;
}
if(j<2 && !vis[i][j+1]){
q.push({i,j+1});
vis[i][j+1]=true;
}
if(j && !vis[i][j]){
q.push({i,j-1});
vis[i][j-1]=true;
}
}
if(z) c--;
}
}
rep(i,0,100){
if(i>10) s[i]='0';
else if((c>>i)&1) s[i]='1';
else s[i]='0';
}
return s;
}else{
int c=0;
rep(i,0,10){
if(a[0][0][i]=='1') c+=(1<<i);
if(a[0][2][i]=='1') c+=(1<<i);
if(a[2][0][i]=='1') c+=(1<<i);
if(a[2][2][i]=='1') c+=(1<<i);
}
rep(i,0,100){
if(i>10) s[i]='0';
else if((c>>i)&1) s[i]='1';
else s[i]='0';
}
return s;
}
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
332 KB |
Incorrect |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
332 KB |
Incorrect |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
332 KB |
Incorrect |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
332 KB |
Incorrect |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
332 KB |
Incorrect |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
332 KB |
Incorrect |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
332 KB |
Incorrect |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
332 KB |
Incorrect |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
332 KB |
Incorrect |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
332 KB |
Incorrect |
2 |
Halted |
0 ms |
0 KB |
- |