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

2019年06月02日04時32分50秒
2019年06月02日04時31分39秒

Codeforces Global Round 3 D問題 - Dirty Deeds Done Dirt Cheap

Source

Codeforces Global Round 3 D問題 (1750pt)
Problem description

問題概要

省略

解法

省略

cLayversion 20190601-1)のコード

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

//no-unlocked
int N, A[3d5], B[3d5];

int ind[3d5], x[3d5], sz;
int ress, res[3d5];
int tmps, tmp[3d5];

void update(void){
  int i;
  if(ress < sz){
    ress = sz;
    rep(i,ress) res[i] = ind[i];
  }
}

{
  int i, j, k;
  rd(N,(A,B)(N));

  rep(2){
    sz = 0;
    rep(i,N) if(A[i] < B[i]){
      ind[sz] = i+1;
      x[sz] = -A[i];
      sz++;
    }
    sortA(sz, x, ind);
    update();

    rep(i,N) A[i] *= -1;
    rep(i,N) B[i] *= -1;
  }

  wt(ress);
  wt(res(ress));
}

Current time: 2024年03月29日22時31分58秒
Last modified: 2019年06月02日04時32分50秒 (by laycrs)
Tags: Competitive_Programming_Incomplete Codeforces Codeforces_Global_Round_3
トップページに戻る

Logged in as: unknown user (not login)

ログイン: