結果

問題 No.3024 等式
ユーザー 👑 p-adicp-adic
提出日時 2023-09-11 10:10:19
言語 cLay
(20240104-1)
結果
TLE  
実行時間 -
コード長 410 bytes
コンパイル時間 2,578 ms
コンパイル使用メモリ 180,784 KB
実行使用メモリ 114,256 KB
最終ジャッジ日時 2023-09-11 10:10:44
合計ジャッジ時間 23,005 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
8,760 KB
testcase_01 AC 1 ms
4,376 KB
testcase_02 AC 3 ms
4,376 KB
testcase_03 AC 3 ms
4,376 KB
testcase_04 AC 2 ms
4,376 KB
testcase_05 AC 2 ms
4,376 KB
testcase_06 AC 20 ms
4,536 KB
testcase_07 AC 24 ms
5,216 KB
testcase_08 AC 38 ms
6,384 KB
testcase_09 AC 5 ms
4,376 KB
testcase_10 AC 19 ms
5,268 KB
testcase_11 AC 33 ms
5,628 KB
testcase_12 AC 1,815 ms
49,508 KB
testcase_13 AC 1,674 ms
49,828 KB
testcase_14 AC 2,949 ms
81,160 KB
testcase_15 AC 269 ms
23,092 KB
testcase_16 AC 234 ms
20,908 KB
testcase_17 AC 14 ms
4,932 KB
testcase_18 AC 1,495 ms
85,740 KB
testcase_19 AC 1,439 ms
84,608 KB
testcase_20 AC 2,031 ms
114,256 KB
testcase_21 TLE -
権限があれば一括ダウンロードができます

ソースコード

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