# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
464785 |
2021-08-14T06:12:18 Z |
jurgis |
Exam (eJOI20_exam) |
C++14 |
|
5 ms |
204 KB |
#include <iostream>
#include <bits/stdc++.h>
#define f first
#define s second
#define pii pair<int, int>
#define ll long long
using namespace std;
int main()
{
int n; cin>>n; int A[n], B[n];
for(int i=0; i<n; i++){cin>>A[i];}
for(int i=0; i<n; i++){cin>>B[i];} bool found = false; int cnt =0; int tempcnt =0;
for(int i=0; i<n; i++){
if(A[i] == B[0]){found = true;} //cout<<A[i]<<B[0]<<endl;
if(A[i]>B[0]){
if(found){
found = false;cnt+= tempcnt;
}
tempcnt = 0;
}tempcnt++;
if(i==n-1 && found){
cnt+= tempcnt;
}
}
cout<<cnt;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
0 ms |
204 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
204 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
204 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
5 ms |
204 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
0 ms |
204 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
0 ms |
204 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |