結果
問題 |
No.2890 Chiffon
|
ユーザー |
|
提出日時 | 2024-09-13 21:52:56 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 520 bytes |
コンパイル時間 | 1,897 ms |
コンパイル使用メモリ | 195,880 KB |
最終ジャッジ日時 | 2025-02-24 07:31:25 |
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 20 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=1e18; 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; }