# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1129915 | alosza | Candies (JOI18_candies) | C++20 | 5093 ms | 4164 KiB |
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
int main()
{
ios_base::sync_with_stdio(0);
cin.tie(0);
cout.tie(0);
int n;
cin >> n;
int n2 = (n+1)/2;
vector<int> candies(n);
for(int i = 0; i < n; i++)
{
cin >> candies[i];
}
// vector<vector<ll>> dp(n+1); //index, k
vector<vector<ll>> lastcols(2);
vector<ll> newcol(n2+1);
// for(int i = 0; i < n+1; i++)
// {
// dp[i] = vector<ll>(n2+1);
// if(i == 1)
// {
// for(int k = 1; k < n2+1; k++)
// {
// dp[i][k] = candies[0];
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |