結果

問題 No.3024 等式
ユーザー 👑 p-adicp-adic
提出日時 2023-09-11 09:42:46
言語 cLay
(20240104-1)
結果
TLE  
実行時間 -
コード長 315 bytes
コンパイル時間 2,977 ms
コンパイル使用メモリ 188,668 KB
実行使用メモリ 104,240 KB
最終ジャッジ日時 2023-09-11 09:43:13
合計ジャッジ時間 24,175 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
4,356 KB
testcase_01 AC 1 ms
4,376 KB
testcase_02 AC 3 ms
4,376 KB
testcase_03 AC 3 ms
4,380 KB
testcase_04 AC 2 ms
4,380 KB
testcase_05 AC 2 ms
4,376 KB
testcase_06 AC 27 ms
4,720 KB
testcase_07 AC 32 ms
5,348 KB
testcase_08 AC 49 ms
6,292 KB
testcase_09 AC 9 ms
4,604 KB
testcase_10 AC 26 ms
6,064 KB
testcase_11 AC 44 ms
5,720 KB
testcase_12 AC 2,664 ms
52,088 KB
testcase_13 AC 2,623 ms
53,640 KB
testcase_14 AC 4,482 ms
82,268 KB
testcase_15 AC 723 ms
43,604 KB
testcase_16 AC 308 ms
27,316 KB
testcase_17 AC 53 ms
9,112 KB
testcase_18 AC 362 ms
45,444 KB
testcase_19 AC 1,188 ms
104,240 KB
testcase_20 AC 1,034 ms
75,244 KB
testcase_21 TLE -
権限があれば一括ダウンロードができます

ソースコード

diff #

ll@N,c;VI@A(N);set<VI>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){modint a=A[j];if(a==0)wt("YES"),exit(0);VI B(N-1);c=0;rep(k,N)if(k!=i&&k!=j)B[c++]=A[k];VI C{A[i]+a,A[i]-a,A[i]*a,A[i]/a};rep[C](c,4)B[N-2]=c,S.insert(B);}}N--;}wt(S.count({0})?"YES":"NO");
0