제출 #429082

#제출 시각아이디문제언어결과실행 시간메모리
429082abdzag비스킷 담기 (IOI20_biscuits)C++17
0 / 100
2 ms332 KiB
#include<bits/stdc++.h> #include<unordered_map> #include<unordered_set> #include "biscuits.h" #define rep(i,a,b) for(int i=int(a);i<int(b);i++) #define rrep(i,a,b) for(int i=int(a);i>int(b);i--) #define trav(a,v) for(auto& a: v) #define sz(v) v.size() #define all(v) v.begin(),v.end() #define vi vector<int> typedef long long ll; typedef long double ld; typedef unsigned long long ull; const long long inf = 2e9; using namespace std; long long count_tastiness(long long x, std::vector<long long> a) { ll ans = 0; while (a.size() < 70) { a.push_back(0); } rep(i, 0, a.size()) { if (a[i]) { ans++; a[i]--; a[i + 1] += a[i] / 2; } } ll res = 1; rep(i, 0, ans)res *= 2; return res; }
#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...