結果

問題 No.3024 等式
ユーザー 👑 p-adicp-adic
提出日時 2023-09-11 10:09:08
言語 cLay
(20240104-1)
結果
WA  
実行時間 -
コード長 410 bytes
コンパイル時間 3,940 ms
コンパイル使用メモリ 180,572 KB
実行使用メモリ 5,548 KB
最終ジャッジ日時 2023-09-11 10:09:14
合計ジャッジ時間 4,789 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
4,380 KB
testcase_01 WA -
testcase_02 AC 1 ms
4,380 KB
testcase_03 AC 1 ms
4,380 KB
testcase_04 WA -
testcase_05 WA -
testcase_06 AC 2 ms
4,380 KB
testcase_07 AC 2 ms
4,384 KB
testcase_08 AC 2 ms
4,384 KB
testcase_09 WA -
testcase_10 WA -
testcase_11 WA -
testcase_12 AC 5 ms
4,384 KB
testcase_13 AC 6 ms
4,384 KB
testcase_14 AC 7 ms
4,380 KB
testcase_15 WA -
testcase_16 WA -
testcase_17 WA -
testcase_18 WA -
testcase_19 WA -
testcase_20 WA -
testcase_21 AC 49 ms
4,596 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

using V=vector<double>;{ll@N,c;V A(N);rep(i,N){ll@a;A[i]=a;}sort(A.begin(),A.end());set<V>S{A};while(N>1){auto T=move(S);S.clear();while(T.size()){T.erase(A=*T.begin());rep(i,N)rep(j,N)if(i!=j){auto&a=A[j];if(a==0)wt("YES"),exit(0);V B(N-1);V C;c=0;rep(k,N)if(k!=i&&k!=j)B[c++]=A[k];V D{A[i]+a,A[i]-a,A[i]*a,A[i]/a};rep[D](d,4)B[c]=d,C=B,sort(C.begin(),C.end());S.insert(C);}}N--;}wt(S.count({0})?"YES":"NO");}
0