# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1046254 | Nickpapadak | Exam (eJOI20_exam) | C++14 | 3 ms | 856 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>
using namespace std;
#define MAXN 100010
#define INF 1000000010
int N, B[MAXN];
int A[MAXN];
pair<int,int> Range[MAXN];
int solveEQ(){
int ans = 0;
int i = 1, j =1;
bool foundB = false;
for(;j<=N;++j){
if(A[j] > B[1]) {
ans += (j-i) * foundB;
i= j+1;
foundB = false;
}
else if(A[j] == B[1]) foundB= true;
}
return ans;
}
void setRange(){
A[0] = INF;
A[N+1] = INF;
for(int i =1;i<=N;++i){
int j =i,k =i;
while(A[j-1] <= A[i] || A[k+1] <=A[i]){
if(A[j-1] <= A[i]) --j;
Compilation message (stderr)
# | 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... |