Submission #285986

#TimeUsernameProblemLanguageResultExecution timeMemory
285986Dremix10Gondola (IOI14_gondola)C++17
20 / 100
16 ms1536 KiB
#include "gondola.h" #include <bits/stdc++.h> using namespace std; typedef long long ll; typedef long double ld; typedef unsigned long long ull; typedef pair<int,int> pi; typedef pair<ll,ll> pl; #define F first #define S second #define endl '\n' #define all(x) (x).begin(),(x).end() #ifdef dremix #define p(x) cerr<<#x<<" = "<<x<<endl; #define p2(x,y) cerr<<#x<<" , "<<#y<<" = "<<x<<" , "<<y<<endl; #define pp(x) cerr<<#x<<" = ("<<x.F<<" , "<<x.S<<")"<<endl; #define pv(x) cerr<<#x<<" = {";for(auto u : x)cerr<<u<<", ";cerr<<"}"<<endl; #define ppv(x) cerr<<#x<<" = {";for(auto u : x)cerr<<u.F<<"-"<<u.S<<", ";cerr<<"}"<<endl; #else #define p(x) #define p2(x,y) #define pp(x) #define pv(x) #define ppv(x) #endif #define fastio ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0); const int maxp = 22; const ld EPS = 1e-18; const ll INF = 1e18; const int MOD = 1e9+7; const int N = 3e5+1; int valid(int n, int arr[]){ bool v[N]={}; int i; int idx = -1; for(i=0;i<n;i++){ if(v[arr[i]]) return 0; v[arr[i]]=1; if(arr[i]<=n)idx = i; } if(idx==-1)return 1; int curr = arr[idx]; for(i=0;i<n;i++){ if(arr[idx]<=n && arr[idx]!=curr)return 0; curr++; idx++; if(curr>n)curr-=n; idx%=n; } return 1; } int replacement(int n, int gondolaSeq[], int replacementSeq[]){ } int countReplacement(int n, int inputSeq[]){ }

Compilation message (stderr)

gondola.cpp: In function 'int replacement(int, int*, int*)':
gondola.cpp:60:1: warning: no return statement in function returning non-void [-Wreturn-type]
   60 | }
      | ^
gondola.cpp: In function 'int countReplacement(int, int*)':
gondola.cpp:66:1: warning: no return statement in function returning non-void [-Wreturn-type]
   66 | }
      | ^
#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...