Submission #627734

# Submission time Handle Problem Language Result Execution time Memory
627734 2022-08-12T20:41:35 Z NemanjaSo2005 Exam (eJOI20_exam) C++14
0 / 100
5 ms 420 KB
#include<bits/stdc++.h>
#define ll long long
using namespace std;
ll N,A[100005],B[100005];
bool case2=true;
int main(){
   cin>>N;
   for(int i=1;i<=N;i++)
      cin>>A[i];
   for(int i=1;i<=N;i++)
      cin>>B[i];
   for(int i=2;i<=N;i++)
      if(B[i]!=B[i-1])
         case2=false;
   if(case2){
      int pv=0,res=0;
      int imam=0;
      for(int i=1;i<=N;i++){
         if(A[i]==B[i])
            imam=1;
         if(A[i]>B[i]){
            res+=imam*(i-1-pv);
            pv=i;
         }
      }
      res+=imam*(N-pv);
      cout<<res<<endl;
   }
  return 0;
}
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 260 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 5 ms 420 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 260 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 260 KB Output isn't correct
2 Halted 0 ms 0 KB -