# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1061267 | Halym2007 | Sequence (APIO23_sequence) | C++17 | 66 ms | 15424 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 <bits/stdc++.h>
//#include "sequence.h"
using namespace std;
#define ll long long
#define sz size()
#define ff first
#define ss second
#define pb push_back
#define pii pair <int, int>
const int N = 5e5 + 5;
int a[N], st[N], n, val[N], sana[N];
int sequence(int N, vector<int> A) {
n = N;
for (int i = 0; i < n; ++i) {
a[i] = A[i];
val[i] = -1;
sana[i + 1] = 0;
}
int jogap = 1;
for (int i = 0; i < n; ++i) {
sana[a[i]]++;
if (val[a[i]] == -1) {
val[a[i]] = i;
continue;
}
else {
int san = i - val[a[i]] + 1;
# | 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... |