Submission #615582

#TimeUsernameProblemLanguageResultExecution timeMemory
615582nohaxjustsofloGondola (IOI14_gondola)C++17
20 / 100
14 ms1136 KiB
#include <bits/stdc++.h> #include <iostream> using namespace std; typedef long long ll; typedef unsigned long long ull; typedef long double ld; #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> using namespace __gnu_pbds; typedef tree<ll,null_type,less_equal<ll>,rb_tree_tag,tree_order_statistics_node_update> order_set; mt19937 mt_rand(chrono::high_resolution_clock::now().time_since_epoch().count()); //uniform_int_distribution<int> gen; ///(min, max) //int random() {return gen(mt_rand);} const int mxN=1e6+5; const int mod=998244353; const int mxlogN=40; const int mxK=26; const int inf=2e9; const int K=600; #include "gondola.h" int valid(int n, int inputSeq[]) { for(int i=0; i<n; i++) { if(inputSeq[i]<=n) { for(int j=i+1; j-i<n; j++) { int j2=j%n; if(inputSeq[j2]<=n&&inputSeq[j2]!=(inputSeq[i]+j-i-1)%n+1) return 0; } break; } } sort(inputSeq,inputSeq+n); for(int i=0; i+1<n; i++) if(inputSeq[i]==inputSeq[i+1]) return 0; return 1; } //---------------------- int replacement(int n, int gondolaSeq[], int replacementSeq[]) { return -2; } //---------------------- int countReplacement(int n, int inputSeq[]) { return -3; } /* int main() { int n,m,k; cin >> n >> m >> k; int r[m][2], l[m], p[n]; for(int i=0; i<m; i++) cin >> r[i][0] >> r[i][1] >> l[i]; for(int i=0; i<k; i++) cin >> p[i]; cout << travel_plan(n,m,r,l,k,p) << "\n"; } */ /* 5 4 3 0 1 2 0 2 3 3 2 1 2 4 4 1 3 4 */
#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...