제출 #485962

#제출 시각아이디문제언어결과실행 시간메모리
485962ala2콤보 (IOI18_combo)C++14
10 / 100
72 ms444 KiB
#include "combo.h" using namespace std; string guess_sequence(int N) { string p = ""; for (int i = 0; i < 4 * N; ++i) { p += 'A'; } int coins = press(p); string S = ""; for (int i = 0; i < N; ++i) { S += 'A'; } int h=N; string ans=""; for(int i=0;i<h;i++){ int a=press(ans+"A"); if(a==i+1) { ans+="A"; continue; } int b=press(ans+"B"); if(b==i+1) { ans+="B"; continue; } int x=press(ans+"X"); if(x==i+1) { ans+="X"; continue; } ans+="Y"; } return ans; }

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

combo.cpp: In function 'std::string guess_sequence(int)':
combo.cpp:8:7: warning: unused variable 'coins' [-Wunused-variable]
    8 |   int coins = press(p);
      |       ^~~~~
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...