Datasets:
Tasks:
Text Generation
Modalities:
Text
Formats:
json
Languages:
English
Size:
< 1K
ArXiv:
Tags:
competitive-programming
code-generation
specification-generation
proof-generation
verification
rust
License:
Download codeforces/cf1A/code_spec.rs from Gax-c/VeriContest_Lite: direct link, hf CLI and curl.
- Browser
- Download file 569 Bytes
-
https://huggingface.co/datasets/Gax-c/VeriContest_Lite/resolve/main/codeforces/cf1A/code_spec.rs
- Command line
-
hf download hf://datasets/Gax-c/VeriContest_Lite/codeforces/cf1A/code_spec.rs
-
curl -L -o code_spec.rs https://huggingface.co/datasets/Gax-c/VeriContest_Lite/resolve/main/codeforces/cf1A/code_spec.rs
569 Bytes
| use vstd::prelude::*; | |
| fn main() {} | |
| verus! { | |
| pub struct Solution; | |
| pub open spec fn ceil_div(n: int, a: int) -> int { | |
| (n + a - 1) / a | |
| } | |
| impl Solution { | |
| pub fn min_flagstones(n: u64, m: u64, a: u64) -> (result: u64) | |
| requires | |
| 1 <= n <= 1_000_000_000, | |
| 1 <= m <= 1_000_000_000, | |
| 1 <= a <= 1_000_000_000, | |
| ensures | |
| result as int == ceil_div(n as int, a as int) * ceil_div(m as int, a as int), | |
| { | |
| let rows = (n + a - 1) / a; | |
| let cols = (m + a - 1) / a; | |
| rows * cols | |
| } | |
| } | |
| } | |