diff options
Diffstat (limited to 'codeforces/BanBan')
35 files changed, 75 insertions, 0 deletions
diff --git a/codeforces/BanBan/rust-solution/Cargo.lock b/codeforces/BanBan/rust-solution/Cargo.lock new file mode 100644 index 0000000..a85fd87 --- /dev/null +++ b/codeforces/BanBan/rust-solution/Cargo.lock @@ -0,0 +1,7 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 3 + +[[package]] +name = "rust-solution" +version = "0.1.0" diff --git a/codeforces/BanBan/rust-solution/Cargo.toml b/codeforces/BanBan/rust-solution/Cargo.toml new file mode 100644 index 0000000..de6deb6 --- /dev/null +++ b/codeforces/BanBan/rust-solution/Cargo.toml @@ -0,0 +1,8 @@ +[package] +name = "rust-solution" +version = "0.1.0" +edition = "2021" + +# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html + +[dependencies] diff --git a/codeforces/BanBan/rust-solution/src/main.rs b/codeforces/BanBan/rust-solution/src/main.rs new file mode 100644 index 0000000..e1c0c5c --- /dev/null +++ b/codeforces/BanBan/rust-solution/src/main.rs @@ -0,0 +1,31 @@ +fn readi64(input : &mut dyn Iterator<Item = String>) -> i64 { + input.next().unwrap().parse::<i64>().unwrap() +} + + + +fn main() { + let mut lines = std::io::stdin().lines().map(|line| line.unwrap()); + let tt = readi64(&mut lines); + for _ in 0..tt { + let n = readi64(&mut lines); + if n == 1 { + println!("{n}\n1 2\n"); + } else { + println!("{}", n - 1); + let mut v = Vec::with_capacity(n as usize); + let mut cnt = 0; + let mut i = 0; + while cnt != n - 1 && i < n { + if (3 * n - 1 - i) % 3 != 0 { + v[i as usize] = 3 * n - 1 - i; + cnt +=1; + } + i += 1; + } + for x in &v { + println!("{} {}", i * 3 + 1, x); + } + } + } +} diff --git a/codeforces/BanBan/rust-solution/target/.rustc_info.json b/codeforces/BanBan/rust-solution/target/.rustc_info.json new file mode 100644 index 0000000..7b4a303 --- /dev/null +++ b/codeforces/BanBan/rust-solution/target/.rustc_info.json @@ -0,0 +1 @@ +{"rustc_fingerprint":13623177262638950519,"outputs":{"4614504638168534921":{"success":true,"status":"","code":0,"stdout":"rustc 1.64.0 (a55dd71d5 2022-09-19)\nbinary: rustc\ncommit-hash: a55dd71d5fb0ec5a6a3a9e8c27b2127ba491ce52\ncommit-date: 2022-09-19\nhost: x86_64-unknown-linux-gnu\nrelease: 1.64.0\nLLVM version: 14.0.6\n","stderr":""},"10376369925670944939":{"success":true,"status":"","code":0,"stdout":"___\nlib___.rlib\nlib___.so\nlib___.so\nlib___.a\nlib___.so\n/home/pengu/.rustup/toolchains/stable-x86_64-unknown-linux-gnu\ndebug_assertions\npanic=\"unwind\"\nproc_macro\ntarget_arch=\"x86_64\"\ntarget_endian=\"little\"\ntarget_env=\"gnu\"\ntarget_family=\"unix\"\ntarget_feature=\"fxsr\"\ntarget_feature=\"sse\"\ntarget_feature=\"sse2\"\ntarget_has_atomic=\"16\"\ntarget_has_atomic=\"32\"\ntarget_has_atomic=\"64\"\ntarget_has_atomic=\"8\"\ntarget_has_atomic=\"ptr\"\ntarget_os=\"linux\"\ntarget_pointer_width=\"64\"\ntarget_vendor=\"unknown\"\nunix\n","stderr":""},"15697416045686424142":{"success":false,"status":"exit status: 1","code":1,"stdout":"","stderr":"error: `-Csplit-debuginfo` is unstable on this platform\n\n"}},"successes":{}}
\ No newline at end of file diff --git a/codeforces/BanBan/rust-solution/target/CACHEDIR.TAG b/codeforces/BanBan/rust-solution/target/CACHEDIR.TAG new file mode 100644 index 0000000..20d7c31 --- /dev/null +++ b/codeforces/BanBan/rust-solution/target/CACHEDIR.TAG @@ -0,0 +1,3 @@ +Signature: 8a477f597d28d172789f06886806bc55 +# This file is a cache directory tag created by cargo. +# For information about cache directory tags see https://bford.info/cachedir/ diff --git a/codeforces/BanBan/rust-solution/target/debug/.cargo-lock b/codeforces/BanBan/rust-solution/target/debug/.cargo-lock new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/codeforces/BanBan/rust-solution/target/debug/.cargo-lock diff --git a/codeforces/BanBan/rust-solution/target/debug/.fingerprint/rust-solution-562fe77d76fddac5/bin-rust-solution b/codeforces/BanBan/rust-solution/target/debug/.fingerprint/rust-solution-562fe77d76fddac5/bin-rust-solution new file mode 100644 index 0000000..0583346 --- /dev/null +++ b/codeforces/BanBan/rust-solution/target/debug/.fingerprint/rust-solution-562fe77d76fddac5/bin-rust-solution @@ -0,0 +1 @@ +fc1ddc6a46b72f83
\ No newline at end of file diff --git a/codeforces/BanBan/rust-solution/target/debug/.fingerprint/rust-solution-562fe77d76fddac5/bin-rust-solution.json b/codeforces/BanBan/rust-solution/target/debug/.fingerprint/rust-solution-562fe77d76fddac5/bin-rust-solution.json new file mode 100644 index 0000000..042bd6c --- /dev/null +++ b/codeforces/BanBan/rust-solution/target/debug/.fingerprint/rust-solution-562fe77d76fddac5/bin-rust-solution.json @@ -0,0 +1 @@ +{"rustc":11934069355019162238,"features":"[]","target":8769653080315079519,"profile":7309141686862299243,"path":1684066648322511884,"deps":[],"local":[{"CheckDepInfo":{"dep_info":"debug/.fingerprint/rust-solution-562fe77d76fddac5/dep-bin-rust-solution"}}],"rustflags":[],"metadata":7797948686568424061,"config":2202906307356721367,"compile_kind":0}
\ No newline at end of file diff --git a/codeforces/BanBan/rust-solution/target/debug/.fingerprint/rust-solution-562fe77d76fddac5/dep-bin-rust-solution b/codeforces/BanBan/rust-solution/target/debug/.fingerprint/rust-solution-562fe77d76fddac5/dep-bin-rust-solution Binary files differnew file mode 100644 index 0000000..5fdf103 --- /dev/null +++ b/codeforces/BanBan/rust-solution/target/debug/.fingerprint/rust-solution-562fe77d76fddac5/dep-bin-rust-solution diff --git a/codeforces/BanBan/rust-solution/target/debug/.fingerprint/rust-solution-562fe77d76fddac5/invoked.timestamp b/codeforces/BanBan/rust-solution/target/debug/.fingerprint/rust-solution-562fe77d76fddac5/invoked.timestamp new file mode 100644 index 0000000..e00328d --- /dev/null +++ b/codeforces/BanBan/rust-solution/target/debug/.fingerprint/rust-solution-562fe77d76fddac5/invoked.timestamp @@ -0,0 +1 @@ +This file has an mtime of when this was started.
\ No newline at end of file diff --git a/codeforces/BanBan/rust-solution/target/debug/.fingerprint/rust-solution-5d271a18ea8856ed/dep-test-bin-rust-solution b/codeforces/BanBan/rust-solution/target/debug/.fingerprint/rust-solution-5d271a18ea8856ed/dep-test-bin-rust-solution Binary files differnew file mode 100644 index 0000000..5fdf103 --- /dev/null +++ b/codeforces/BanBan/rust-solution/target/debug/.fingerprint/rust-solution-5d271a18ea8856ed/dep-test-bin-rust-solution diff --git a/codeforces/BanBan/rust-solution/target/debug/.fingerprint/rust-solution-5d271a18ea8856ed/invoked.timestamp b/codeforces/BanBan/rust-solution/target/debug/.fingerprint/rust-solution-5d271a18ea8856ed/invoked.timestamp new file mode 100644 index 0000000..e00328d --- /dev/null +++ b/codeforces/BanBan/rust-solution/target/debug/.fingerprint/rust-solution-5d271a18ea8856ed/invoked.timestamp @@ -0,0 +1 @@ +This file has an mtime of when this was started.
\ No newline at end of file diff --git a/codeforces/BanBan/rust-solution/target/debug/.fingerprint/rust-solution-5d271a18ea8856ed/test-bin-rust-solution b/codeforces/BanBan/rust-solution/target/debug/.fingerprint/rust-solution-5d271a18ea8856ed/test-bin-rust-solution new file mode 100644 index 0000000..926cf5e --- /dev/null +++ b/codeforces/BanBan/rust-solution/target/debug/.fingerprint/rust-solution-5d271a18ea8856ed/test-bin-rust-solution @@ -0,0 +1 @@ +37df94aa11f2cad3
\ No newline at end of file diff --git a/codeforces/BanBan/rust-solution/target/debug/.fingerprint/rust-solution-5d271a18ea8856ed/test-bin-rust-solution.json b/codeforces/BanBan/rust-solution/target/debug/.fingerprint/rust-solution-5d271a18ea8856ed/test-bin-rust-solution.json new file mode 100644 index 0000000..bd87b75 --- /dev/null +++ b/codeforces/BanBan/rust-solution/target/debug/.fingerprint/rust-solution-5d271a18ea8856ed/test-bin-rust-solution.json @@ -0,0 +1 @@ +{"rustc":11934069355019162238,"features":"[]","target":8769653080315079519,"profile":1021633075455700787,"path":1684066648322511884,"deps":[],"local":[{"CheckDepInfo":{"dep_info":"debug/.fingerprint/rust-solution-5d271a18ea8856ed/dep-test-bin-rust-solution"}}],"rustflags":[],"metadata":7797948686568424061,"config":2202906307356721367,"compile_kind":0}
\ No newline at end of file diff --git a/codeforces/BanBan/rust-solution/target/debug/deps/librust_solution-562fe77d76fddac5.rmeta b/codeforces/BanBan/rust-solution/target/debug/deps/librust_solution-562fe77d76fddac5.rmeta new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/codeforces/BanBan/rust-solution/target/debug/deps/librust_solution-562fe77d76fddac5.rmeta diff --git a/codeforces/BanBan/rust-solution/target/debug/deps/librust_solution-5d271a18ea8856ed.rmeta b/codeforces/BanBan/rust-solution/target/debug/deps/librust_solution-5d271a18ea8856ed.rmeta new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/codeforces/BanBan/rust-solution/target/debug/deps/librust_solution-5d271a18ea8856ed.rmeta diff --git a/codeforces/BanBan/rust-solution/target/debug/deps/rust_solution-562fe77d76fddac5.d b/codeforces/BanBan/rust-solution/target/debug/deps/rust_solution-562fe77d76fddac5.d new file mode 100644 index 0000000..e418552 --- /dev/null +++ b/codeforces/BanBan/rust-solution/target/debug/deps/rust_solution-562fe77d76fddac5.d @@ -0,0 +1,5 @@ +/home/pengu/test/problem_solving/codeforces/BanBan/rust-solution/target/debug/deps/rust_solution-562fe77d76fddac5.rmeta: src/main.rs + +/home/pengu/test/problem_solving/codeforces/BanBan/rust-solution/target/debug/deps/rust_solution-562fe77d76fddac5.d: src/main.rs + +src/main.rs: diff --git a/codeforces/BanBan/rust-solution/target/debug/deps/rust_solution-5d271a18ea8856ed.d b/codeforces/BanBan/rust-solution/target/debug/deps/rust_solution-5d271a18ea8856ed.d new file mode 100644 index 0000000..3f68b5d --- /dev/null +++ b/codeforces/BanBan/rust-solution/target/debug/deps/rust_solution-5d271a18ea8856ed.d @@ -0,0 +1,5 @@ +/home/pengu/test/problem_solving/codeforces/BanBan/rust-solution/target/debug/deps/rust_solution-5d271a18ea8856ed.rmeta: src/main.rs + +/home/pengu/test/problem_solving/codeforces/BanBan/rust-solution/target/debug/deps/rust_solution-5d271a18ea8856ed.d: src/main.rs + +src/main.rs: diff --git a/codeforces/BanBan/rust-solution/target/debug/incremental/rust_solution-12ff9ylte8hiv/s-gfbd1hocp6-3fvc5e-1uv8qdab86usd/dep-graph.bin b/codeforces/BanBan/rust-solution/target/debug/incremental/rust_solution-12ff9ylte8hiv/s-gfbd1hocp6-3fvc5e-1uv8qdab86usd/dep-graph.bin Binary files differnew file mode 100644 index 0000000..afbd1c4 --- /dev/null +++ b/codeforces/BanBan/rust-solution/target/debug/incremental/rust_solution-12ff9ylte8hiv/s-gfbd1hocp6-3fvc5e-1uv8qdab86usd/dep-graph.bin diff --git a/codeforces/BanBan/rust-solution/target/debug/incremental/rust_solution-12ff9ylte8hiv/s-gfbd1hocp6-3fvc5e-1uv8qdab86usd/query-cache.bin b/codeforces/BanBan/rust-solution/target/debug/incremental/rust_solution-12ff9ylte8hiv/s-gfbd1hocp6-3fvc5e-1uv8qdab86usd/query-cache.bin Binary files differnew file mode 100644 index 0000000..106473a --- /dev/null +++ b/codeforces/BanBan/rust-solution/target/debug/incremental/rust_solution-12ff9ylte8hiv/s-gfbd1hocp6-3fvc5e-1uv8qdab86usd/query-cache.bin diff --git a/codeforces/BanBan/rust-solution/target/debug/incremental/rust_solution-12ff9ylte8hiv/s-gfbd1hocp6-3fvc5e-1uv8qdab86usd/work-products.bin b/codeforces/BanBan/rust-solution/target/debug/incremental/rust_solution-12ff9ylte8hiv/s-gfbd1hocp6-3fvc5e-1uv8qdab86usd/work-products.bin Binary files differnew file mode 100644 index 0000000..2e8fe2d --- /dev/null +++ b/codeforces/BanBan/rust-solution/target/debug/incremental/rust_solution-12ff9ylte8hiv/s-gfbd1hocp6-3fvc5e-1uv8qdab86usd/work-products.bin diff --git a/codeforces/BanBan/rust-solution/target/debug/incremental/rust_solution-12ff9ylte8hiv/s-gfbd1hocp6-3fvc5e.lock b/codeforces/BanBan/rust-solution/target/debug/incremental/rust_solution-12ff9ylte8hiv/s-gfbd1hocp6-3fvc5e.lock new file mode 100755 index 0000000..e69de29 --- /dev/null +++ b/codeforces/BanBan/rust-solution/target/debug/incremental/rust_solution-12ff9ylte8hiv/s-gfbd1hocp6-3fvc5e.lock diff --git a/codeforces/BanBan/rust-solution/target/debug/incremental/rust_solution-3011syvpedpmm/s-gfbd1hocp6-1rkjdgp-1t6i5dkfeicva/dep-graph.bin b/codeforces/BanBan/rust-solution/target/debug/incremental/rust_solution-3011syvpedpmm/s-gfbd1hocp6-1rkjdgp-1t6i5dkfeicva/dep-graph.bin Binary files differnew file mode 100644 index 0000000..09083bd --- /dev/null +++ b/codeforces/BanBan/rust-solution/target/debug/incremental/rust_solution-3011syvpedpmm/s-gfbd1hocp6-1rkjdgp-1t6i5dkfeicva/dep-graph.bin diff --git a/codeforces/BanBan/rust-solution/target/debug/incremental/rust_solution-3011syvpedpmm/s-gfbd1hocp6-1rkjdgp-1t6i5dkfeicva/query-cache.bin b/codeforces/BanBan/rust-solution/target/debug/incremental/rust_solution-3011syvpedpmm/s-gfbd1hocp6-1rkjdgp-1t6i5dkfeicva/query-cache.bin Binary files differnew file mode 100644 index 0000000..bd1638b --- /dev/null +++ b/codeforces/BanBan/rust-solution/target/debug/incremental/rust_solution-3011syvpedpmm/s-gfbd1hocp6-1rkjdgp-1t6i5dkfeicva/query-cache.bin diff --git a/codeforces/BanBan/rust-solution/target/debug/incremental/rust_solution-3011syvpedpmm/s-gfbd1hocp6-1rkjdgp-1t6i5dkfeicva/work-products.bin b/codeforces/BanBan/rust-solution/target/debug/incremental/rust_solution-3011syvpedpmm/s-gfbd1hocp6-1rkjdgp-1t6i5dkfeicva/work-products.bin Binary files differnew file mode 100644 index 0000000..2e8fe2d --- /dev/null +++ b/codeforces/BanBan/rust-solution/target/debug/incremental/rust_solution-3011syvpedpmm/s-gfbd1hocp6-1rkjdgp-1t6i5dkfeicva/work-products.bin diff --git a/codeforces/BanBan/rust-solution/target/debug/incremental/rust_solution-3011syvpedpmm/s-gfbd1hocp6-1rkjdgp.lock b/codeforces/BanBan/rust-solution/target/debug/incremental/rust_solution-3011syvpedpmm/s-gfbd1hocp6-1rkjdgp.lock new file mode 100755 index 0000000..e69de29 --- /dev/null +++ b/codeforces/BanBan/rust-solution/target/debug/incremental/rust_solution-3011syvpedpmm/s-gfbd1hocp6-1rkjdgp.lock diff --git a/codeforces/BanBan/rust-solution/target/release/.cargo-lock b/codeforces/BanBan/rust-solution/target/release/.cargo-lock new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/codeforces/BanBan/rust-solution/target/release/.cargo-lock diff --git a/codeforces/BanBan/rust-solution/target/release/.fingerprint/rust-solution-d94e8978ea2ee23b/bin-rust-solution b/codeforces/BanBan/rust-solution/target/release/.fingerprint/rust-solution-d94e8978ea2ee23b/bin-rust-solution new file mode 100644 index 0000000..c99475c --- /dev/null +++ b/codeforces/BanBan/rust-solution/target/release/.fingerprint/rust-solution-d94e8978ea2ee23b/bin-rust-solution @@ -0,0 +1 @@ +2ef534600239ba61
\ No newline at end of file diff --git a/codeforces/BanBan/rust-solution/target/release/.fingerprint/rust-solution-d94e8978ea2ee23b/bin-rust-solution.json b/codeforces/BanBan/rust-solution/target/release/.fingerprint/rust-solution-d94e8978ea2ee23b/bin-rust-solution.json new file mode 100644 index 0000000..913b19b --- /dev/null +++ b/codeforces/BanBan/rust-solution/target/release/.fingerprint/rust-solution-d94e8978ea2ee23b/bin-rust-solution.json @@ -0,0 +1 @@ +{"rustc":11934069355019162238,"features":"[]","target":8769653080315079519,"profile":6269190295429226618,"path":1684066648322511884,"deps":[],"local":[{"CheckDepInfo":{"dep_info":"release/.fingerprint/rust-solution-d94e8978ea2ee23b/dep-bin-rust-solution"}}],"rustflags":[],"metadata":7797948686568424061,"config":2202906307356721367,"compile_kind":0}
\ No newline at end of file diff --git a/codeforces/BanBan/rust-solution/target/release/.fingerprint/rust-solution-d94e8978ea2ee23b/dep-bin-rust-solution b/codeforces/BanBan/rust-solution/target/release/.fingerprint/rust-solution-d94e8978ea2ee23b/dep-bin-rust-solution Binary files differnew file mode 100644 index 0000000..5fdf103 --- /dev/null +++ b/codeforces/BanBan/rust-solution/target/release/.fingerprint/rust-solution-d94e8978ea2ee23b/dep-bin-rust-solution diff --git a/codeforces/BanBan/rust-solution/target/release/.fingerprint/rust-solution-d94e8978ea2ee23b/invoked.timestamp b/codeforces/BanBan/rust-solution/target/release/.fingerprint/rust-solution-d94e8978ea2ee23b/invoked.timestamp new file mode 100644 index 0000000..e00328d --- /dev/null +++ b/codeforces/BanBan/rust-solution/target/release/.fingerprint/rust-solution-d94e8978ea2ee23b/invoked.timestamp @@ -0,0 +1 @@ +This file has an mtime of when this was started.
\ No newline at end of file diff --git a/codeforces/BanBan/rust-solution/target/release/deps/rust_solution-d94e8978ea2ee23b b/codeforces/BanBan/rust-solution/target/release/deps/rust_solution-d94e8978ea2ee23b Binary files differnew file mode 100755 index 0000000..5631a93 --- /dev/null +++ b/codeforces/BanBan/rust-solution/target/release/deps/rust_solution-d94e8978ea2ee23b diff --git a/codeforces/BanBan/rust-solution/target/release/deps/rust_solution-d94e8978ea2ee23b.d b/codeforces/BanBan/rust-solution/target/release/deps/rust_solution-d94e8978ea2ee23b.d new file mode 100644 index 0000000..59bce1f --- /dev/null +++ b/codeforces/BanBan/rust-solution/target/release/deps/rust_solution-d94e8978ea2ee23b.d @@ -0,0 +1,5 @@ +/home/pengu/test/problem_solving/codeforces/BanBan/rust-solution/target/release/deps/rust_solution-d94e8978ea2ee23b: src/main.rs + +/home/pengu/test/problem_solving/codeforces/BanBan/rust-solution/target/release/deps/rust_solution-d94e8978ea2ee23b.d: src/main.rs + +src/main.rs: diff --git a/codeforces/BanBan/rust-solution/target/release/rust-solution b/codeforces/BanBan/rust-solution/target/release/rust-solution Binary files differnew file mode 100755 index 0000000..5631a93 --- /dev/null +++ b/codeforces/BanBan/rust-solution/target/release/rust-solution diff --git a/codeforces/BanBan/rust-solution/target/release/rust-solution.d b/codeforces/BanBan/rust-solution/target/release/rust-solution.d new file mode 100644 index 0000000..156ff7b --- /dev/null +++ b/codeforces/BanBan/rust-solution/target/release/rust-solution.d @@ -0,0 +1 @@ +/home/pengu/test/problem_solving/codeforces/BanBan/rust-solution/target/release/rust-solution: /home/pengu/test/problem_solving/codeforces/BanBan/rust-solution/src/main.rs |
