제출 #403408

#제출 시각아이디문제언어결과실행 시간메모리
403408AmineTrabelsi비스킷 담기 (IOI20_biscuits)C++14
0 / 100
1085 ms976 KiB
#include "biscuits.h" #include <bits/stdc++.h> using namespace std; vector<long long> powr; long long count_tastiness(long long x,vector<long long> a) { powr.push_back(1); for(int i=1;i<=61;i++){ powr.push_back(powr.back()*2); } reverse(a.begin(),a.end()); int res = 1; for(int y=1;y<=200000;y++){ //cerr<<y<<": \n"; long long curr = y; int pwr = a.size() -1; for(auto i:a){ long long cnt = i; long long p = powr[pwr]; long long take = min(cnt,curr/p); curr -= take*p; pwr--; } if(curr == 0)res++; //cerr<<curr<<'\n'; } return res; } // run biscuits 03.in 03.out
#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...