Language: C++

use std::io::{self, Stdin};
use std::str::{self, FromStr};
use std::error::Error;

fn exec() {
    let mut sc = Scanner::new();
    let (n, c, k): (usize, usize, i64) = (sc.ne(), sc.ne(), sc.ne());
    let mut t: Vec<i64> = (0..n).map(|_| sc.ne()).collect();
    t.sort();
    let mut ans = 0;
    let mut cnt = 0;
    let mut bus = -1;
    for i in 0..n {
        if bus == -1 {
            bus = t[i] + k;
            cnt = 1;
            ans += 1;
        } else {
            if cnt == c || bus < t[i] {
                bus = t[i] + k;
                cnt = 1;
                ans += 1;
            } else {
                cnt += 1;
            }
        }
    }
    println!("{}", ans);
}

fn main() {
    const STACK: usize = 16 * 1024 * 1024;
    let _ = std::thread::Builder::new()
        .stack_size(STACK)
        .spawn(|| { exec(); })
        .unwrap()
        .join()
        .unwrap();
}

#[allow(dead_code)]
struct Scanner {
    stdin: Stdin,
    id: usize,
    buf: Vec<u8>,
}

#[allow(dead_code)]
impl Scanner {
    fn new() -> Scanner {
        Scanner {
            stdin: io::stdin(),
            id: 0,
            buf: Vec::new(),
        }
    }
    fn next_line(&mut self) -> Option<String> {
        let mut res = String::new();
        match self.stdin.read_line(&mut res) {
            Ok(0) => None,
            Ok(_) => Some(res),
            Err(why) => panic!("error in read_line: {}", why.description()),
        }
    }
    fn next<T: FromStr>(&mut self) -> Option<T> {
        while self.buf.len() == 0 {
            self.buf = match self.next_line() {
                Some(r) => {
                    self.id = 0;
                    r.trim().as_bytes().to_owned()
                }
                None => return None,
            };
        }
        let l = self.id;
        assert!(self.buf[l] != b' ');
        let n = self.buf.len();
        let mut r = l;
        while r < n && self.buf[r] != b' ' {
            r += 1;
        }
        let res = match str::from_utf8(&self.buf[l..r]).ok().unwrap().parse::<T>() {
            Ok(s) => Some(s),
            Err(_) => {
                panic!("parse error, {:?}",
                       String::from_utf8(self.buf[l..r].to_owned()))
            }
        };
        while r < n && self.buf[r] == b' ' {
            r += 1;
        }
        if r == n {
            self.buf.clear();
        } else {
            self.id = r;
        }
        res
    }
    fn ne<T: FromStr>(&mut self) -> T {
        self.next::<T>().unwrap()
    }
}


Compiler output:
a.cc:8:28: error: too many decimal points in number
    8 |     let mut t: Vec<i64> = (0..n).map(|_| sc.ne()).collect();
      |                            ^~~~
a.cc:13:14: error: too many decimal points in number
   13 |     for i in 0..n {
      |              ^~~~
a.cc:41:2: error: invalid preprocessing directive #[
   41 | #[allow(dead_code)]
      |  ^
a.cc:48:2: error: invalid preprocessing directive #[
   48 | #[allow(dead_code)]
      |  ^
a.cc:1:1: error: 'use' does not name a type
    1 | use std::io::{self, Stdin};
      | ^~~
a.cc:2:1: error: 'use' does not name a type
    2 | use std::str::{self, FromStr};
      | ^~~
a.cc:3:1: error: 'use' does not name a type
    3 | use std::error::Error;
      | ^~~
a.cc:5:1: error: 'fn' does not name a type
    5 | fn exec() {
      | ^~
a.cc:31:1: error: 'fn' does not name a type
   31 | fn main() {
      | ^~
a.cc:43:5: error: 'stdin' does not name a type
   43 |     stdin: Stdin,
      |     ^~~~~
a.cc:1:1: note: 'stdin' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
  +++ |+#include <cstdio>
    1 | use std::io::{self, Stdin};
a.cc:49:6: error: expected initializer before 'Scanner'
   49 | impl Scanner {
      |      ^~~~~~~