답안 #498069

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
498069 2021-12-24T11:17:49 Z IOI_champion_in_1980 콤보 (IOI18_combo) C++14
0 / 100
0 ms 200 KB
#include<bits/stdc++.h>
using namespace std;
int a, b, c, d, e, n, m;
string s, t, st;
int press(string p);
string guess_sequence(int n) {
//int main() {
	s="ABXY";
	string yok="", p="";
	for (a=0; a<3; a++)
	{
		string k;
		k=k+s[a];
		if (press(k)==1)
		{
			p=p+s[a];
			break;
		}
		else
		{
			yok=yok+s[a];
		}
	}
	if (p.length()==0) p=p+s[3]; else yok=yok+s[3];
	for (a=2; a<=n-1; a++)
	{
		int k=press(p+yok[0]+yok[0]+p+yok[0]+yok[1]+p+yok[0]+yok[2]+p+yok[1]);
		if (k==2) p=p+yok[0];
			else if (k==1) p=p+yok[1];
				else p=p+yok[2];
	}
	return p;
}
# 결과 실행 시간 메모리 Grader output
1 Incorrect 0 ms 200 KB Wrong Answer: wrong guess.
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 200 KB Output is correct
2 Correct 0 ms 200 KB Output is correct
3 Correct 0 ms 200 KB Output is correct
4 Correct 0 ms 200 KB Output is correct
5 Incorrect 0 ms 200 KB Wrong Answer: wrong guess.
6 Halted 0 ms 0 KB -