結果

問題 No.2536 同値性と充足可能性
ユーザー 👑 p-adicp-adic
提出日時 2023-08-14 00:42:20
言語 cLay
(20240714-1)
結果
AC  
実行時間 18 ms / 2,000 ms
コード長 300 bytes
コンパイル時間 4,049 ms
コンパイル使用メモリ 178,076 KB
実行使用メモリ 7,728 KB
最終ジャッジ日時 2024-12-14 02:25:13
合計ジャッジ時間 5,158 ms
ジャッジサーバーID
(参考情報)
judge1 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
5,248 KB
testcase_01 AC 2 ms
5,248 KB
testcase_02 AC 2 ms
5,248 KB
testcase_03 AC 2 ms
5,248 KB
testcase_04 AC 2 ms
5,248 KB
testcase_05 AC 2 ms
5,248 KB
testcase_06 AC 2 ms
5,248 KB
testcase_07 AC 2 ms
5,248 KB
testcase_08 AC 2 ms
5,248 KB
testcase_09 AC 2 ms
5,248 KB
testcase_10 AC 2 ms
5,248 KB
testcase_11 AC 2 ms
5,248 KB
testcase_12 AC 1 ms
5,248 KB
testcase_13 AC 2 ms
5,248 KB
testcase_14 AC 2 ms
5,248 KB
testcase_15 AC 2 ms
5,248 KB
testcase_16 AC 2 ms
5,248 KB
testcase_17 AC 2 ms
5,248 KB
testcase_18 AC 2 ms
5,248 KB
testcase_19 AC 2 ms
5,248 KB
testcase_20 AC 3 ms
5,248 KB
testcase_21 AC 3 ms
5,248 KB
testcase_22 AC 3 ms
5,248 KB
testcase_23 AC 10 ms
5,248 KB
testcase_24 AC 10 ms
5,248 KB
testcase_25 AC 18 ms
7,552 KB
testcase_26 AC 18 ms
7,424 KB
testcase_27 AC 18 ms
7,728 KB
testcase_28 AC 18 ms
7,452 KB
testcase_29 AC 18 ms
7,436 KB
testcase_30 AC 16 ms
7,604 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