AtCoder Regular Contest 065
AtCoder Beginner Contest 049
問題文 (ARC)
問題文 (ABC)
省略
省略
C++に変換後のコードはこちら
int N, K, L;
int res[2d5];
{
unionFind u1, u2;
map< pair<int,int>, int > mp;
rd(N, K, L);
u1.walloc(N); u1.init();
u2.walloc(N); u2.init();
rep(K) u1(rd_int()-1, rd_int()-1);
rep(L) u2(rd_int()-1, rd_int()-1);
rep(i,N) mp[make_pair(u1(i), u2(i))]++;
rep(i,N) res[i] = mp[make_pair(u1(i), u2(i))];
wt(res(N));
}
Current time: 2024年04月27日04時23分22秒
Last modified: 2019年09月21日11時56分10秒 (by laycrs)
Tags: Competitive_Programming_Incomplete AtCoder AtCoder_Regular_Contest AtCoder_Beginner_Contest ARC065 ABC049 ARC_B ABC_D
トップページに戻る
Logged in as: unknown user (not login)