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

제출 #1100400

#제출 시각아이디문제언어결과실행 시간메모리
1100400akzytrCoins (IOI17_coins)C++17
0 / 100
3 ms1024 KiB
#include <bits/stdc++.h> using namespace std; template <typename T, int sz> using ar = array<T, sz>; typedef long long ll; #define pb push_back #define fi first #define se second #define endl '\n' vector<int> coin_flips(vector<int> b, int c) { vector<int> turn; vector<int> final_one = {0, 0, 0}; vector<int> final_two = {0, 0, 0}; if(c == 0) { final_one = {1, 0, 0}; final_two = {0, 1, 1}; } else if(c == 1) { final_one = {0, 1, 0}; final_two = {1, 0, 1}; } else { final_one = {0, 0, 1}; final_two = {1, 1, 0}; } vector<int> c1; vector<int> c2; for(int i = 0; i < 3; i++) { if(b[i] != final_one[i]) { c1.pb(i); } if(b[i] != final_two[i]) { c2.pb(i); } } if(c1.size() == 0 && c2.size() == 0) { turn.pb(63); } else if(c1.size() == 1) { turn.pb(c1[0]); } else if(c2.size() == 1) { turn.pb(c2[0]); } return turn; } int find_coin(vector<int> b) { int cnt[2] = {0,0}; cnt[b[0]]++; cnt[b[1]]++; cnt[b[2]]++; if(cnt[0] == 1) { for(int i = 0; i < 3; i++) { if(b[i] == 0) { return i; } } } if(cnt[1] == 1) { for(int i = 0; i < 3; i++) { if(b[i] == 1) { return i; } } } return 0; }
#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...