Submission #121928

# Submission time Handle Problem Language Result Execution time Memory
121928 2019-06-27T08:29:09 Z KLPP Lamps (JOI19_lamps) C++14
4 / 100
64 ms 6248 KB
#include<bits/stdc++.h>

using namespace std;
typedef long long int lld;
typedef pair<lld,lld> pii;
#define rep(i,a,b) for(int i=a;i<b;i++)
#define trav(a,v) for(auto a:v)

int main(){
  int n;
  cin>>n;
  string A,B;
  cin>>A>>B;
  bool comp=false;
  int ans=0;
  rep(i,0,n){
    if(B.at(i)=='0'){
      ans+=comp;
      comp=false;
    }else{
      comp=true;
    }
  }
  ans+=comp;
  cout<<ans<<endl;
  return 0;
}
# Verdict Execution time Memory Grader output
1 Incorrect 2 ms 384 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 2 ms 384 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 2 ms 384 KB Output is correct
2 Correct 2 ms 256 KB Output is correct
3 Correct 2 ms 256 KB Output is correct
4 Correct 2 ms 256 KB Output is correct
5 Correct 2 ms 256 KB Output is correct
6 Correct 2 ms 256 KB Output is correct
7 Correct 61 ms 6220 KB Output is correct
8 Correct 60 ms 6120 KB Output is correct
9 Correct 63 ms 6120 KB Output is correct
10 Correct 60 ms 6120 KB Output is correct
11 Correct 62 ms 6140 KB Output is correct
12 Correct 62 ms 6120 KB Output is correct
13 Correct 60 ms 6120 KB Output is correct
14 Correct 64 ms 6248 KB Output is correct
# Verdict Execution time Memory Grader output
1 Incorrect 2 ms 384 KB Output isn't correct
2 Halted 0 ms 0 KB -