保存されている過去のバージョンの一覧

2021年06月07日19時38分54秒

Codeforces Round #724 DIV2 C問題 - Diluc and Kaeya

Source

Codeforces Round #724 DIV2 C問題 (1500pt)
Problem description

問題概要

省略

解法

省略

cLayversion 20210607-1)のコード

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

//no-unlocked
int N;
char S[5d5+2];
int x, y, a, b, res[];
HashMap<pair<int,int>,int> hs;
{
  REP(rd_int()){
    rd(N,S);
    x = y = 0;
    hs.init(N,0);
    rep(i,N){
      if[S[i]=='K',x,y]++;
      (a,b) = (x,y) / gcd(x,y);
      res[i] = ++hs[{a,b}];
    }
    wt(res(N));
  }
}

Current time: 2024年04月26日15時21分36秒
Last modified: 2021年06月07日19時38分54秒 (by laycrs)
Tags: Competitive_Programming_Incomplete Codeforces CF724 CF_DIV2_C
トップページに戻る

Logged in as: unknown user (not login)

ログイン: