# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
37162 | chonka | Bootfall (IZhO17_bootfall) | C++98 | 476 ms | 7888 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include<iostream>
#include<stdio.h>
#include<vector>
using namespace std ;
#define MAXN 507
int n ;
int a[ MAXN ] ;
long long f[ MAXN * MAXN ] ;
long long w[ MAXN * MAXN ] ;
int ans[ MAXN * MAXN ] ;
int sm ;
void input ( ) {
scanf ( "%d" , &n ) ;
int i , j ;
f[ 0 ] = 1 ;
sm = 0 ;
for ( i = 1 ; i <= n ; i ++ ) {
scanf ( "%d" , &a[ i ] ) ;
for ( j = sm ; j >= 0 ; j -- ) {
f[ j + a[ i ] ] += f[ j ] ;
}
sm += a[ i ] ;
}
}
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... |