# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
820245 | Zanite | Exam (eJOI20_exam) | C++17 | 512 ms | 295360 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;
const int iINF = 1e9;
const int maxN = 5023;
const int maxNN = 100'023;
int N, M, A[maxNN], B[maxNN];
vector<int> compress;
namespace Subtask2 {
void solve() {
int qb = B[1];
int ans = 0, run = 0;
bool hasB = false;
for (int i = 1; i <= N; i++) {
if (A[i] > qb) {
run = 0;
hasB = false;
continue;
}
run++;
if (A[i] == qb) {hasB = true;}
if (hasB) {
ans += run;
run = 0;
}
}
cout << ans << '\n';
# | 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... |