Educational Codeforces Round 97 B問題
Problem description
省略
省略
C++に変換後のコードはこちら
//no-unlocked
int N;
char S[1d5+2];
{
REP(rd_int()){
int res1 = 0, res2 = 0;
rd(N,S);
rep(i,1,N) if(S[i]==S[i-1]=='0') res1++;
rep(i,1,N) if(S[i]==S[i-1]=='1') res2++;
wt(max(res1,res2));
}
}
Current time: 2024年04月25日15時24分37秒
Last modified: 2020年11月03日21時49分08秒 (by laycrs)
Tags: Competitive_Programming_Incomplete Codeforces
トップページに戻る
Logged in as: unknown user (not login)