Submission #269841

#TimeUsernameProblemLanguageResultExecution timeMemory
269841barsboldCombo (IOI18_combo)C++14
0 / 100
1 ms200 KiB
#include "combo.h" #include <bits/stdc++.h> #define ff first #define ss second #define pb push_back std::string guess_sequence(int N) { std::string p = ""; std::string s = ""; s = p + 'A'; if(s[s.size() - 1] == 'A'){ int coins = press(s); if(coins = s.size()){ p+="A"; } } s = p + "B"; if(s[s.size() - 1] == 'B'){ int coins = press(s); if(coins = s.size()){ p+="B"; } } s = p +"X"; if(s[s.size() - 1] == 'X'){ int coins = press(s); if(coins = s.size()){ p+="X"; } } s = p + 'Y'; if(s[s.size() - 1] == 'Y'){ int coins = press(s); if(coins = s.size()){ p+="Y"; } } return p; }

Compilation message (stderr)

combo.cpp: In function 'std::string guess_sequence(int)':
combo.cpp:12:14: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
   12 |     if(coins = s.size()){
      |        ~~~~~~^~~~~~~~~~
combo.cpp:19:14: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
   19 |     if(coins = s.size()){
      |        ~~~~~~^~~~~~~~~~
combo.cpp:26:14: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
   26 |     if(coins = s.size()){
      |        ~~~~~~^~~~~~~~~~
combo.cpp:33:14: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
   33 |     if(coins = s.size()){
      |        ~~~~~~^~~~~~~~~~
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...