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

2021年10月24日00時04分45秒

AtCoder Beginner Contest 224 E問題 - Integers on Grid

Source

AtCoder Beginner Contest 224
問題文

問題概要

省略

解法

省略

cLay(version 20210926-1)のコード

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

int X, Y, N, R[2d5], C[], A[], ind[];
int rr[], cc[], res[], x, y;
rd(X,Y,N,(R--,C--,A)(N));
rep(i,N) ind[i] = i;
rsortA(N,A,R,C,ind);
rep(x,N){
  y = x+1;
  while(y < N && A[x]==A[y]) y++;
  rep(i,x,y) res[ind[i]] = max(rr[R[i]], cc[C[i]]) + 1;
  rep(i,x,y) rr[R[i]] >?= res[ind[i]];
  rep(i,x,y) cc[C[i]] >?= res[ind[i]];
  x = y-1;
}
wtLn(res(N)-1);

Current time: 2024年03月29日01時36分40秒
Last modified: 2021年10月24日00時04分45秒 (by laycrs)
Tags: Competitive_Programming_Incomplete AtCoder AtCoder_Beginner_Contest ABC224 ABC_E
トップページに戻る

Logged in as: unknown user (not login)

ログイン: