# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
566797 | 2fat2code | 비스킷 담기 (IOI20_biscuits) | C++17 | 2 ms | 340 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include "biscuits.h"
#include <bits/stdc++.h>
#define fr first
#define sc second
#define all(s) s.begin(), s.end()
#define int long long
using namespace std;
int ans, k;
int count_tastiness(int x, vector<int> a) {
ans = 1LL;
k = (int)a.size();
for(int i=0;i<(int)a.size();i++){
if(a[i] >= 3){
if(i == a.size() - 1){
a.push_back(0);
}
a[i + 1] += ( (a[i] - 1LL) / 2LL);
if(a[i] % 2 == 1LL) a[i] = 1;
else a[i]= 2;
}
}
int j = 0;
while(j < (int)a.size()){
int curr = 0;
int pos = j;
while(j < (int)a.size() && a[j] != 0){
curr = (curr + a[j] * (1LL << (j - pos)));
++j;
}
curr++;
ans *= curr;
j++;
}
return ans;
}
컴파일 시 표준 에러 (stderr) 메시지
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |