제출 #1236557

#제출 시각아이디문제언어결과실행 시간메모리
1236557al_reem_2010Combo (IOI18_combo)C++20
0 / 100
0 ms408 KiB
// اَللَهُمَ صَلِ عَلَىَ مُحَمَدٍ وَ آلِ مُحَمَدٍ #include "combo.h" #include "bits/stdc++.h" #include <iostream> #include <vector> #include <string> #include <algorithm> #include <cmath> #include <map> #include <set> #include <queue> #include <thread> #include <fstream> #include <stack> using namespace std ; //#define int long long #define pb push_back #define si size() #define fi first #define se second #define all(a) a.begin(),a.end() #define applejuice ios::sync_with_stdio(false) ; cin.tie(nullptr) ; cout.tie(nullptr) ; const int inf=1e18 ; const int mod=1e9+7 ; const int maxn=1e5+7 ; int tt=1 ; // A B X Y string guess_sequence(int n) { string s="" ; string t="" ; // 0 if(press("AB")==1) { if(press("A")==1) {s+='A' ; t="BXY" ;} else {s+='B' ; t="AXY" ;} } else { if(press("X")) {s+='X' ; t="ABY" ;} else {s+='Y' ; t="ABX" ;} } // 1 to n-2 for(int i=1 ; i<n-1 ; i++) { int ans=press(s+s+t[1]+s+t[2]+t[0]+s+t[2]+t[1]+s+t[2]+t[2]) ; s+=t[s.si-ans] ; } // n-1 if(press(s+t[0]+s+t[1])==s.si+1) { if(press(s+t[0])==s.si+1) {s+=t[0] ;} else {s+=t[1] ;} } else {s+=t[2] ;} return s ; } /* signed main() { //wrong applejuice ; //cin >> tt ; while(tt--) {solve() ;} } */

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

combo.cpp:23:15: warning: overflow in conversion from 'double' to 'int' changes value from '1.0e+18' to '2147483647' [-Woverflow]
   23 | const int inf=1e18 ;
      |               ^~~~
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...