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

2019年08月21日05時21分19秒

Codeforces Round #579 DIV3 A問題 - Circle of Students

Source

Codeforces Round #579 DIV3 A問題
Problem description

問題概要

省略

解法

省略

cLayversion 20190820-1)のコード

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

//no-unlocked
int Q, N, P[200];
{
  int i, j, k;
  rd(Q);
  rep(Q){
    rd(N,(P--)(N));
    k = argmin(P(N));
    rep(i,N) if(P[(k+i)%N]!=i) break;
    rep(j,N) if(P[(k+N-j)%N]!=j) break;
    wt(if[i==N||j==N, "YES", "NO"]);
  }
}

Current time: 2024年03月29日05時33分58秒
Last modified: 2019年08月21日05時21分19秒 (by laycrs)
Tags: Competitive_Programming_Incomplete Codeforces CF579 CF_Div3_A
トップページに戻る

Logged in as: unknown user (not login)

ログイン: