結果
| 問題 | No.2757 Pin Game |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2024-05-17 21:31:06 |
| 言語 | Rust (1.94.0 + proconio + num + itertools) |
| 結果 |
AC
|
| 実行時間 | 14 ms / 2,000 ms |
| コード長 | 309 bytes |
| 記録 | |
| コンパイル時間 | 633 ms |
| コンパイル使用メモリ | 197,956 KB |
| 実行使用メモリ | 7,808 KB |
| 最終ジャッジ日時 | 2026-05-27 13:21:48 |
| 合計ジャッジ時間 | 1,684 ms |
|
ジャッジサーバーID (参考情報) |
judge1_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);
}