結果

問題 No.2536 同値性と充足可能性
ユーザー 👑 p-adicp-adic
提出日時 2023-08-14 00:42:20
言語 cLay
(20240104-1)
結果
AC  
実行時間 17 ms / 2,000 ms
コード長 300 bytes
コンパイル時間 3,236 ms
コンパイル使用メモリ 178,732 KB
実行使用メモリ 9,084 KB
最終ジャッジ日時 2024-05-08 02:38:37
合計ジャッジ時間 4,395 ms
ジャッジサーバーID
(参考情報)
judge5 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
6,816 KB
testcase_01 AC 2 ms
6,940 KB
testcase_02 AC 2 ms
6,940 KB
testcase_03 AC 1 ms
6,944 KB
testcase_04 AC 2 ms
6,944 KB
testcase_05 AC 2 ms
6,940 KB
testcase_06 AC 1 ms
6,944 KB
testcase_07 AC 1 ms
6,944 KB
testcase_08 AC 1 ms
6,940 KB
testcase_09 AC 1 ms
6,944 KB
testcase_10 AC 3 ms
7,616 KB
testcase_11 AC 2 ms
6,944 KB
testcase_12 AC 1 ms
6,944 KB
testcase_13 AC 1 ms
6,944 KB
testcase_14 AC 1 ms
6,940 KB
testcase_15 AC 2 ms
7,492 KB
testcase_16 AC 1 ms
6,944 KB
testcase_17 AC 2 ms
6,944 KB
testcase_18 AC 2 ms
6,944 KB
testcase_19 AC 2 ms
6,940 KB
testcase_20 AC 2 ms
6,944 KB
testcase_21 AC 2 ms
6,944 KB
testcase_22 AC 2 ms
6,940 KB
testcase_23 AC 10 ms
6,944 KB
testcase_24 AC 10 ms
6,944 KB
testcase_25 AC 17 ms
7,548 KB
testcase_26 AC 16 ms
9,084 KB
testcase_27 AC 16 ms
7,600 KB
testcase_28 AC 17 ms
8,612 KB
testcase_29 AC 16 ms
7,560 KB
testcase_30 AC 16 ms
9,048 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.cpp: In function ‘int main()’:
main.cpp:314:20: warning: narrowing conversion of ‘(2 * N)’ from ‘long long int’ to ‘int’ [-Wnarrowing]
  314 |   unionFind u{'m',2*N,1};
      |                   ~^~

ソースコード

diff #

ll@N,@M,i,j,a,b,c=0,C[2N]={};string E;unionFind u{'m',2N,1};rep(M)rd(i--,E,j--),b=E[2]<'=',u(i,j+N*b),u(i+N,j+N-N*b);rep(i,N){a=u(i),b=u(i+N);if(a==b)wt("No"),exit(0);if(!C[a])C[a]=1,C[b]=2;c+=C[a]<2;}if(2c<N)b=1,c=N-c;else b=0;wtLn("Yes",c);VI v{};rep(i,N){if((C[u(i)]<2)!=b)v.push_back(i+1);}wt(v);
0