結果
| 問題 |
No.2757 Pin Game
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2024-05-17 21:30:22 |
| 言語 | Rust (1.83.0 + proconio) |
| 結果 |
RE
|
| 実行時間 | - |
| コード長 | 313 bytes |
| コンパイル時間 | 17,432 ms |
| コンパイル使用メモリ | 391,540 KB |
| 実行使用メモリ | 6,820 KB |
| 最終ジャッジ日時 | 2024-12-20 13:15:08 |
| 合計ジャッジ時間 | 13,645 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 3 RE * 7 |
ソースコード
use proconio::input;
fn main() {
input! {
n:usize,
k:usize,
x:[usize;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);
}