제출 #772308

#제출 시각아이디문제언어결과실행 시간메모리
772308tolbi콤보 (IOI18_combo)C++17
10 / 100
51 ms540 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());
int press(string p);
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++){
		for (int j = 0; j < 3; j++){
			string ss = fs;
			ss+=tahmin[j];
			if (press(ss)==i+1){
				fs+=tahmin[j];
				break;
			}
		}
	}
	return fs;
}

컴파일 시 표준 에러 (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...