Today I tried to solve
this problem
I wrote this
code
But it says compilation error.What do I need to do??? Help please!
№ | Пользователь | Рейтинг |
---|---|---|
1 | tourist | 3993 |
2 | jiangly | 3743 |
3 | orzdevinwang | 3707 |
4 | Radewoosh | 3627 |
5 | jqdai0815 | 3620 |
6 | Benq | 3564 |
7 | Kevin114514 | 3443 |
8 | ksun48 | 3434 |
9 | Rewinding | 3397 |
10 | Um_nik | 3396 |
Страны | Города | Организации | Всё → |
№ | Пользователь | Вклад |
---|---|---|
1 | cry | 167 |
2 | Um_nik | 163 |
3 | maomao90 | 162 |
3 | atcoder_official | 162 |
5 | adamant | 159 |
6 | -is-this-fft- | 158 |
7 | awoo | 156 |
8 | TheScrasse | 154 |
9 | Dominater069 | 153 |
10 | nor | 152 |
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!
Название |
---|
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