제출 #955408

#제출 시각아이디문제언어결과실행 시간메모리
955408guymmkCoins (IOI17_coins)C++14
0 / 100
6 ms1696 KiB
#include "bits/stdc++.h" using namespace std; vector<int> coin_flips(vector<int> b, int c){ int o=0; for(int i=0;i<b.size();i++){ if(b[i])o^=i; }for(int i=0;i<b.size();i++){ if(o^b[i]==c){ vector<int>v={i}; return v; } } }int find_coin(vector<int> b){ int o=0; for(int i=0;i<b.size();i++){ if(b[i])o^=i; }return o; }

컴파일 시 표준 에러 (stderr) 메시지

coins.cpp: In function 'std::vector<int> coin_flips(std::vector<int>, int)':
coins.cpp:5:18: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
    5 |     for(int i=0;i<b.size();i++){
      |                 ~^~~~~~~~~
coins.cpp:7:19: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
    7 |     }for(int i=0;i<b.size();i++){
      |                  ~^~~~~~~~~
coins.cpp:8:18: warning: suggest parentheses around comparison in operand of '^' [-Wparentheses]
    8 |         if(o^b[i]==c){
coins.cpp: In function 'int find_coin(std::vector<int>)':
coins.cpp:15:18: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   15 |     for(int i=0;i<b.size();i++){
      |                 ~^~~~~~~~~
coins.cpp: In function 'std::vector<int> coin_flips(std::vector<int>, int)':
coins.cpp:13:1: warning: control reaches end of non-void function [-Wreturn-type]
   13 | }int find_coin(vector<int> b){
      | ^
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...