# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
222480 | dantoh000 | Checker (COCI19_checker) | C++14 | 781 ms | 75932 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;
typedef pair<int,int> ii;
unordered_map<int, unordered_map<int, int> > adjmat;
vector<ii> adjlist[200005];
int st, n;
vector<ii> edg;
int f1, f2;
void addedge(int a, int b, int c){
adjmat[a][b] = adjmat[b][a] = c;
adjlist[a].push_back({b,c});
adjlist[b].push_back({a,c});
if (a > b) swap(a,b);
edg.push_back({a,b});
}
int cur;
bool cmp(ii a, ii b){
return (n+a.first-cur)%n < (n+b.first-cur)%n;
}
int main(){
scanf("%d",&st);
scanf("%d",&n);
f1 = f2 = 1;
for (int i = 1; i <= n; i++){
char x;
scanf(" %c",&x);
addedge(i,i%n+1,x-'0');
}
for (int i = 0; i < n-3; i++){
int a,b,c;
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... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |