# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
731109 | hoainiem | Mars (APIO22_mars) | C++17 | 138 ms | 2780 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include "mars.h"
#include <bits/stdc++.h>
#define fi first
#define se second
using namespace std;
typedef pair<int, int> pii;
int get(int i, int j, int n){
i /= 2;
j /= 2;
n = n / 2 + (n & 1);
return i * n + j;
}
string operator|(string x, string y){
for (int i = 0; i < 100; i++)
if (y[i] == '1')
x[i] = y[i];
return x;
}
std::string process(std::vector <std::vector<std::string>> a, int x, int y, int k, int n){
if (!k)
for (int i = 0; i < 3; i++)
for (int j = 0; j < 3; j++)
if (a[i][j][0] == '1'){
a[i][j][0] = '0';
a[i][j][get(x + i, y + j, n * 2 + 1)] = '1';
}
a[0][0] = a[0][0] | a[2][0] | a[0][2] | a[2][2];
if (k < n - 1)
return a[0][0];
n = n * 2 + 1;
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |