# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1128212 | rasbery303 | Kpart (eJOI21_kpart) | C++20 | 2095 ms | 448 KiB |
#include <iostream>
#include <vector>
#include <deque>
using namespace std;
const int N = 1001;
int a[N];
vector<bool> dp;
deque<int> deq;
void solve(){
int n;
cin >> n;
for (int i = 1; i <= n; ++i)
cin >> a[i];
vector<int> pref(n+1, 0);
for (int i = 1; i <= n; ++i)
pref[i] = pref[i-1] + a[i];
vector<int> ans;
for (int len = 2; len <= n; ++len){
bool add = true;
bool in = false;
for (int i = 0; i < len; ++i)
deq.push_back(a[i]);
for (int i = 1; i <= n-len+1 && add == true; ++i){
deq.pop_front();
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |