Codeforces Round #579 DIV3 B問題 - Equal Rectangles

Source

Codeforces Round #579 DIV3 B問題
Problem description

問題概要

省略

解法

省略

cLayversion 20190820-1)のコード

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

//no-unlocked
int Q, N, A[400];
{
  int i;
  
  rd(Q);
  rep(Q){
    rd(N,A(4N));
    sort(A,A+4N);
    rep(i,2N){
      if(A[2i]!=A[2i+1]) break;
      A[i] = A[2i];
    }
    if(i!=2N){
      wt("NO");
      continue;
    }

    rep(i,N) if(A[0]*A[2N-1] != A[i]*A[2N-1-i]) break;
    wt(if[i==N,"YES","NO"]);
  }
}

Current time: 2024年04月24日05時44分12秒
Last modified: 2019年08月21日05時21分07秒 (by laycrs)
Tags: Competitive_Programming_Incomplete Codeforces CF579 CF_Div3_B
トップページに戻る

Logged in as: unknown user (not login)

ログイン: