# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
576676 |
2022-06-13T09:08:37 Z |
ammar124 |
Exam (eJOI20_exam) |
C++14 |
|
1 ms |
340 KB |
#include <bits/stdc++.h>
#define endl '\n'
#define ll long long
using namespace std;
int const maxin = 1e5+6;
int main()
{
ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
int a;
ll ans = 0;
cin>>a;
int arr[a];
int arr2[a];
for(int i=0;i<a;i++)
cin>>arr[i];
for(int i=0;i<a;i++)
cin>>arr2[i];
for(int i=0;i<a;i++)
{
if(arr[i] == arr2[0])
{
for(int j=i;j<a;j++)
{
if(arr[j] <= arr[i])
ans++;
else
break;
}
for(int j=i;j>=0;j--)
{
if(arr[j] <= arr[i])
ans++;
else
break;
}
}
}
if(ans == 0)
cout<<0;
else
cout<<ans-1;
return 0;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
212 KB |
Output is correct |
2 |
Incorrect |
1 ms |
212 KB |
Output isn't correct |
3 |
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 |
0 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 |
Correct |
1 ms |
212 KB |
Output is correct |
2 |
Incorrect |
1 ms |
212 KB |
Output isn't correct |
3 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
212 KB |
Output is correct |
2 |
Incorrect |
1 ms |
212 KB |
Output isn't correct |
3 |
Halted |
0 ms |
0 KB |
- |