Educational Codeforces Round 103 D問題 - Journey

Source

Educational Codeforces Round 103 D問題
Problem description

問題概要

省略

解法

省略

cLayversion 20210227-1)のコード

C++に変換後のコードはこちら

//no-unlocked
int N; Arr1d<char> A;
int res[3d5+1];
{
  REP(rd_int()){
    rd(N,A(N));
    rep(i,N) A[i] = (if[A[i]=='L', 0, 1] + i + 1) % 2;
    rep(i,N+1){
      res[i] = 1;
      if(i>0) res[i] += A.ConstLenLeft(i-1, i%2);
      if(i<N) res[i] += A.ConstLenRight(i, i%2);
    }
    wt(res(N+1));
  }
}

Current time: 2024年03月29日06時36分03秒
Last modified: 2021年02月27日13時03分18秒 (by laycrs)
Tags: Competitive_Programming_Incomplete Codeforces
トップページに戻る

Logged in as: unknown user (not login)

ログイン: