結果

問題 No.3024 等式
ユーザー 👑 p-adicp-adic
提出日時 2023-09-11 10:58:38
言語 cLay
(20240104-1)
結果
MLE  
実行時間 -
コード長 432 bytes
コンパイル時間 1,903 ms
コンパイル使用メモリ 168,448 KB
実行使用メモリ 814,752 KB
最終ジャッジ日時 2023-09-11 10:58:44
合計ジャッジ時間 5,529 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
4,376 KB
testcase_01 AC 2 ms
4,380 KB
testcase_02 AC 3 ms
4,380 KB
testcase_03 AC 3 ms
4,376 KB
testcase_04 AC 3 ms
4,376 KB
testcase_05 AC 1 ms
4,380 KB
testcase_06 AC 93 ms
37,124 KB
testcase_07 AC 92 ms
37,312 KB
testcase_08 AC 93 ms
37,100 KB
testcase_09 AC 4 ms
4,800 KB
testcase_10 AC 11 ms
8,876 KB
testcase_11 AC 72 ms
37,104 KB
testcase_12 MLE -
testcase_13 -- -
testcase_14 -- -
testcase_15 -- -
testcase_16 -- -
testcase_17 -- -
testcase_18 -- -
testcase_19 -- -
testcase_20 -- -
testcase_21 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

using V=vector<double>;{ll@N,c;V A(N);rep(i,N){ll@a;A[i]=a;}list<V>S{A};while(N>1){auto T=move(S);S.clear();while(T.size()){A=T.front();T.pop_front();rep(i,N)rep(j,N)if(i!=j){auto&a=A[j];if(a==0)wt("YES"),exit(0);V B(N-1);if(a>0){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)if(d>=0)B[c]=d,S.push_back(B);}}}N--;}while(S.size()){A=S.front();S.pop_front();if(A[0]==0)wt("YES"),exit(0);}wt("NO");}
0