結果
問題 | No.2890 Chiffon |
ユーザー |
|
提出日時 | 2024-09-13 22:49:07 |
言語 | C++17(gcc12) (gcc 12.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 523 bytes |
コンパイル時間 | 2,124 ms |
コンパイル使用メモリ | 204,468 KB |
実行使用メモリ | 11,208 KB |
最終ジャッジ日時 | 2024-09-13 22:49:15 |
合計ジャッジ時間 | 7,353 ms |
ジャッジサーバーID (参考情報) |
judge6 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 19 WA * 11 RE * 22 |
ソースコード
#include <bits/stdc++.h> using namespace std; using ll = long long; #include<atcoder/modint> using namespace atcoder; using mint =modint998244353; int main() { cin.tie(nullptr); ios::sync_with_stdio(false); ll N,K; cin>>N>>K; vector<ll> A(K*2); for(int i=0;i<K;i++){ cin>>A[i]; A[i+K]=A[i]+2*N; } ll d=(2*N)/K; assert(K<1e4); for(int i=0;i<2*K;i++){ for(int j=0;j+1<i;j++){ d=min(d,(A[i]-A[j]-2)/(i-j-1)); } } cout<<d<<endl; }