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 leetcode/lc1560/code.rs from Gax-c/VeriContest_Lite: direct link, hf CLI and curl.
- Browser
- Download file 684 Bytes
-
https://huggingface.co/datasets/Gax-c/VeriContest_Lite/resolve/main/leetcode/lc1560/code.rs
- Command line
-
hf download hf://datasets/Gax-c/VeriContest_Lite/leetcode/lc1560/code.rs
-
curl -L -o code.rs https://huggingface.co/datasets/Gax-c/VeriContest_Lite/resolve/main/leetcode/lc1560/code.rs
684 Bytes
| impl Solution { | |
| pub fn most_visited(n: i32, rounds: Vec<i32>) -> Vec<i32> { | |
| let start = rounds[0]; | |
| let end_val = rounds[rounds.len() - 1]; | |
| let mut result: Vec<i32> = Vec::new(); | |
| if start <= end_val { | |
| let mut s = start; | |
| while s <= end_val { | |
| result.push(s); | |
| s = s + 1; | |
| } | |
| } else { | |
| let mut s: i32 = 1; | |
| while s <= end_val { | |
| result.push(s); | |
| s = s + 1; | |
| } | |
| s = start; | |
| while s <= n { | |
| result.push(s); | |
| s = s + 1; | |
| } | |
| } | |
| result | |
| } | |
| } | |