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

2021年06月07日19時37分18秒

Codeforces Round #723 DIV2 D問題 - Kill Anton

Source

Codeforces Round #723 DIV2 D問題 (2250pt)
Problem description

問題概要

省略

解法

省略

cLayversion 20210607-1)のコード

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

//no-unlocked
int N; char S[1d5+2];
int ind[4], rev[4], arr[1d5];
int ress; char res[1d5+2];
const char a[6] = "ANTO"; int r[128];
{
  rep(i,4) r[a[i]] = i;
  REP(rd_int()){
    int i, j, k;
    ll opt = -1, cur;
    rd(S@N);
    rep_perm(ind,4){
      rep(i,4) rev[ind[i]] = i;
      rep(i,N) arr[i] = rev[r[S[i]]];
      cur = inversion(N,arr);
      if(opt < cur){
        opt = cur;
        ress = 0;
        rep[ind](i,4) REP(arrCountVal(N,S,a[i])) res[ress++] = a[i];
      }
    }
    res[N] = '\0';
    wt(res);
  }
}

Current time: 2024年04月25日21時21分48秒
Last modified: 2021年06月07日19時37分18秒 (by laycrs)
Tags: Competitive_Programming_Incomplete Codeforces CF723 CF_DIV2_D
トップページに戻る

Logged in as: unknown user (not login)

ログイン: