Submission #955413

#TimeUsernameProblemLanguageResultExecution timeMemory
955413guymmkCoins (IOI17_coins)C++14
100 / 100
8 ms1940 KiB
#include "bits/stdc++.h" using namespace std; vector<int> coin_flips(vector<int> b, int c){ int o=c; for(int i=0;i<b.size();i++){ o^=(b[i]*i); }vector<int>v; v.push_back(o); 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; }

Compilation message (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: In function 'int find_coin(std::vector<int>)':
coins.cpp:12:18: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   12 |     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...