Codeforces Round #592 DIV2 C問題 - The Football Season

Source

Codeforces Round #592 DIV2 C問題 (1500pt)
Problem description

問題概要

省略

解法

省略

cLayversion 20191027-1)のコード

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

//no-unlocked
ll N, P, W, D;
{
  ll x, y, z;
  rd(N,P,W,D);
  rep(y,1d5){
    x = (P - y * D) / W;
    z = N - x - y;
    if(x >= 0 && z >= 0 && x * W + y * D == P) wt(x,y,z), return 0;
  }
  wt(-1);
}

Current time: 2024年03月29日03時51分36秒
Last modified: 2019年11月02日02時58分11秒 (by laycrs)
Tags: Competitive_Programming_Incomplete Codeforces CF592 CF_Div2_C
トップページに戻る

Logged in as: unknown user (not login)

ログイン: