# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1004247 | aykhn | Trobojnica (COCI19_trobojnica) | C++17 | 433 ms | 524288 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 <bits/stdc++.h>
using namespace std;
#define inf 0x3F3F3F3F3F3F3F3F
const int MXN = 20 + 5;
const int mod = 1e9 + 7;
const int LOG = 20;
int n;
vector<array<int, 3>> res;
int ok(vector<array<int, 3>> &v)
{
if (v.size() == 3)
{
return v[0][0] != v[1][0] && v[0][0] != v[2][0] && v[1][0] != v[2][0];
}
for (int i = 0; i < v.size(); i++)
{
if (v[i][0] != v[(i + 1) % n][0])
{
vector<array<int, 3>> nw;
for (int j = 0; j < v.size(); j++)
{
if (j != i && j != (i + 1) % n)
{
nw.push_back(v[j]);
}
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... |