Submission #1317888

#TimeUsernameProblemLanguageResultExecution timeMemory
1317888jokukCombo (IOI18_combo)C++20
Compilation error
0 ms0 KiB
#include<combo.h>
#include<bits/stdc++.h>
using namespace std;
vector<string> choices = {"A","B","X","Y"};
string guess_sequence(int n){
	cin.tie(nullptr)->sync_with_stdio(false);
	string p="";
	if(press("AB"))
	{
		if(press("A"))
		{
			p+="A";
		}
		else
		{
			p+="B";
		}
	}
	else 
	{
		if(press=="X")
		{
			p+="X";
		}
		else
		{
			p+="Y";
		}
	}
	int cur = 1;
    for(int i = 0; i < 4; i++)
    {
        if(p[0] == choices[i][0])
        {
            choices.erase(choices.begin()+i);
        }
    }
	 for(int i=2;i<n;i++)
    {
     string temp = p+choices[0];
      temp += p+choices[1]+choices[0];
      temp += p+choices[1]+choices[1];
      temp += p+choices[1]+choices[2];
      int res = press(temp);
      if(res == cur)
      {
         p+=choices[2];
      }
      else if(res == cur+1)
      {
        p+=choices[0];
      }
      else if(res == cur+2)
      {
        p+=choices[1];
      }
      cur++;
    }
    if(p.length()==n) return p;
    if(press(p+choices[0])==n) p+=choices[0];
    else if(press(p+choices[1])==n) p+= choices[1];
    else p+= choices[2];
    return p;
}

Compilation message (stderr)

combo.cpp:1:9: fatal error: combo.h: No such file or directory
    1 | #include<combo.h>
      |         ^~~~~~~~~
compilation terminated.