80862024-01-12 12:32:27ChickenTükörtojás (75 pont)cpp17Wrong answer 0/7514ms4456 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/03ms2016 KiB
2Wrong answer0/08ms2164 KiB
3Wrong answer0/53ms2196 KiB
4Wrong answer0/52ms2280 KiB
5Wrong answer0/53ms2412 KiB
6Wrong answer0/53ms2732 KiB
7Wrong answer0/53ms2656 KiB
8Wrong answer0/53ms2896 KiB
9Wrong answer0/53ms3032 KiB
10Wrong answer0/53ms3400 KiB
11Wrong answer0/53ms3312 KiB
12Wrong answer0/514ms3660 KiB
13Wrong answer0/514ms3960 KiB
14Wrong answer0/514ms4148 KiB
15Wrong answer0/514ms4456 KiB
16Wrong answer0/514ms4164 KiB
17Wrong answer0/514ms4320 KiB