# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
827871 |
2023-08-16T21:11:00 Z |
ayankarimova |
Exam (eJOI20_exam) |
C++14 |
|
17 ms |
3784 KB |
#include<bits/stdc++.h>
using namespace std;
#define endl '\n'
#define ll long long
const ll sz=100005;
int main(){
ios_base::sync_with_stdio(false);cin.tie(0);cout.tie(0);
ll n;
cin>>n;
ll a[n+1], b[n+1];
for(int i=1; i<=n; i++){
cin>>a[i];
}
for(int i=1; i<=n; i++){
cin>>b[i];
}
bool f=0;
ll ans=0, k=0;
for(int i=1; i<=n; i++){
if(a[i]==b[i]){
f=1;
}
if(a[i]<=b[i]){
k++;
}
if(a[i]>b[i] || i==n){
if(f==1){
ans+=k;
}
f=0;
k=0;
}
}
cout<<ans;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
212 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
212 KB |
Output is correct |
2 |
Correct |
4 ms |
1004 KB |
Output is correct |
3 |
Correct |
11 ms |
2732 KB |
Output is correct |
4 |
Correct |
8 ms |
2260 KB |
Output is correct |
5 |
Correct |
17 ms |
3776 KB |
Output is correct |
6 |
Correct |
8 ms |
2256 KB |
Output is correct |
7 |
Correct |
9 ms |
2384 KB |
Output is correct |
8 |
Correct |
16 ms |
3784 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
212 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
340 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
212 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
212 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |