# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
431989 | 2021-06-17T18:09:41 Z | MeGustaElArroz23 | 비스킷 담기 (IOI20_biscuits) | C++14 | 1000 ms | 332 KB |
#include "biscuits.h" #include <cassert> #include <cstdio> ///////////////////// #include "biscuits.h" #include<bits/stdc++.h> using namespace std; #define fi first #define se second typedef long long ll; typedef vector<int> vi; typedef vector<vi> vvi; typedef pair<int,int> pii; typedef vector<pii> vii; typedef vector<vii> vvii; typedef vector<bool> vb; vb int_to_mask(int x){ vb sol(20); for (int i=0;i<20;i++){ sol[i]=x%2; x/=2; } //for (bool x:sol) cerr << x << ' '; //cerr<<'\n'; return sol; } long long count_tastiness(long long x, std::vector<long long> a) { while (a.size()<20) a.push_back(0); ll sol=0; for (int y=0;y<=100000;y++){ vb v=int_to_mask(y); ll ac=0; bool T=true; for (int i=0;i<a.size();i++){ ac+=a[i]; ac-=v[i]*x; if (ac<0){ T=false; break; } ac/=2; } sol+=T; } return sol; }
Compilation message
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 74 ms | 204 KB | Output is correct |
2 | Correct | 70 ms | 272 KB | Output is correct |
3 | Correct | 70 ms | 268 KB | Output is correct |
4 | Correct | 80 ms | 204 KB | Output is correct |
5 | Correct | 74 ms | 204 KB | Output is correct |
6 | Correct | 82 ms | 272 KB | Output is correct |
7 | Correct | 75 ms | 204 KB | Output is correct |
8 | Correct | 82 ms | 204 KB | Output is correct |
9 | Correct | 77 ms | 268 KB | Output is correct |
10 | Correct | 70 ms | 204 KB | Output is correct |
11 | Correct | 74 ms | 204 KB | Output is correct |
12 | Correct | 83 ms | 204 KB | Output is correct |
13 | Correct | 78 ms | 204 KB | Output is correct |
14 | Correct | 73 ms | 204 KB | Output is correct |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 76 ms | 264 KB | Output is correct |
2 | Incorrect | 64 ms | 276 KB | Output isn't correct |
3 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Incorrect | 67 ms | 272 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Execution timed out | 1074 ms | 332 KB | Time limit exceeded |
2 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 74 ms | 204 KB | Output is correct |
2 | Correct | 70 ms | 272 KB | Output is correct |
3 | Correct | 70 ms | 268 KB | Output is correct |
4 | Correct | 80 ms | 204 KB | Output is correct |
5 | Correct | 74 ms | 204 KB | Output is correct |
6 | Correct | 82 ms | 272 KB | Output is correct |
7 | Correct | 75 ms | 204 KB | Output is correct |
8 | Correct | 82 ms | 204 KB | Output is correct |
9 | Correct | 77 ms | 268 KB | Output is correct |
10 | Correct | 70 ms | 204 KB | Output is correct |
11 | Correct | 74 ms | 204 KB | Output is correct |
12 | Correct | 83 ms | 204 KB | Output is correct |
13 | Correct | 78 ms | 204 KB | Output is correct |
14 | Correct | 73 ms | 204 KB | Output is correct |
15 | Correct | 76 ms | 264 KB | Output is correct |
16 | Incorrect | 64 ms | 276 KB | Output isn't correct |
17 | Halted | 0 ms | 0 KB | - |