제출 #1263611

#제출 시각아이디문제언어결과실행 시간메모리
1263611rana_azkaCombo (IOI18_combo)C++20
컴파일 에러
0 ms0 KiB
#include "combo.h" #include <bits/stdc++.h> using namespace std; string guess_sequence(int N) { string ans; for(int i = 1; i <= n; i++){ ans += '0'; int jury; cin >> jury; ans[i-1] = 'A'; jury = press(ans); if(jury == i) continue; ans[i-1] = 'B'; jury = press(ans); if(jury == i) continue; ans[i-1] = 'X'; jury = press(ans); if(jury == i) continue; ans[i-1] = 'Y'; jury = press(ans); if(jury == i) continue; } return ans; }

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

combo.cpp: In function 'std::string guess_sequence(int)':
combo.cpp:7:23: error: 'n' was not declared in this scope
    7 |   for(int i = 1; i <= n; i++){
      |                       ^