# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
608758 | Duy_e | Monster Game (JOI21_monster) | C++17 | 201 ms | 416 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 "monster.h"
using namespace std;
namespace {
bool example_variable;
} // namespace
const long long N = 2e2 + 5;
int ans[N][N];
std::vector<int> Solve(int n) {
std::vector<int> T(n);
int pos = 0;
for (int i = 0; i < n; i ++) {
for (int j = 0; j < n; j ++)
if (i != j) {
ans[i][j] = Query(i, j);
T[i] += ans[i][j];
}
if (T[i] == 2) pos = i;
}
for (int i = 0; i < n; i ++) if (T[i] == 1) {
if (!ans[i][pos]) T[i] = 0;
}
return T;
}
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |