Submission #1322019

#TimeUsernameProblemLanguageResultExecution timeMemory
1322019khoianhCoins (IOI17_coins)C++20
100 / 100
5 ms748 KiB
#include<bits/stdc++.h> using namespace std; typedef long long ll; vector<int> coin_flips(vector<int> b, int c){ ll t = 0; for(int i = 0; i < 64; ++i) t ^= (i * b[i]); t ^= c; return {t}; } int find_coin(vector<int> b){ ll t = 0; for(int i = 0; i < 64; ++i) t ^= (i * b[i]); return t; } //int main(){ // ios_base::sync_with_stdio(false); // cin.tie(NULL); // if(fopen(".INP", "r")) { // freopen(".INP", "r", stdin); // freopen(".OUT", "w", stdout); // } // int testCase = 1; // //cin >> testCase; // while(testCase--) solve(); //}

Compilation message (stderr)

coins.cpp: In function 'std::vector<int> coin_flips(std::vector<int>, int)':
coins.cpp:9:17: warning: narrowing conversion of 't' from 'll' {aka 'long long int'} to 'int' [-Wnarrowing]
    9 |         return {t};
      |                 ^
coins.cpp:9:17: warning: narrowing conversion of 't' from 'll' {aka 'long long int'} to 'int' [-Wnarrowing]
grader.cpp: In function 'void shuffle(std::vector<int>&)':
grader.cpp:88:23: warning: 'void std::random_shuffle(_RAIter, _RAIter) [with _RAIter = __gnu_cxx::__normal_iterator<int*, vector<int> >]' is deprecated: use 'std::shuffle' instead [-Wdeprecated-declarations]
   88 |         random_shuffle(v.begin(), v.end());
      |         ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/13/algorithm:61,
                 from grader.cpp:5:
/usr/include/c++/13/bits/stl_algo.h:4581:5: note: declared here
 4581 |     random_shuffle(_RandomAccessIterator __first, _RandomAccessIterator __last)
      |     ^~~~~~~~~~~~~~
#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...