제출 #830610

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

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

coins.cpp: In function 'std::vector<int> coin_flips(std::vector<int>, int)':
coins.cpp:7:18: 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: 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++)
      |                 ~^~~~~~~~~
#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...