Submission #868333

#TimeUsernameProblemLanguageResultExecution timeMemory
868333irmuunSequence (APIO23_sequence)C++17
0 / 100
2032 ms7504 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=0,b=0,c=0; for(int j=0;j<n;j++){ if(A[j]<i) a++; if(A[j]==i) b++; if(A[j]>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...