# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
456339 | Jasiekstrz | Trobojnica (COCI19_trobojnica) | C++17 | 561 ms | 27792 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>
#define fi first
#define se second
using namespace std;
const int N=2e5;
int cnt[3];
int e[N+10];
set<int> st;
set<int> ok[3];
pair<int,int> edg[N+10];
int mex(int a,int b)
{
if(a!=0 && b!=0)
return 0;
if(a!=1 && b!=1)
return 1;
return 2;
}
int nxt(int x)
{
auto it=st.find(x);
if(next(it)==st.end())
return *st.begin();
return *next(it);
}
int prv(int x)
{
auto it=st.find(x);
if(it==st.begin())
return *prev(st.end());
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |