結果

問題 No.3024 等式
ユーザー 👑 p-adicp-adic
提出日時 2023-09-11 10:14:18
言語 cLay
(20240104-1)
結果
WA  
実行時間 -
コード長 363 bytes
コンパイル時間 3,845 ms
コンパイル使用メモリ 177,296 KB
実行使用メモリ 290,036 KB
最終ジャッジ日時 2023-09-11 10:14:38
合計ジャッジ時間 19,165 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
4,508 KB
testcase_01 WA -
testcase_02 AC 2 ms
4,380 KB
testcase_03 AC 2 ms
4,384 KB
testcase_04 WA -
testcase_05 WA -
testcase_06 AC 13 ms
4,384 KB
testcase_07 AC 16 ms
4,668 KB
testcase_08 AC 24 ms
5,296 KB
testcase_09 WA -
testcase_10 WA -
testcase_11 WA -
testcase_12 AC 1,062 ms
31,368 KB
testcase_13 AC 990 ms
31,612 KB
testcase_14 AC 1,792 ms
51,448 KB
testcase_15 WA -
testcase_16 WA -
testcase_17 WA -
testcase_18 TLE -
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;}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);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.insert(B);}}}N--;}wt(S.count({0})?"YES":"NO");}
0