# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
440772 |
2021-07-03T00:02:19 Z |
MrDeboo |
Exam (eJOI20_exam) |
C++17 |
|
2 ms |
332 KB |
#include <bits/stdc++.h>
#define int long long
#define mod 1000000007
#define endl '\n'
using namespace std;
signed main(){
ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
int n;
cin>>n;
pair<int,int>pr[n];
for(int i=0;i<n;i++){
cin>>pr[i].first;
}
for(int i=0;i<n;i++){
cin>>pr[i].second;
}
int ans=0,z=0,b=pr[0].second;
bool bl=false;
for(int i=0;i<n;i++){
if(pr[i].first==b){
bl=true;
}
if(pr[i].first<=b){
z++;
}
else if(bl){
ans+=z;
z=0;
}
else{
z=0;
}
}
cout<<ans;
}
//5 1 1 1 6 5
//5 5 6 5 6
# |
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 |
2 ms |
332 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 |
- |