제출 #269841

#제출 시각아이디문제언어결과실행 시간메모리
269841barsbold콤보 (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; }

컴파일 시 표준 에러 (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...