Codeforces Good Bye 2020 C問題 (1000pt)
Problem description
省略
省略
C++に変換後のコードはこちら
//no-unlocked
int N;
char S[1d5+2];
{
REP(rd_int()){
int res = 0;
rd(S@N);
if(S[1]==S[0]) res++, S[1] = 1;
rep(i,2,N) if(S[i]==S[i-1]||S[i]==S[i-2]) res++, S[i]=i%10;
wt(res);
}
}
Current time: 2024年04月26日09時28分32秒
Last modified: 2021年01月02日16時11分56秒 (by laycrs)
Tags: Competitive_Programming_Incomplete Codeforces Codeforces_Good_Bye_2020
トップページに戻る
Logged in as: unknown user (not login)