結果
問題 |
No.3166 [Cherry 7th Tune *] 桜の守人
|
ユーザー |
![]() |
提出日時 | 2025-05-30 23:23:10 |
言語 | C++23 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 267 bytes |
コンパイル時間 | 1,253 ms |
コンパイル使用メモリ | 96,664 KB |
実行使用メモリ | 7,848 KB |
最終ジャッジ日時 | 2025-05-30 23:23:13 |
合計ジャッジ時間 | 2,754 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | WA * 2 |
other | WA * 26 |
ソースコード
#include <iostream> #include <algorithm> using namespace std; int a[40000]; int main(){int t;cin>>t;while(t--){int n,l,k;cin>>n>>l>>k;for(int i=0;i<n;++i){cin>>a[i];a[i+n]=a[i];}sort(a,a+2*n);int ma=0;for(int i=0;i<n;++i)ma=max(a[i+k]-a[i],ma);cout<<(ma+1)/2<<'\n';}}