結果

問題 No.3024 等式
ユーザー 👑 p-adicp-adic
提出日時 2023-09-11 09:38:04
言語 cLay
(20240104-1)
結果
TLE  
実行時間 -
コード長 352 bytes
コンパイル時間 5,175 ms
コンパイル使用メモリ 188,928 KB
実行使用メモリ 130,680 KB
最終ジャッジ日時 2023-09-11 09:38:36
合計ジャッジ時間 28,346 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
4,376 KB
testcase_01 AC 2 ms
4,380 KB
testcase_02 AC 3 ms
4,380 KB
testcase_03 AC 3 ms
4,376 KB
testcase_04 AC 3 ms
4,376 KB
testcase_05 AC 2 ms
4,376 KB
testcase_06 AC 32 ms
5,504 KB
testcase_07 AC 39 ms
6,460 KB
testcase_08 AC 62 ms
8,456 KB
testcase_09 AC 10 ms
4,472 KB
testcase_10 AC 29 ms
6,056 KB
testcase_11 AC 49 ms
7,268 KB
testcase_12 AC 3,248 ms
78,056 KB
testcase_13 AC 3,361 ms
81,632 KB
testcase_14 TLE -
testcase_15 AC 790 ms
43,548 KB
testcase_16 AC 363 ms
27,516 KB
testcase_17 AC 53 ms
9,096 KB
testcase_18 AC 509 ms
56,760 KB
testcase_19 AC 1,436 ms
104,300 KB
testcase_20 AC 1,330 ms
75,296 KB
testcase_21 TLE -
権限があれば一括ダウンロードができます

ソースコード

diff #

ll@N,c;VI@A(N);set<VI>S{A};while(N>1){set<VI>T;while(S.size()){S.erase(A=*S.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,T.insert(B);}}S=T;N--;}while(S.size()){S.erase(A=*S.begin());if(A[0]==0)wt("YES"),exit(0);}wt("NO");
0