답안 #1037241

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
1037241 2024-07-28T11:16:42 Z 1L1YA Lamps (JOI19_lamps) C++17
4 / 100
8 ms 5504 KB
//1L1YA

#include<bits/stdc++.h>
using namespace std;

//#pragma GCC optimize ("O3,unrool-loops")
//#pragma GCC target("avx2,bmi,bmi2,lzcnt,popcnt")

typedef long long       ll;
typedef pair<ll,ll>     pll;
typedef pair<int,int>   pii;

#define Pb              push_back
#define F               first
#define S               second
#define endl            '\n'
#define sep             ' '
#define all(x)          x.begin(),x.end()
#define al(x,n)         x+1,x+n+1
#define SZ(x)           ((int)x.size())
#define lc              (id<<1)
#define rc              (lc|1)
#define mid             (l+r>>1)
#define dokme(x)        cout << x << endl, exit(0)
#define sik(x)          cout << x << endl;continue;
#define FastIO          ios::sync_with_stdio(0);cin.tie(0);cout.tie(0);
#define FileIO          freopen("input.txt","r",stdin);freopen("output.txt","w",stdout);

mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());

const ll oo=1e18;
const int mod=1e9+7;
const int inf=1e9+111;
const int N=2e5+11;
const int lg=23;

int n;
string a,b;

int main(){
	FastIO

	cin >> n >> a >> b;
	a='#'+a;b='#'+b;
	int c=0;
	for(int i=1;i<=n;i++)
		if(b[i]=='1' && b[i-1]!='1')
			c++;
	cout << c << endl;

	return 0;
}
# 결과 실행 시간 메모리 Grader output
1 Incorrect 0 ms 348 KB Output isn't correct
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 0 ms 348 KB Output isn't correct
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 348 KB Output is correct
2 Correct 0 ms 348 KB Output is correct
3 Correct 0 ms 348 KB Output is correct
4 Correct 0 ms 348 KB Output is correct
5 Correct 0 ms 348 KB Output is correct
6 Correct 1 ms 348 KB Output is correct
7 Correct 5 ms 5332 KB Output is correct
8 Correct 6 ms 5376 KB Output is correct
9 Correct 6 ms 5420 KB Output is correct
10 Correct 8 ms 5348 KB Output is correct
11 Correct 5 ms 5436 KB Output is correct
12 Correct 5 ms 5340 KB Output is correct
13 Correct 7 ms 5504 KB Output is correct
14 Correct 8 ms 5440 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Incorrect 0 ms 348 KB Output isn't correct
2 Halted 0 ms 0 KB -