# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
744301 |
2023-05-18T11:09:30 Z |
saayan007 |
Mars (APIO22_mars) |
C++17 |
|
1 ms |
200 KB |
#include "bits/stdc++.h"
using namespace std;
using ll = long long;
#include "mars.h"
string process(vector <vector<string>> a, int i, int j, int k, int n)
{
ll res = 0;
if(n == 2) {
if(k == 0) {
for(int di = 0; di < 3; ++di) {
for(int dj = 0; dj < 3; ++dj) {
int x = i + di, y = j + dj;
ll add = 0;
if(a[di][dj][0] == '1') ++add;
ll mi = (x > 2 ? 5 - x : x + 1);
ll mj = (y > 2 ? 5 - y : y + 1);
res += add * 36 / (mi * mj);
}
}
string ans = "";
for(int i = 0; i < 100; ++i) {
if(res % 2) ans.push_back('1');
else ans.push_back('0');
res /= 2;
}
return ans;
}
else {
for(int di = 0; di < 3; ++di) {
for(int dj = 0; dj < 3; ++dj) {
ll ans = 0;
for(int i = 99; i >= 0; --i) {
ans *= 2;
if(a[di][dj][i] == '1') ans = ans + 1;
}
res += ans;
}
}
res /= 36;
string ans = "";
for(int i = 0; i < 100; ++i) {
if(res % 2) ans.push_back('1');
else ans.push_back('0');
res /= 2;
}
return ans;
}
}
else {
for(int di = 0; di < 3; ++di) {
for(int dj = 0; dj < 3; ++dj) {
ll ans = 0;
for(int i = 99; i >= 0; --i) {
ans *= 2;
if(a[di][dj][i] == '1') ans = ans + 1;
}
res += ans;
}
}
string ans = "";
for(int i = 0; i < 100; ++i) {
if(res % 2) ans.push_back('1');
else ans.push_back('0');
res /= 2;
}
return ans;
}
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
200 KB |
Incorrect |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
200 KB |
Incorrect |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
200 KB |
Incorrect |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
200 KB |
Incorrect |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
200 KB |
Incorrect |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
200 KB |
Incorrect |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
200 KB |
Incorrect |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
200 KB |
Incorrect |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
200 KB |
Incorrect |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
200 KB |
Incorrect |
2 |
Halted |
0 ms |
0 KB |
- |