Submission #916730

#TimeUsernameProblemLanguageResultExecution timeMemory
916730_VIBECombo (IOI18_combo)C++17
Compilation error
0 ms0 KiB
#inclde<bits/stdc++.h>
#include "combo.h"
using namespace std;

string guess_sequence(int N);

int press(string p);

string guess_sequence(int N) {
    
    set<char> s={'A','X','B','Y'};
  	string ans;
  
  	for(auto x:s){
      	if(press(to_string(x))==1){
           ans+=x;
           s.erase(x);break;
        }
    }
  	
  	int val=1;
  	for(int i=1;i<N;i++){
      	for(auto x:s){
          	ans+=x;
          	if(press(ans)==val+1) break;
          	ans.pop_back();
        }
    }
  
  	return ans;
}

Compilation message (stderr)

combo.cpp:1:2: error: invalid preprocessing directive #inclde; did you mean #include?
    1 | #inclde<bits/stdc++.h>
      |  ^~~~~~
      |  include
combo.cpp: In function 'std::string guess_sequence(int)':
combo.cpp:11:5: error: 'set' was not declared in this scope
   11 |     set<char> s={'A','X','B','Y'};
      |     ^~~
combo.cpp:3:1: note: 'std::set' is defined in header '<set>'; did you forget to '#include <set>'?
    2 | #include "combo.h"
  +++ |+#include <set>
    3 | using namespace std;
combo.cpp:11:9: error: expected primary-expression before 'char'
   11 |     set<char> s={'A','X','B','Y'};
      |         ^~~~
combo.cpp:14:15: error: 's' was not declared in this scope
   14 |    for(auto x:s){
      |               ^
combo.cpp:23:19: error: 's' was not declared in this scope
   23 |        for(auto x:s){
      |                   ^