제출 #1006122

#제출 시각아이디문제언어결과실행 시간메모리
1006122m5588ohammedCoins (IOI17_coins)C++14
0 / 100
5 ms1356 KiB
#include <bits/stdc++.h> using namespace std; vector<int> coin_flips(vector<int> b, int c) { int num=0; vector <int> flips; for(int i=0;i<b.size();i++){ flips.push_back(b[i]); if(b[i]==1) num^=i; } num^=c; flips[num]^=1; return flips; } int find_coin(vector<int> b) { int num=0; for(int i=0;i<b.size();i++) if(b[i]==1) num^=i; return num; }

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

coins.cpp: In function 'std::vector<int> coin_flips(std::vector<int>, int)':
coins.cpp:6:18: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
    6 |     for(int i=0;i<b.size();i++){
      |                 ~^~~~~~~~~
coins.cpp: In function 'int find_coin(std::vector<int>)':
coins.cpp:17:18: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   17 |     for(int i=0;i<b.size();i++) if(b[i]==1) num^=i;
      |                 ~^~~~~~~~~
#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...