제출 #546525

#제출 시각아이디문제언어결과실행 시간메모리
546525srivatsav_kannan콤보 (IOI18_combo)C++14
10 / 100
65 ms572 KiB
#include <iostream> #include <fstream> #include <vector> #include <set> #include <queue> #include <cmath> #include <map> #include <algorithm> #include <numeric> #include <stack> #include <cstring> #include <bitset> #include <climits> #include <valarray> #include <list> #include "combo.h" //#define int long long #define INF 1000000000 #define endl '\n' #define mod 1000000007 using namespace std; string ar[4] = {"A", "B", "X", "Y"}; string guess_sequence(signed n){ string ans = ""; for (int i = 0; i < n; i++){ for (int j = 0; j < 4; j++) { string temp = ans; temp += ar[j]; if (press(temp) == ans.size()+1) { ans += ar[j]; break; } } } return ans; } //signed main(){ // ios_base::sync_with_stdio(false); // cin.tie(0); // cout.tie(0); // //}

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

combo.cpp: In function 'std::string guess_sequence(int)':
combo.cpp:29:29: warning: comparison of integer expressions of different signedness: 'int' and 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   29 |             if (press(temp) == ans.size()+1) {
      |                 ~~~~~~~~~~~~^~~~~~~~~~~~~~~
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...