제출 #582190

#제출 시각아이디문제언어결과실행 시간메모리
582190kamelfanger83곤돌라 (IOI14_gondola)C++14
20 / 100
16 ms656 KiB
#include <iostream> #include <vector> #include "gondola.h" #include <limits> using namespace std; int valid(int n, int inputSeq[]){ int one = numeric_limits<int>::min(); vector<bool> used (250001, false); for(int c = 0; c < n; c++){ if(inputSeq[c] <= n){ if(one == numeric_limits<int>::min()) one = c - inputSeq[c] + 1; if((c - one + 1) % n != inputSeq[c] % n) return 0; } else{ if(used[inputSeq[c]]) return 0; used[inputSeq[c]] = true; } } return 1; } int replacement(int n, int gondolaSeq[], int replacementSeq[]){ } int countReplacement(int n, int inputSeq[]){ }

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

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