| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 756888 | Valters07 | 서열 (APIO23_sequence) | C++17 | 2041 ms | 8280 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <bits/stdc++.h>
#include "sequence.h"
#define ll long long
#define pb push_back
#define fi first
#define se second
using namespace std;
const int N = 2e3+5;
int cnt[N];
int sequence(int n, vector<int> a)
{
int res = 1;
for(int i = 0;i<n;i++)
{
vector<int> ve;
for(int j = 1;j<=n;j++)
cnt[j]=0;
for(int j = i;j<n;j++)
{
ve.pb(a[j]);
sort(ve.begin(),ve.end());
cnt[a[j]]++;
int hlf = (ve.size()-1)/2;
res=max(res,cnt[ve[hlf]]);
if(ve.size()%2==0)
res=max(res,cnt[ve[hlf+1]]);
}
}
return res;
}
| # | 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... | ||||
