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

2021年01月02日16時12分30秒

Codeforces Good Bye 2020 F問題 - Euclid's nightmare

Source

Codeforces Good Bye 2020 F問題 (1750pt)
Problem description

問題概要

省略

解法

省略

cLayversion 20201229-1)のコード

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

//no-unlocked
int N, M, T[5d5], A[5d5], B[5d5];
int ress, res[5d5];
{
  Modint tmp = 1;
  unionFind uf;
  rd(N,M);
  rep(i,N){
    rd(T[i]);
    if(T[i]==1) rd(A[i]--), B[i] = M;
    if(T[i]==2) rd(A[i]--, B[i]--);
  }
  uf.walloc(M+1, 1);
  rep(i,N) if(uf(A[i], B[i])){
    res[ress++] = i;
    tmp *= 2;
  }
  wt(tmp, ress);
  wt(res(ress)+1);
}

Current time: 2024年03月30日00時09分11秒
Last modified: 2021年01月02日16時12分30秒 (by laycrs)
Tags: Competitive_Programming_Incomplete Codeforces Codeforces_Good_Bye_2020
トップページに戻る

Logged in as: unknown user (not login)

ログイン: