Submission #400004

# Submission time Handle Problem Language Result Execution time Memory
400004 2021-05-07T03:35:41 Z faresbasbs Packing Biscuits (IOI20_biscuits) C++14
9 / 100
1000 ms 788388 KB
#include <bits/stdc++.h>
#include "biscuits.h"
using namespace std;
vector<long long> a,dp,dp2;
long long x;

long long count_tastiness(long long X , vector<long long> A){
	a = A , x = X;
	while(a.size() < 60){
		a.push_back(0ll);
	}
	dp = {0ll};
	for(int i = 0 ; i < 60 ; i += 1){
		dp2.clear();
		for(auto j : dp){
			j += a[i];
			dp2.push_back(j/2);
			if(j >= x){
				dp2.push_back((j-x)/2);
			}
		}
		swap(dp,dp2);
	}
	return dp.size();
}
# Verdict Execution time Memory Grader output
1 Correct 20 ms 2240 KB Output is correct
2 Correct 1 ms 204 KB Output is correct
3 Correct 2 ms 204 KB Output is correct
4 Correct 37 ms 1224 KB Output is correct
5 Correct 8 ms 716 KB Output is correct
6 Correct 81 ms 2116 KB Output is correct
7 Correct 7 ms 460 KB Output is correct
8 Correct 89 ms 2112 KB Output is correct
9 Correct 13 ms 836 KB Output is correct
10 Correct 1 ms 204 KB Output is correct
11 Correct 1 ms 204 KB Output is correct
12 Correct 29 ms 844 KB Output is correct
13 Correct 16 ms 588 KB Output is correct
14 Correct 2 ms 204 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 20 ms 2240 KB Output is correct
2 Execution timed out 1115 ms 608328 KB Time limit exceeded
3 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Execution timed out 1107 ms 788388 KB Time limit exceeded
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Execution timed out 1042 ms 3960 KB Time limit exceeded
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 20 ms 2240 KB Output is correct
2 Correct 1 ms 204 KB Output is correct
3 Correct 2 ms 204 KB Output is correct
4 Correct 37 ms 1224 KB Output is correct
5 Correct 8 ms 716 KB Output is correct
6 Correct 81 ms 2116 KB Output is correct
7 Correct 7 ms 460 KB Output is correct
8 Correct 89 ms 2112 KB Output is correct
9 Correct 13 ms 836 KB Output is correct
10 Correct 1 ms 204 KB Output is correct
11 Correct 1 ms 204 KB Output is correct
12 Correct 29 ms 844 KB Output is correct
13 Correct 16 ms 588 KB Output is correct
14 Correct 2 ms 204 KB Output is correct
15 Correct 20 ms 2240 KB Output is correct
16 Execution timed out 1115 ms 608328 KB Time limit exceeded
17 Halted 0 ms 0 KB -