Submission #759115

# Submission time Handle Problem Language Result Execution time Memory
759115 2023-06-15T18:59:41 Z ihceker Exam (eJOI20_exam) C++14
0 / 100
3 ms 444 KB
#include<bits/stdc++.h>
#define int long long
#define MOD 1000000007
#define all(x) x.begin(),x.end()
#define ff first
#define ss second
#define pb push_back
#define fast ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL);

using namespace std;

int32_t main(){
	int n;
	cin>>n;
	int a[n],b[n],ans[n];
	for(int i=0;i<n;i++)cin>>a[i];
	for(int i=0;i<n;i++)cin>>b[i];
	for(int i=0;i<n;i++)ans[i]=0;
	for(int i=0;i<n;i++){
		if(a[i]!=b[i])continue;
		for(int j=i-1;j>=0;j--){
			if(a[j]>=b[j])break;
			ans[j]=1;
		}
		for(int j=i+1;j<n;j++){
			if(a[j]>=b[j])break;
			ans[j]=1;
		}
	}
	int s=0;
	for(int i=0;i<n;i++)s+=ans[i];
	cout<<s<<endl;
}
# 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 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 3 ms 444 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 -