Yandex.Algorithm 2020 Qualification round E問題 - Server ordering

Source

Yandex.Algorithm 2020 Qualification round
問題文

問題概要

省略

解法

省略

cLayversion 20201031-1)のコード

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

int N, W[2d5];
int r[2d5];
ll res[2d5];
fenwick<ll> f;
{
  rd(N,W(N));
  f.walloc(N+1,1);
  coordcomp(N, W, r);
  rep(i,N){
    f.add(r[i], W[i]);
    res[i] += f.range(r[i]+1, N);
    if(i) res[i] += res[i-1];
  }
  wt(res(N));
}

Current time: 2024年03月29日00時14分26秒
Last modified: 2020年10月31日02時37分48秒 (by laycrs)
Tags: Competitive_Programming_Incomplete Yandex_Algorithm
トップページに戻る

Logged in as: unknown user (not login)

ログイン: