Submission #524024

#TimeUsernameProblemLanguageResultExecution timeMemory
524024DeepessonCoins (IOI17_coins)C++17
0 / 100
10 ms1520 KiB
#include <bits/stdc++.h> #include "coins.h" std::vector<int> coin_flips(std::vector<int> b, int c) { std::vector<int> flips(1); long long xoro=0; for(int i=0;i!=b.size();++i)if(b[i])xoro^=i; long long quer = c^xoro; flips[0]=quer; return flips; } int find_coin(std::vector<int> b) { int ans=0; for(auto&x:b)ans^=x; return ans; }

Compilation message (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)if(b[i])xoro^=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...