# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
742253 | 2023-05-16 02:42:08 | Osplei | Combo (IOI18_combo) | C++17 | Compilation error | 0 ms | 0 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#include "combo.h"
#include <bits/stdc++.h>
using namespace std;
string guess_sequence(int N) {
string p = "";
p="AB";
int coins = press(p);
if (coins!=0) {
p="A";
coins = press(p);
if (coins==0) p="B";
} else {
p="X";
coins = press(p);
if (coins==0) p="Y";
}
string S = p;
if (p=="A"){
while (S.size()!=N-1){
p=S;
p+='B';
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Compilation message (stderr)
combo.cpp: In function 'std::string guess_sequence(int)': combo.cpp:28:20: warning: comparison of integer expressions of different signedness: 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} and 'int' [-Wsign-compare] 28 | while (S.size()!=N-1){ | ~~~~~~~~^~~~~ combo.cpp:40:17: warning: comparison of integer expressions of different signedness: 'int' and 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} [-Wsign-compare] 40 | if (coins == S.size()) S+='Y'; | ~~~~~~^~~~~~~~~~~ combo.cpp:41:22: warning: comparison of integer expressions of different signedness: 'int' and 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} [-Wsign-compare] 41 | else if (coins == S.size()+1) S+='B'; | ~~~~~~^~~~~~~~~~~~~ combo.cpp:61:20: warning: comparison of integer expressions of different signedness: 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} and 'int' [-Wsign-compare] 61 | while (S.size()!=N-1){ | ~~~~~~~~^~~~~ combo.cpp:73:17: warning: comparison of integer expressions of different signedness: 'int' and 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} [-Wsign-compare] 73 | if (coins == S.size()) S+='Y'; | ~~~~~~^~~~~~~~~~~ combo.cpp:74:22: warning: comparison of integer expressions of different signedness: 'int' and 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} [-Wsign-compare] 74 | else if (coins == S.size()+1) S+='A'; | ~~~~~~^~~~~~~~~~~~~ combo.cpp:94:22: error: 'n' was not declared in this scope 94 | while (S.size()!=n-1){ | ^ combo.cpp:106:17: warning: comparison of integer expressions of different signedness: 'int' and 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} [-Wsign-compare] 106 | if (coins == S.size()) S+='Y'; | ~~~~~~^~~~~~~~~~~ combo.cpp:107:22: warning: comparison of integer expressions of different signedness: 'int' and 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} [-Wsign-compare] 107 | else if (coins == S.size()+1) S+='B'; | ~~~~~~^~~~~~~~~~~~~ combo.cpp:127:22: error: 'n' was not declared in this scope 127 | while (S.size()!=n-1){ | ^ combo.cpp:139:17: warning: comparison of integer expressions of different signedness: 'int' and 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} [-Wsign-compare] 139 | if (coins == S.size()) S+='A'; | ~~~~~~^~~~~~~~~~~ combo.cpp:140:22: warning: comparison of integer expressions of different signedness: 'int' and 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} [-Wsign-compare] 140 | else if (coins == S.size()+1) S+='B'; | ~~~~~~^~~~~~~~~~~~~