結果

問題 No.3024 等式
ユーザー 👑 p-adicp-adic
提出日時 2023-09-11 10:23:34
言語 cLay
(20240104-1)
結果
TLE  
実行時間 -
コード長 510 bytes
コンパイル時間 2,604 ms
コンパイル使用メモリ 177,876 KB
実行使用メモリ 206,016 KB
最終ジャッジ日時 2023-09-11 10:23:51
合計ジャッジ時間 16,404 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
4,376 KB
testcase_01 AC 2 ms
4,384 KB
testcase_02 AC 2 ms
4,380 KB
testcase_03 AC 2 ms
4,384 KB
testcase_04 AC 2 ms
4,376 KB
testcase_05 AC 2 ms
4,380 KB
testcase_06 AC 14 ms
4,380 KB
testcase_07 AC 17 ms
4,600 KB
testcase_08 AC 25 ms
5,448 KB
testcase_09 AC 6 ms
4,380 KB
testcase_10 AC 20 ms
5,076 KB
testcase_11 AC 23 ms
4,996 KB
testcase_12 AC 1,240 ms
31,396 KB
testcase_13 AC 1,158 ms
31,560 KB
testcase_14 AC 2,077 ms
51,464 KB
testcase_15 AC 417 ms
28,820 KB
testcase_16 AC 197 ms
18,308 KB
testcase_17 AC 32 ms
7,084 KB
testcase_18 AC 315 ms
36,604 KB
testcase_19 AC 738 ms
67,112 KB
testcase_20 AC 666 ms
54,736 KB
testcase_21 TLE -
権限があれば一括ダウンロードができます

ソースコード

diff #

using V=vector<double>;using T=chrono::system_clock;{T::time_point w=T::now();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()&&static_cast<ll>(chrono::duration_cast<chrono::microseconds>(T::now()-w).count()/1000)<4900){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