Submission #1301720

#TimeUsernameProblemLanguageResultExecution timeMemory
1301720sano비스킷 담기 (IOI20_biscuits)C++20
0 / 100
16 ms572 KiB
#include "biscuits.h" #include <iostream> #define ll long long #define vec vector #define For(i, n) for(int i = 0; i < n; i++) using namespace std; long long count_tastiness(long long x, vector<long long> a) { ll poc = 0; int pr = 0; ll vys = 1; int n = a.size(); cerr << "n " << n << endl; For(i, n){ cerr << "zac " << poc << endl; if(a[i] == 0) continue; cerr << "som tu, poc: " << poc << endl; if((poc+1) >= (1<<(i-pr))){ cerr << "tu" << endl; cerr << a[i] << ' ' << (1 << (i-pr)) << endl; cerr << (a[i] * (1<<(i-pr))) << endl; poc += (a[i] * (1<<(i-pr))); cerr << poc << endl; } else{ vys *= poc; pr = i; poc = a[i]; } cerr << "po ife " << poc << endl; } vys *= poc; return vys+1; }
#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...