Submission #516034

#TimeUsernameProblemLanguageResultExecution timeMemory
516034antonioqbabGondola (IOI14_gondola)C++14
20 / 100
44 ms5460 KiB
#include <bits/stdc++.h> #include <gondola.h> using namespace std; map<int,int> mp; int valid(int n, int a[]) { int index=-1; vector<int> real(n); for(int i=0;i<n;++i){ if(mp.count(a[i])) return 0; ++mp[a[i]]; } for(int i=0; i<n; ++i) if(a[i]<=n) { index=i; break; } if(index==-1) return 1; int cur=a[index]; cur=cur==n?1:cur+1; for(int j=(index+1)%n; j!=index; j=(j+1)%n,cur=cur==n?1:cur+1) if(a[j]<=n && a[j] !=cur) return 0; return 1; } int replacement(int n, int T[], int ans[]) { return 0; } int countReplacement(int n, int T[]) { return 0; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...