Today I tried to solve
this problem
I wrote this
code
But it says compilation error.What do I need to do??? Help please!
# | User | Rating |
---|---|---|
1 | tourist | 4009 |
2 | jiangly | 3823 |
3 | Benq | 3738 |
4 | Radewoosh | 3633 |
5 | jqdai0815 | 3620 |
6 | orzdevinwang | 3529 |
7 | ecnerwala | 3446 |
8 | Um_nik | 3396 |
9 | ksun48 | 3390 |
10 | gamegame | 3386 |
# | User | Contrib. |
---|---|---|
1 | cry | 167 |
2 | Um_nik | 163 |
3 | maomao90 | 162 |
3 | atcoder_official | 162 |
5 | adamant | 159 |
6 | -is-this-fft- | 158 |
7 | awoo | 157 |
8 | TheScrasse | 154 |
9 | Dominater069 | 153 |
9 | nor | 153 |
Today I tried to solve
I wrote this
#include<bits/stdc++.h>
using namespace std;
#define ll long long
#define ff first
#define ss second
#define pb push_back
string guess_sequence(int N){
string ans="";
for(int i=1;i<=N;i++){
int z=press(ans+'A');
int k=ans.size();
if(z==k+1){
ans+='A';
continue;
}
z=press(ans+'B');
if(z==k+1){
ans+='B';
continue;
}
z=press(ans+'X');
if(z==k+1){
ans+='X';
continue;
}
z=press(ans+'Y');
if(z==k+1){
ans+='Y';
continue;
}
}
return ans;
}
But it says compilation error.What do I need to do??? Help please!
Name |
---|
guess_sequance
is a mistake, replace it withguess_sequence
since the function needs to have the precisely correct name to be read correctly by the graderYeah thanks I changed it but it says:
Try putting
#include "combo.h"
at the beginning of your submission.Thanks it worked but how did you know that I must write this
#include "combo.h"
.
You need to include the file in order to call the
press()
function.This function is defined in the
combo.h
header file