Submission #1371322


Source Code Expand

/*
#include <boost/multiprecision/cpp_int.hpp>
typedef boost::multiprecision::cpp_int mint; //*/
#include <bits/stdc++.h>
#define  rep(i,n) for(li i=0;i<(n);i++)
#define  red(i,n) for(li i=(n)-1;i>=0;i--)
#define  all(a) begin(a),end(a)
#define  pb(a) push_back(a)
using namespace std;
typedef long int li;
typedef unsigned long long ull;
typedef vector<int> vi;
typedef vector<li> vli;
typedef vector<string> vs;
 
int main()
{
    int ans=0;
    string s;
    cin>>s;
    char x=s[0];
    for(char c:s) if(c!=x) x=c,ans++;
    cout<<ans<<endl;

    return 0;
}

Submission Info

Submission Time
Task C - 1D Reversi
User numi
Language C++14 (GCC 5.4.1)
Score 300
Code Size 587 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 sample_01.txt, sample_02.txt, sample_03.txt
All alternate_01.txt, alternate_02.txt, random_01.txt, random_02.txt, random_03.txt, random_04.txt, random_05.txt, same_01.txt, same_02.txt, sample_01.txt, sample_02.txt, sample_03.txt, small_01.txt, small_02.txt, small_03.txt
Case Name Status Exec Time Memory
alternate_01.txt AC 4 ms 512 KB
alternate_02.txt AC 4 ms 512 KB
random_01.txt AC 4 ms 512 KB
random_02.txt AC 4 ms 512 KB
random_03.txt AC 4 ms 512 KB
random_04.txt AC 4 ms 512 KB
random_05.txt AC 4 ms 512 KB
same_01.txt AC 4 ms 512 KB
same_02.txt AC 4 ms 512 KB
sample_01.txt AC 1 ms 256 KB
sample_02.txt AC 1 ms 256 KB
sample_03.txt AC 1 ms 256 KB
small_01.txt AC 1 ms 256 KB
small_02.txt AC 1 ms 256 KB
small_03.txt AC 1 ms 256 KB