(UPD: 2024-12-04 14:48 UTC) Judge is not working due to Cloudflare incident. (URL) We can do nothing about it, sorry. After the incident is resolved, we will grade all submissions.

Submission #1091448

#TimeUsernameProblemLanguageResultExecution timeMemory
1091448AlmontherCoins (IOI17_coins)C++17
100 / 100
9 ms1952 KiB
#include <bits/stdc++.h> #define suiii ios::sync_with_stdio(0);cin.tie(0);cout.tie(0); #define ll long long #define co cout<< //#pragma GCC optimize("O3,Ofast,unroll-loops") //#pragma GCC target("avx2,sse3,sse4,avx") using namespace std; //stuff vector<int>coin_flips(vector<int>b, int c){ ll num=0; for(int i=0;i<b.size();i++){ if(b[i]) num^=i; } for(int i=0;i<b.size();i++){ if((num^i)==c){ return {i}; } } } int find_coin(vector<int>b){ int ans=0; for(int i=0;i<b.size();i++){ if(b[i]) ans^=i; } return ans; }

Compilation message (stderr)

coins.cpp: In function 'std::vector<int> coin_flips(std::vector<int>, int)':
coins.cpp:11:18: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   11 |     for(int i=0;i<b.size();i++){
      |                 ~^~~~~~~~~
coins.cpp:14:18: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   14 |     for(int i=0;i<b.size();i++){
      |                 ~^~~~~~~~~
coins.cpp: In function 'int find_coin(std::vector<int>)':
coins.cpp:22:18: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   22 |     for(int i=0;i<b.size();i++){
      |                 ~^~~~~~~~~
coins.cpp: In function 'std::vector<int> coin_flips(std::vector<int>, int)':
coins.cpp:19:1: warning: control reaches end of non-void function [-Wreturn-type]
   19 | }
      | ^
#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...