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

2021年06月07日19時36分04秒

Codeforces Deltix Round, Spring 2021 C問題 - Compression and Expansion

Source

Codeforces Deltix Round, Spring 2021 C問題 (1500pt)
Problem description

問題概要

省略

解法

省略

cLayversion 20210607-1)のコード

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

//no-unlocked
int N, A[1d3];
int sz, cur[];
{
  REP(rd_int()){
    rd(N,A(N));
    sz = 0;
    rep(i,N){
      if(A[i]==1){
        cur[sz++] = 1;
      } else {
        while(cur[sz-1] + 1 != A[i]) sz--;
        cur[sz-1]++;
      }
      rep(k,sz) wtN(cur[k], k==sz-1?'\n':'.');
    }
  }
}

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

Logged in as: unknown user (not login)

ログイン: