Submission #1278296

#TimeUsernameProblemLanguageResultExecution timeMemory
1278296mm2302Combo (IOI18_combo)C++20
5 / 100
2 ms400 KiB
// Source: https://usaco.guide/general/io #include <bits/stdc++.h> #include "combo.h" using namespace std; string guess_sequence(int n){ if(n==3){ int main_button; if(press("A")==1) main_button=0; else if(press("B")==1) main_button=1; else if(press("X")==1) main_button=2; else if(press("Y")==1) main_button=3; string s="ABXY"; for(int i=0;i<4;i++){ for(int j=0;j<4;j++){ if(i!=main_button && j!=main_button){ string p=string(1, s[main_button])+s[i]+s[j]; if(press(p)==3) return p; } } } } else return ("jgk"); } /* int main() { int a, b, c; cin >> a >> b >> c; cout << "The sum of these three numbers is " << a + b + c << "\n"; }*/

Compilation message (stderr)

combo.cpp: In function 'std::string guess_sequence(int)':
combo.cpp:25:1: warning: control reaches end of non-void function [-Wreturn-type]
   25 | }
      | ^
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...