結果

問題 No.3024 等式
ユーザー 👑 p-adicp-adic
提出日時 2023-09-11 10:13:17
言語 cLay
(20240104-1)
結果
TLE  
実行時間 -
コード長 363 bytes
コンパイル時間 2,621 ms
コンパイル使用メモリ 177,276 KB
実行使用メモリ 298,848 KB
最終ジャッジ日時 2023-09-11 10:13:39
合計ジャッジ時間 22,246 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
4,380 KB
testcase_01 AC 1 ms
4,380 KB
testcase_02 AC 3 ms
4,380 KB
testcase_03 AC 2 ms
4,380 KB
testcase_04 AC 2 ms
4,380 KB
testcase_05 AC 2 ms
4,380 KB
testcase_06 AC 21 ms
4,752 KB
testcase_07 AC 25 ms
5,068 KB
testcase_08 AC 38 ms
6,232 KB
testcase_09 AC 9 ms
4,436 KB
testcase_10 AC 30 ms
6,108 KB
testcase_11 AC 35 ms
5,812 KB
testcase_12 AC 2,014 ms
46,716 KB
testcase_13 AC 1,823 ms
47,424 KB
testcase_14 AC 3,323 ms
78,508 KB
testcase_15 AC 680 ms
46,708 KB
testcase_16 AC 336 ms
28,976 KB
testcase_17 AC 50 ms
9,228 KB
testcase_18 AC 534 ms
63,312 KB
testcase_19 AC 1,271 ms
117,472 KB
testcase_20 AC 1,149 ms
95,972 KB
testcase_21 TLE -
権限があれば一括ダウンロードができます

ソースコード

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);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)B[c]=d,S.insert(B);}}}N--;}wt(S.count({0})?"YES":"NO");}
0