(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 #1091441

#TimeUsernameProblemLanguageResultExecution timeMemory
1091441AlmontherCoins (IOI17_coins)C++17
0 / 100
5 ms1700 KiB
#include "coins.h" #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){ b[i]^=1; return b; } } } int find_coin(vector<int>b){ int ans=0; for(int i=0;i<63;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: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++){
      |                 ~^~~~~~~~~
coins.cpp:15:18: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   15 |     for(int i=0;i<b.size();i++){
      |                 ~^~~~~~~~~
coins.cpp:16:17: warning: suggest parentheses around comparison in operand of '^' [-Wparentheses]
   16 |         if(num^i==c){
      |                ~^~~
coins.cpp:21:1: warning: control reaches end of non-void function [-Wreturn-type]
   21 | }
      | ^
#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...