제출 #77283

#제출 시각아이디문제언어결과실행 시간메모리
77283MvCGondola (IOI14_gondola)C++11
컴파일 에러
0 ms0 KiB
#include "gondola.h" #include<bits/stdc++.h> #define rc(x) return cout<<x<<endl,0 #define pb push_back #define in insert #define er erase #define fd find #define fr first #define sc second typedef long long ll; const ll INF=0x3f3f3f3f3f3f3f3f; const ll llinf=(1LL<<61); const int inf=(1<<30); const int nmax=3e5+50; const int mod=1e9+7; using namespace std; int valid(int n, int inSeq[]) { int start=-1; for (int i=0;i<n;i++){ if (used[inSeq[i]]){ return 0; } used[inSeq[i]]=true; if (inSeq[i]<=n){ if (start!=-1 && (n+i-inSeq[i]+1)%n!=start){ return 0; } start=(n+i-inSeq[i]+1)%n; } } return 1; } int replacement(int n, int gondolaSeq[], int replacementSeq[]) { return 0; } int countReplacement(int n, int inputSeq[]) { return 0; } /*int main() { //freopen("sol.in","r",stdin); //freopen("sol.out","w",stdout); ios_base::sync_with_stdio(false);cin.tie(0);cerr.tie(0);cout.tie(0); return 0; }*/

컴파일 시 표준 에러 (stderr) 메시지

gondola.cpp: In function 'int valid(int, int*)':
gondola.cpp:21:7: error: 'used' was not declared in this scope
   if (used[inSeq[i]]){
       ^~~~
gondola.cpp:24:3: error: 'used' was not declared in this scope
   used[inSeq[i]]=true;
   ^~~~