Submission #772309

#TimeUsernameProblemLanguageResultExecution timeMemory
772309tolbiCombo (IOI18_combo)C++17
0 / 100
1 ms208 KiB
#pragma optimize("Bismillahirrahmanirrahim") //█▀█─█──█──█▀█─█─█ //█▄█─█──█──█▄█─█■█ //█─█─█▄─█▄─█─█─█─█ //Allahuekber //ahmet23 orz!.. //FatihSultanMehmedHan //YavuzSultanSelimHan //AbdulhamidHan //Sani buyuk Osman Pasa Plevneden cikmam diyor #define author tolbi #include <bits/stdc++.h> using namespace std; template<typename X, typename Y> istream& operator>>(istream& is, pair<X,Y> &pr){return is>>pr.first>>pr.second;} template<typename X, size_t Y> istream& operator>>(istream& is, array<X,Y> arr){for (auto &it : arr) is>>it; return is;} template<typename T> istream& operator>>(istream& is, vector<T> arr){for (auto &it : arr) is>>it; return is;} #define deci(x) int x;cin>>x; #define decstr(x) string x;cin>>x; #define endl '\n' #define ios ios_base::sync_with_stdio(false);cin.tie(0);cout.tie(0); #define vint(x) vector<int> x #define cinarr(x) for(auto &it : x) cin>>it; #define coutarr(x) for (auto &it : x) cout<<it<<" ";cout<<endl; #define sortarr(x) sort(x.begin(), x.end()) #define sortrarr(x) sort(x.rbegin(), x.rend()) #define rev(x) reverse(x.begin(), x.end()) #define tol(bi) (1LL<<((int)(bi))) mt19937 ayahya(chrono::high_resolution_clock().now().time_since_epoch().count()); #include "combo.h" string guess_sequence(int N){ string fs = ""; vector<char> tahmin; if (press("A")==1) fs+='A'; else tahmin.push_back('A'); if (press("B")==1) fs+='B'; else tahmin.push_back('B'); if (press("X")==1) fs+='X'; else tahmin.push_back('X'); if (press("Y")==1) fs+='Y'; else tahmin.push_back('Y'); for (int i = 1; i < N; i++){ string ss=""; for (int j = 0; j < 3; j++){ ss+=fs; ss.push_back(tahmin[0]); ss.push_back(tahmin[j]); } ss+=fs; ss.push_back(tahmin[1]); int res = press(ss); if (res==i) fs.push_back(tahmin[2]); else if (res==i+1) fs.push_back(tahmin[1]); else fs.push_back(tahmin[0]); } return fs; }

Compilation message (stderr)

combo.cpp:1: warning: ignoring '#pragma optimize ' [-Wunknown-pragmas]
    1 | #pragma optimize("Bismillahirrahmanirrahim")
      |
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...