| # | Time | Username | Problem | Language | Result | Execution time | Memory |
|---|---|---|---|---|---|---|---|
| 1124472 | dosts | Sequence (APIO23_sequence) | C++17 | 2095 ms | 4164 KiB |
#include "sequence.h"
//Dost SEFEROĞLU
#include <bits/stdc++.h>
using namespace std;
#define int long long
#define pii pair<int,int>
#define ff first
#define ss second
#define sp << " " <<
#define all(cont) cont.begin(),cont.end()
#define vi vector<int>
int32_t sequence(int32_t N, std::vector<int32_t> A) {
int ans = 0;
for (int i=0;i<N;i++) {
for (int j = i;j<N;j++) {
for (int k = i;k<=j;k++) {
int b = 0,s = 0,o = 0;
for (int kk = i;kk<=j;kk++) {
if (A[kk] < A[k]) s++;
else if (A[kk] > A[k]) b++;
else o++;
}
if (abs(b-s) <= o) ans = max(ans,o);
}
}
}
return ans;
}
| # | 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... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
