Codeforces Round #585 DIV2 B問題 - The Number of Products

Source

Codeforces Round #585 DIV2 B問題 (1000pt)
Problem description

問題概要

省略

解法

省略

cLayversion 20190914-1)のコード

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

//no-unlocked
int N, A[2d5];
int dp[2d5];
{
  int i;
  ll x = 0, y = 0;
  ll res1, res2 = 0;
  rd(N,A(N));

  rep(i,N){
    x++;
    if(A[i] < 0) swap(x, y);
    res2 += x;
  }

  res1 = (ll) N * (N+1) / 2 - res2;
  wt(res1, res2);
}

Current time: 2024年04月19日08時49分32秒
Last modified: 2019年09月16日01時49分03秒 (by laycrs)
Tags: Competitive_Programming_Incomplete Codeforces CF585 CF_Div2_B
トップページに戻る

Logged in as: unknown user (not login)

ログイン: