Submission #269314

#TimeUsernameProblemLanguageResultExecution timeMemory
269314Bill_00콤보 (IOI18_combo)C++14
10 / 100
119 ms576 KiB
#include "combo.h"
#include <bits/stdc++.h>
using namespace std;
int coins;
string t;
std::string guess_sequence(int n){
	string p="";
	for(int i=1;i<=n;i++){
      	t=p+'A';
		coins=press(t);
		if(coins==t.size()){
			p+='A';
			continue;
		}
      	t=p+'B';
		coins=press(t);
		if(coins==t.size()){
			p+='B';
			continue;
		}
      	t=p+'X';
		coins=press(t);
		if(coins==t.size()){
			p+='X';
			continue;
		}
      	t=p+'Y';
		coins=press(t);
		if(coins==t.size()){
			p+='Y';
			continue;
		}
	}
	return p;
}

Compilation message (stderr)

combo.cpp: In function 'std::string guess_sequence(int)':
combo.cpp:11:11: warning: comparison of integer expressions of different signedness: 'int' and 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   11 |   if(coins==t.size()){
      |      ~~~~~^~~~~~~~~~
combo.cpp:17:11: warning: comparison of integer expressions of different signedness: 'int' and 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   17 |   if(coins==t.size()){
      |      ~~~~~^~~~~~~~~~
combo.cpp:23:11: warning: comparison of integer expressions of different signedness: 'int' and 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   23 |   if(coins==t.size()){
      |      ~~~~~^~~~~~~~~~
combo.cpp:29:11: warning: comparison of integer expressions of different signedness: 'int' and 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   29 |   if(coins==t.size()){
      |      ~~~~~^~~~~~~~~~
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...