75582024-01-09 16:29:56AblablablaTükörtojás (75 pont)cpp17Wrong answer 45/758ms5280 KiB
#include <bits/stdc++.h>

using namespace std;

int main()
{
    int n;
    cin >> n;

    string a, b;
    cin >> a >> b;

    vector<int> paritas(n, 0);

    for(int i = 0; i < n; i++){
        if(a[i] != b[i]){
            paritas[i] = 1;
        }
    }

    int valasz = 1;
    for(int i = 1; i < n; i++){
        if(paritas[i] != paritas[i - 1]){
            valasz++;
        }
    }

    cout << valasz << "\n";
}
SubtaskSumTestVerdictTimeMemory
base45/75
1Accepted0/03ms1808 KiB
2Accepted0/06ms2888 KiB
3Wrong answer0/53ms2456 KiB
4Accepted5/53ms2688 KiB
5Accepted5/53ms2880 KiB
6Wrong answer0/53ms3020 KiB
7Wrong answer0/53ms3412 KiB
8Accepted5/53ms3424 KiB
9Accepted5/53ms3672 KiB
10Wrong answer0/53ms3728 KiB
11Accepted5/53ms3744 KiB
12Accepted5/58ms5096 KiB
13Accepted5/58ms5024 KiB
14Wrong answer0/58ms5020 KiB
15Accepted5/58ms5020 KiB
16Wrong answer0/58ms5172 KiB
17Accepted5/58ms5280 KiB