Submission #868334

#TimeUsernameProblemLanguageResultExecution timeMemory
868334irmuunSequence (APIO23_sequence)C++17
11 / 100
2052 ms4184 KiB
#include<bits/stdc++.h> #include "sequence.h" using namespace std; #define ll long long #define pb push_back #define ff first #define ss second #define all(s) s.begin(),s.end() #define rall(s) s.rbegin(),s.rend() int sequence(int n,vector<int>A){ int ans=0; for(int i=1;i<=n;i++){ int a,b,c; for(int j=0;j<n;j++){ a=0; b=0; c=0; for(int k=j;k<n;k++){ if(A[k]<i) a++; if(A[k]==i) b++; if(A[k]>i) c++; if(a>b+c||c>a+b) continue; ans=max(ans,b); } } } return ans; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...