# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
405798 | 2021-05-16T22:47:59 Z | ly20 | 비스킷 담기 (IOI20_biscuits) | C++17 | 1000 ms | 332 KB |
#include "biscuits.h" #include <bits/stdc++.h> using namespace std; const int MAXN = 40, INF = 1e9; int mc[MAXN]; long long count_tastiness(long long x, vector<long long> a) { long long resp = 0; for(int j = 0; j <= 100000; j++) { for(int i = 0; i < a.size(); i++) { mc[i] = a[i]; } bool ok = true; for(int i = 17; i >= 0; i--) { long long rq = x; if((1LL << i) & j == 0) continue; for(int k = i; k >= 0; k--) { if(rq > INF) break; if(mc[i] <= rq) { rq -= mc[i]; mc[i] = 0; } if(mc[i] > rq) { rq = 0; mc[i] -= rq; } rq *= 2; } if(rq != 0) ok = false; } if(ok) resp++; } return resp; }
Compilation message
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Incorrect | 358 ms | 280 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Incorrect | 313 ms | 204 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Incorrect | 300 ms | 272 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Execution timed out | 1081 ms | 332 KB | Time limit exceeded |
2 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Incorrect | 358 ms | 280 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |