제출 #309870

#제출 시각아이디문제언어결과실행 시간메모리
309870CaroLinda비스킷 담기 (IOI20_biscuits)C++14
0 / 100
2 ms384 KiB
#include "biscuits.h" #include <bits/stdc++.h> #define ll long long using namespace std ; long long count_tastiness(long long x, vector<long long> a ) { int k = (int)(a.size()) ; vector<ll> online ; ll carry = 0LL ; for(int i = 0 ; i < k ; i++ , carry >>= 1LL ) { carry += a[i] ; if(carry&1) online.push_back(i) ; } for(int i = k ; carry > 0 ; i++ , carry >>= 1LL ) if(carry&1) online.push_back(i) ; ll ans = 0LL; for(auto e : online ) ans += (1LL<<e) ; return ans ; }
#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...