# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1167142 | SmuggingSpun | Bootfall (IZhO17_bootfall) | C++20 | 1095 ms | 492 KiB |
#include<bits/stdc++.h>
#define taskname "A"
using namespace std;
const int lim = 505;
int n, a_max, a_sum = 0, a[lim];
namespace sub123{
const int LIM = 1e4 + 5;
const int mod = 1e9 + 9;
void add(int& a, int b){
if((a += b) >= mod){
a -= mod;
}
}
void sub(int& a, int b){
if((a -= b) < 0){
a += mod;
}
}
int dp[LIM];
void add_item(int x){
for(int i = a_sum; i >= x; i--){
add(dp[i], dp[i - x]);
}
}
void remove_item(int x){
for(int i = x; i <= a_sum; i++){
sub(dp[i], dp[i - x]);
}
}
void solve(){
Compilation message (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... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |