Submission #623627

# Submission time Handle Problem Language Result Execution time Memory
623627 2022-08-06T06:48:15 Z Arnch Lamps (JOI19_lamps) C++17
4 / 100
8 ms 4428 KB
// oooo
/*
 har chi delet mikhad bebar ~
 gitar o ba khodet nabar! ~
 ;Amoo_Hasan;
*/

#include<bits/stdc++.h>
//#pragma GCC optimize("O3,no-stack-protector,unroll-loops")
//#pragma GCC target("avx2,fma")

using namespace std;

typedef long long ll;
typedef long double ld;

#define Sz(x) int((x).size())
#define All(x) (x).begin(), (x).end()
#define wtf(x) cout<<#x <<" : " <<x <<endl

constexpr ll inf = 1e18, N = 1e6 + 10, mod = 1e9 + 7, pr = 1000696969;


int main() {
    ios :: sync_with_stdio(0), cin.tie(0);

	int n; cin >>n;
	string A, B; cin >>A >>B;

	for(int i = 0; i < n; i++) {
		if(A[i] != '0') {
			assert(0);
		}
	}
	
	int ans = 0;

	B.push_back('0');
	for(int i = 1; i < Sz(B); i++) {
		if(B[i] == '0' && B[i - 1] == '1') ans++;
	}

	cout<<ans;

    return 0;
}


# Verdict Execution time Memory Grader output
1 Runtime error 1 ms 468 KB Execution killed with signal 6
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Runtime error 1 ms 468 KB Execution killed with signal 6
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 0 ms 212 KB Output is correct
2 Correct 1 ms 324 KB Output is correct
3 Correct 0 ms 212 KB Output is correct
4 Correct 0 ms 212 KB Output is correct
5 Correct 0 ms 212 KB Output is correct
6 Correct 0 ms 212 KB Output is correct
7 Correct 6 ms 4356 KB Output is correct
8 Correct 7 ms 4388 KB Output is correct
9 Correct 6 ms 4376 KB Output is correct
10 Correct 8 ms 4428 KB Output is correct
11 Correct 6 ms 4372 KB Output is correct
12 Correct 6 ms 4336 KB Output is correct
13 Correct 7 ms 4384 KB Output is correct
14 Correct 7 ms 4388 KB Output is correct
# Verdict Execution time Memory Grader output
1 Runtime error 1 ms 468 KB Execution killed with signal 6
2 Halted 0 ms 0 KB -