제출 #93018

#제출 시각아이디문제언어결과실행 시간메모리
93018temoyanteladze콤보 (IOI18_combo)C++14
컴파일 에러
0 ms0 KiB
#include<bits/stdc++.h> #include "combo.h" using namespace std; string guess_sequence(int n) { string s=""; string ch=""; if (press("A")) { s+="A"; ch="A"; } if (press("B")) { s+="B"; ch="B"; } if (press("X")) { s+="X"; ch="X"; } if (press("Y")) { s+="Y"; ch="Y"; } string t="ABXY"; int k=t.find(ch); t.erase(k); for (int i=2;i<=n;i++) { for (ll i=0;i<t.size();i++) { if (press(s+t[i])==i) { s+=t[i]; break; } } } return s; }

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

combo.cpp: In function 'std::string guess_sequence(int)':
combo.cpp:38:14: error: 'll' was not declared in this scope
   38 |         for (ll i=0;i<t.size();i++)
      |              ^~
combo.cpp:38:22: warning: comparison of integer expressions of different signedness: 'int' and 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   38 |         for (ll i=0;i<t.size();i++)
      |                     ~^~~~~~~~~