# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
974851 |
2024-05-04T02:11:02 Z |
oolimry |
Mars (APIO22_mars) |
C++17 |
|
1 ms |
352 KB |
#include <bits/stdc++.h>
using namespace std;
#define sz(x) (int) (x).size()
#define all(x) (x).begin(), (x).end()
#define show(x) cerr << #x << " is " << x << endl;
#define show2(x,y) cerr << #x << " is " << x << " " << #y << " is " << y << endl;
#define show3(x,y,z) cerr << #x << " is " << x << " " << #y << " is " << y << " " << #z << " is " << z << endl;
#define showlist(x) cerr << #x << " is "; for(auto p : x) cerr << p << " "; cerr << endl;
typedef pair<int,int> ii;
///attempt 1: each position be a bit in the 100 bit string
///we can store up to 100 bits, so a 9x9 grid max --> 14 points i think
string process(vector <vector<string>> a, int I, int J, int K, int n){
//cerr << I << " " << J << " " << K << endl;
string res = string(100 ,'0');
if(K == 0){ ///first run
for(int i = 0;i <= 2;i++){
for(int j = 0;j <= 2;j++){
int pos = (i+I) * 10 + (j+J);
if(a[i][j][0] == '1') res[pos] = '1';
}
}
}
else{
for(int i = 0;i <= 2;i++){
for(int j = 0;j <= 2;j++){
for(int p = 0;p < 100;p++){
if(a[i][j][p] == '1') res[p] = '1';
}
}
}
}
if(K == n-1){ ///last phase --> convert to binary
int cnt = 0;
for(char c : res) if(c == '1') cnt++;
res = string(100, '0');
for(int p = 0;p < 100;p++){
if(cnt % 2 == 1) res[p] = '1';
cnt /= 2;
}
}
//cerr << res << endl;
return res;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
352 KB |
Incorrect |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
352 KB |
Incorrect |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
352 KB |
Incorrect |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
352 KB |
Incorrect |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
352 KB |
Incorrect |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
352 KB |
Incorrect |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
352 KB |
Incorrect |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
352 KB |
Incorrect |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
352 KB |
Incorrect |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
352 KB |
Incorrect |
2 |
Halted |
0 ms |
0 KB |
- |