結果
| 問題 |
No.2909 Imaginary Summer
|
| ユーザー |
👑 |
| 提出日時 | 2024-09-29 09:56:34 |
| 言語 | cLay (20241019-1) |
| 結果 |
AC
|
| 実行時間 | 5,832 ms / 6,000 ms |
| コード長 | 437 bytes |
| コンパイル時間 | 8,001 ms |
| コンパイル使用メモリ | 221,748 KB |
| 実行使用メモリ | 19,908 KB |
| 最終ジャッジ日時 | 2024-10-02 17:47:06 |
| 合計ジャッジ時間 | 230,019 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 37 |
コンパイルメッセージ
main.cpp: In function ‘int main()’:
main.cpp:950:19: warning: narrowing conversion of ‘((X[j] * x) + Y[j])’ from ‘long long int’ to ‘int’ [-Wnarrowing]
950 | l[j]={X[j]*x+Y[j],j};
| ~~~~~~^~~~~
main.cpp:950:19: warning: narrowing conversion of ‘((X[j] * x) + Y[j])’ from ‘long long int’ to ‘int’ [-Wnarrowing]
main.cpp:954:27: warning: narrowing conversion of ‘((A[i] * x) + B[i])’ from ‘long long int’ to ‘int’ [-Wnarrowing]
954 | vector<int> s{A[i]*x+B[i],0};
| ~~~~~~^~~~~
main.cpp:954:27: warning: narrowing conversion of ‘((A[i] * x) + B[i])’ from ‘long long int’ to ‘int’ [-Wnarrowing]
ソースコード
ll@(++N,M,K),@(X,Y)[N],@(A,B)[K],L=1d3,x;auto D=[&](ll&x,ll&y,ll i){return(x-X[i])**2+(y-Y[i])**2;};VLL o(K,1e18);VVI l(N);Timer t;t.set();Rand r;while(t.get()<5){x=r.get(L);rep(j,N)l[j]={X[j]*x+Y[j],j};sortV(l);rep(i,K){VI s{A[i]*x+B[i],0};M=bsearch_min[ll,m,0,N](s<l[m]);rep(j,max(0,M-L),min(N,M+L))o[i]<?=D(A[i],B[i],l[j][1]);}}M=min[j,1,N](D(*X,*Y,j));rep(i,K)A[i]=D(A[i],B[i],0);Wt(sum[i,0,K](min(sqrt(A[i]),sqrt(M)+sqrt(o[i]))*2));