結果
| 問題 | No.2757 Pin Game |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2024-05-17 21:31:06 |
| 言語 | Rust (1.99.0 + proconio + num + itertools + ACL) |
| 結果 |
AC
不安定
|
| 実行時間 | 12 ms / 2,000 ms |
| + 155µs | |
| コード長 | 309 bytes |
| 記録 | |
| コンパイル時間 | 446 ms |
| コンパイル使用メモリ | 188,092 KB |
| 実行使用メモリ | 9,864 KB |
| 最終ジャッジ日時 | 2026-10-05 04:58:02 |
| 合計ジャッジ時間 | 2,029 ms |
|
ジャッジサーバーID (参考情報) |
judge4_0 / judge3_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 10 |
ソースコード
use proconio::input;
fn main() {
input! {
n:usize,
k:i64,
x:[i64;n],
}
let mut ans = 1;
let mut lastx = x[0];
for i in 1..n {
if x[i] - lastx < k {
continue;
}
lastx = x[i];
ans += 1;
}
println!("{}", ans);
}