2019年06月02日04時29分17秒に更新されたバージョンを表示しています.
最新のページはこちらをご覧ください.


Codeforces Global Round 3 B問題 - Born This Way

Source

Codeforces Global Round 3 B問題 (1250pt)
Problem description

問題概要

省略

解法

省略

cLayversion 20190601-1)のコード

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

//no-unlocked
int N, M, K;
ll TA, TB;
ll A[2d5], B[2d5];
{
  int i, j, k;
  ll t;
  ll res = 0;
  rd(N,M,TA,TB,K,A(N),B(M));

  j = 0;
  rep(k,K+1){
    if(N <= k){
      res = -1;
      break;
    }

    t = A[k] + TA;
    while(j < M && B[j] < t) j++;
    if(j + (K-k) >= M){
      res = -1;
      break;
    }

    res >?= B[j+(K-k)] + TB;
  }

  wt(res);
}

Current time: 2024年03月28日20時44分19秒
Last modified: 2019年06月02日04時29分17秒 (by laycrs)
Tags: Competitive_Programming_Incomplete Codeforces Codeforces_Global_Round_3
トップページに戻る

Logged in as: unknown user (not login)

ログイン: