結果

問題 No.2682 Visible Divisible
ユーザー tailstails
提出日時 2024-03-21 00:26:50
言語 cLay
(20240104-1)
結果
AC  
実行時間 19 ms / 2,000 ms
コード長 293 bytes
コンパイル時間 10,879 ms
コンパイル使用メモリ 221,172 KB
実行使用メモリ 10,692 KB
最終ジャッジ日時 2024-03-21 00:27:03
合計ジャッジ時間 10,316 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 18 ms
10,692 KB
testcase_01 AC 18 ms
10,692 KB
testcase_02 AC 17 ms
10,692 KB
testcase_03 AC 19 ms
10,692 KB
testcase_04 AC 17 ms
10,692 KB
testcase_05 AC 17 ms
10,692 KB
testcase_06 AC 17 ms
10,692 KB
testcase_07 AC 17 ms
10,692 KB
testcase_08 AC 7 ms
9,668 KB
testcase_09 AC 7 ms
9,668 KB
testcase_10 AC 8 ms
9,668 KB
testcase_11 AC 19 ms
10,692 KB
testcase_12 AC 17 ms
10,692 KB
testcase_13 AC 17 ms
10,692 KB
testcase_14 AC 18 ms
10,692 KB
testcase_15 AC 17 ms
10,692 KB
testcase_16 AC 17 ms
10,692 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

ll@n,@k;
ull m=~0;
while(!(k&1))k>>=1,m<<=1;
m=~m;
ll f[32],g[],e=Factor(k,f,g),h[]{},h2=0;
ull et[],ei[];
rep(j,e){
	ull p=f[j]**g[j];
	et[j]=~0ull/p;
	ull x=p;
	rep(5)x*=2-p*x;
	ei[j]=x;
}
rep(n){
	ll@a;
	h2|=!(a&m);
	rep(j,e){
		h[j]=h[j]||a*ei[j]<=et[j];
	}
}
wt(min(h2,h(e))?"Yes":"No");
0