69882023-12-23 22:23:41999Tükörtojás (75 pont)cpp17Accepted 75/758ms4468 KiB
// Source: https://usaco.guide/general/io

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

signed main() {
	int n;cin>>n;
	string curr,wanted,binaryc,binaryw;cin>>curr>>wanted;
	int cnt=0;
	for(int i = n-1;i>=0;i--){
		if(cnt%2){
			if(curr[i]==wanted[i])cnt++;
		}
		else{
			if(curr[i]!=wanted[i])cnt++;
		}
	}
	cout<<cnt<<endl;
}
SubtaskSumTestVerdictTimeMemory
base75/75
1Accepted0/03ms1816 KiB
2Accepted0/04ms2248 KiB
3Accepted5/53ms2212 KiB
4Accepted5/53ms2464 KiB
5Accepted5/53ms2708 KiB
6Accepted5/53ms3068 KiB
7Accepted5/53ms2976 KiB
8Accepted5/53ms3068 KiB
9Accepted5/53ms3280 KiB
10Accepted5/53ms3364 KiB
11Accepted5/53ms3388 KiB
12Accepted5/58ms3904 KiB
13Accepted5/58ms3996 KiB
14Accepted5/58ms4068 KiB
15Accepted5/58ms4204 KiB
16Accepted5/58ms4164 KiB
17Accepted5/58ms4468 KiB