(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.

제출 #72896

#제출 시각아이디문제언어결과실행 시간메모리
72896FedericoSCoins (IOI17_coins)C++14
100 / 100
15 ms1776 KiB
#include <iostream> #include "coins.h" using namespace std; std::vector<int> coin_flips(std::vector<int> b, int c) { vector<int> v; int ans=0; for(int i=0;i<64;i++) ans^=b[i]*i; for(int i=0;i<64;i++) if((ans^i)==c){ b[i]=(b[i]+1)%2; v.push_back(i); return v; } return v; } int find_coin(std::vector<int> b) { int ans=0; for(int i=0;i<64;i++) ans^=b[i]*i; return ans; }

컴파일 시 표준 에러 (stderr) 메시지

coins.cpp: In function 'std::vector<int> coin_flips(std::vector<int>, int)':
coins.cpp:13:5: warning: this 'for' clause does not guard... [-Wmisleading-indentation]
     for(int i=0;i<64;i++)
     ^~~
coins.cpp:20:2: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'for'
  return v;
  ^~~~~~
#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...