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 | 3985 |
2 | jiangly | 3814 |
3 | jqdai0815 | 3682 |
4 | Benq | 3529 |
5 | orzdevinwang | 3526 |
6 | ksun48 | 3517 |
7 | Radewoosh | 3410 |
8 | hos.lyric | 3399 |
9 | ecnerwala | 3392 |
9 | Um_nik | 3392 |
# | User | Contrib. |
---|---|---|
1 | cry | 169 |
2 | maomao90 | 162 |
2 | Um_nik | 162 |
4 | atcoder_official | 161 |
5 | djm03178 | 158 |
6 | -is-this-fft- | 157 |
7 | adamant | 155 |
8 | awoo | 154 |
8 | Dominater069 | 154 |
10 | luogu_official | 150 |
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