https://github.com/stepfenshawn/codeforces-rust
A simple Rust template used in codeforces!
https://github.com/stepfenshawn/codeforces-rust
Last synced: about 1 year ago
JSON representation
A simple Rust template used in codeforces!
- Host: GitHub
- URL: https://github.com/stepfenshawn/codeforces-rust
- Owner: StepfenShawn
- License: mit
- Created: 2023-07-15T06:18:35.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2025-01-12T07:52:40.000Z (over 1 year ago)
- Last Synced: 2025-01-29T08:11:52.924Z (over 1 year ago)
- Language: Rust
- Homepage:
- Size: 27.3 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# How to use?
Initialize it:
```rust
io_init!(scan, _out);
```
Read by spliting whitespace:
```rust
read!(scan, t => i32, mut n => i32, ...);
```
Read by lines (for String):
```rust
let s = scan.next_line();
```
Read an array with size of `n`:
```rust
let a: Vec<_> = (0..n).map(|_| scan.next::()).collect();
```
# More?
* [SparseTable(ST)](./ST.rs)