| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 1340953 | trungcan | Sladoled (COCI26_sladoled) | C++20 | 349 ms | 1652 KiB |
#include <bits/stdc++.h>
using namespace std;
const int M = 5e4;
int n, q;
bitset<M + 1> b[105];
int main(){
ios_base::sync_with_stdio(0); cin.tie(0);
cin >> n >> q;
for (int i = 1; i <= n; ++i) b[i][0] = 1;
while (q--){
int a, x; cin >> a >> x;
while (!b[a][x] && x <= M){
b[a] |= (b[a] << x);
x <<= 1;
}
cout << b[a].count() - 1 << "\n";
}
}
| # | 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... | ||||
