Submission #1309136

#TimeUsernameProblemLanguageResultExecution timeMemory
1309136coderg콤보 (IOI18_combo)C++20
Compilation error
0 ms0 KiB
#include "combo.h"
#include "bits/stdc++.h"
using namespace std;

string full="ABXY";

string guess_sequence(int N) {
  string ans="",s="";
  ans+=press("AB")?press("A")?"A":"B":press("X")?"X":"Y";
  for(char c:full){
    if(c!=ans[0])s+=c;
  }
  F(i,1,N-1){
    int send=press(ans+s[0]+s[0]+ans+s[0]+s[1]+ans+s[0]+s[2]+ans+s[1]);
    if(send==i)ans+=s[2];
    else if(send==i+1)ans+=s[1];
    else ans+=s[0];
  }
  if(N>1){
    if(press(ans+s[0])==N)ans+=s[0];
    else if(press(ans+s[1])==N)ans+=s[1];
    else ans+=s[2];
  }
  return ans;
}

Compilation message (stderr)

combo.cpp: In function 'std::string guess_sequence(int)':
combo.cpp:13:5: error: 'i' was not declared in this scope
   13 |   F(i,1,N-1){
      |     ^
combo.cpp:13:3: error: 'F' was not declared in this scope
   13 |   F(i,1,N-1){
      |   ^