80872024-01-12 12:32:54ChickenTükörtojás (75 pont)cpp17Wrong answer 0/7516ms3536 KiB
#include <iostream>

using namespace std;

int main() {
    int n;
    cin>>n;
    int ossz=0;
    bool joe[n];
    char a, b;
    for(int i=0; i<n; i++) {
        cin>>a>>b;
        if(a==b) {
            joe[i]=1;
        }
        else{
            joe[i]=0;
        }
    }
    for(int i=0; i<n; i++) {
        if(joe[i]!=joe[i+1]) {
            ossz++;
        }
        i++;
    }
    cout<<ossz;
return 0; }
SubtaskSumTestVerdictTimeMemory
base0/75
1Accepted0/03ms1872 KiB
2Wrong answer0/08ms2236 KiB
3Wrong answer0/52ms2152 KiB
4Wrong answer0/53ms2276 KiB
5Wrong answer0/53ms2368 KiB
6Wrong answer0/53ms2492 KiB
7Wrong answer0/53ms2576 KiB
8Wrong answer0/53ms2704 KiB
9Wrong answer0/53ms2776 KiB
10Wrong answer0/53ms2780 KiB
11Wrong answer0/53ms2908 KiB
12Wrong answer0/514ms3088 KiB
13Wrong answer0/514ms3088 KiB
14Wrong answer0/514ms3364 KiB
15Wrong answer0/514ms3264 KiB
16Wrong answer0/514ms3536 KiB
17Wrong answer0/516ms3340 KiB