Submission #8026269


Source Code Expand

Copy
#include <bits/stdc++.h>
#define r(i,n) for(int i = 0; i<n; i++)
typedef long long ll;
using namespace std;

int main(){
  int n,count;
  string s;
  cin >> n>>s;
  count=n;
  r(i,n-1){
    if(s.at(i)==s.at(i+1))count--;
  }
  cout << count << endl;
}

Submission Info

Submission Time
Task C - Slimes
User moyuki
Language C++14 (GCC 5.4.1)
Score 300
Code Size 267 Byte
Status AC
Exec Time 4 ms
Memory 512 KB

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 300 / 300
Status
AC × 3
AC × 15
Set Name Test Cases
Sample sample00, sample01, sample02
All handmade03, handmade04, handmade05, handmade06, handmade07, random08, random09, random10, random11, random12, random13, random14, sample00, sample01, sample02
Case Name Status Exec Time Memory
handmade03 AC 4 ms 512 KB
handmade04 AC 4 ms 512 KB
handmade05 AC 4 ms 512 KB
handmade06 AC 1 ms 256 KB
handmade07 AC 4 ms 512 KB
random08 AC 4 ms 512 KB
random09 AC 4 ms 512 KB
random10 AC 4 ms 512 KB
random11 AC 4 ms 512 KB
random12 AC 4 ms 512 KB
random13 AC 4 ms 512 KB
random14 AC 4 ms 512 KB
sample00 AC 1 ms 256 KB
sample01 AC 1 ms 256 KB
sample02 AC 1 ms 256 KB