From 65cbc4732866264a930f30d948f7258f6dde7497 Mon Sep 17 00:00:00 2001 From: omagdy7 Date: Mon, 14 Nov 2022 12:16:09 +0200 Subject: Added new problems --- LinearKeyboard/main | Bin 0 -> 48944 bytes LinearKeyboard/main.cpp | 60 ++++++++++++++++++ LinearKeyboard/main_input0.txt | 11 ++++ LinearKeyboard/main_output0.txt | 5 ++ TheUltimateSquare/main | Bin 0 -> 22704 bytes TheUltimateSquare/main.cpp | 53 ++++++++++++++++ TheUltimateSquare/main_input0.txt | 4 ++ TheUltimateSquare/main_output0.txt | 3 + codeforces/AmusingJoke/main | Bin 0 -> 39216 bytes codeforces/AmusingJoke/main.cpp | 57 ++++++++++++++++++ codeforces/AmusingJoke/main_input0.txt | 3 + codeforces/AmusingJoke/main_input1.txt | 3 + codeforces/AmusingJoke/main_input2.txt | 3 + codeforces/AmusingJoke/main_output0.txt | 1 + codeforces/AmusingJoke/main_output1.txt | 1 + codeforces/AmusingJoke/main_output2.txt | 1 + codeforces/BanBan/rust-solution/Cargo.lock | 7 +++ codeforces/BanBan/rust-solution/Cargo.toml | 8 +++ codeforces/BanBan/rust-solution/src/main.rs | 31 ++++++++++ .../BanBan/rust-solution/target/.rustc_info.json | 1 + .../BanBan/rust-solution/target/CACHEDIR.TAG | 3 + .../BanBan/rust-solution/target/debug/.cargo-lock | 0 .../bin-rust-solution | 1 + .../bin-rust-solution.json | 1 + .../dep-bin-rust-solution | Bin 0 -> 24 bytes .../invoked.timestamp | 1 + .../dep-test-bin-rust-solution | Bin 0 -> 24 bytes .../invoked.timestamp | 1 + .../test-bin-rust-solution | 1 + .../test-bin-rust-solution.json | 1 + .../deps/librust_solution-562fe77d76fddac5.rmeta | 0 .../deps/librust_solution-5d271a18ea8856ed.rmeta | 0 .../debug/deps/rust_solution-562fe77d76fddac5.d | 5 ++ .../debug/deps/rust_solution-5d271a18ea8856ed.d | 5 ++ .../dep-graph.bin | Bin 0 -> 267753 bytes .../query-cache.bin | Bin 0 -> 29819 bytes .../work-products.bin | Bin 0 -> 37 bytes .../s-gfbd1hocp6-3fvc5e.lock | 0 .../dep-graph.bin | Bin 0 -> 279700 bytes .../query-cache.bin | Bin 0 -> 30977 bytes .../work-products.bin | Bin 0 -> 37 bytes .../s-gfbd1hocp6-1rkjdgp.lock | 0 .../rust-solution/target/release/.cargo-lock | 0 .../bin-rust-solution | 1 + .../bin-rust-solution.json | 1 + .../dep-bin-rust-solution | Bin 0 -> 24 bytes .../invoked.timestamp | 1 + .../release/deps/rust_solution-d94e8978ea2ee23b | Bin 0 -> 3897936 bytes .../release/deps/rust_solution-d94e8978ea2ee23b.d | 5 ++ .../rust-solution/target/release/rust-solution | Bin 0 -> 3897936 bytes .../rust-solution/target/release/rust-solution.d | 1 + codeforces/DiverseSubStrings/main | Bin 0 -> 44672 bytes codeforces/DiverseSubStrings/main.cpp | 66 ++++++++++++++++++++ codeforces/DiverseSubStrings/main_input0.txt | 15 +++++ codeforces/DiverseSubStrings/main_output0.txt | 7 +++ codeforces/Increasing/main | Bin 0 -> 58936 bytes codeforces/Increasing/main.cpp | 59 ++++++++++++++++++ codeforces/Increasing/main_input0.txt | 7 +++ codeforces/Increasing/main_output0.txt | 3 + codeforces/MakeAEqualToB/main | Bin 0 -> 27432 bytes codeforces/MakeAEqualToB/main.cpp | 67 +++++++++++++++++++++ codeforces/MakeAEqualToB/main_input0.txt | 16 +++++ codeforces/MakeAEqualToB/main_output0.txt | 5 ++ codeforces/Password/main | Bin 0 -> 22704 bytes codeforces/Password/main.cpp | 52 ++++++++++++++++ codeforces/Password/main_input0.txt | 5 ++ codeforces/Password/main_output0.txt | 2 + codeforces/Stripes/main.cpp | 47 +++++++++++++++ codeforces/Sum/main | Bin 0 -> 27480 bytes codeforces/Sum/main.cpp | 54 +++++++++++++++++ codeforces/Sum/main_input0.txt | 8 +++ codeforces/Sum/main_output0.txt | 7 +++ codeforces/TechnicalSupport/main | Bin 0 -> 24096 bytes codeforces/TechnicalSupport/main.cpp | 58 ++++++++++++++++++ codeforces/TechnicalSupport/main_input0.txt | 11 ++++ codeforces/TechnicalSupport/main_output0.txt | 5 ++ 76 files changed, 774 insertions(+) create mode 100755 LinearKeyboard/main create mode 100644 LinearKeyboard/main.cpp create mode 100644 LinearKeyboard/main_input0.txt create mode 100644 LinearKeyboard/main_output0.txt create mode 100755 TheUltimateSquare/main create mode 100644 TheUltimateSquare/main.cpp create mode 100644 TheUltimateSquare/main_input0.txt create mode 100644 TheUltimateSquare/main_output0.txt create mode 100755 codeforces/AmusingJoke/main create mode 100644 codeforces/AmusingJoke/main.cpp create mode 100644 codeforces/AmusingJoke/main_input0.txt create mode 100644 codeforces/AmusingJoke/main_input1.txt create mode 100644 codeforces/AmusingJoke/main_input2.txt create mode 100644 codeforces/AmusingJoke/main_output0.txt create mode 100644 codeforces/AmusingJoke/main_output1.txt create mode 100644 codeforces/AmusingJoke/main_output2.txt create mode 100644 codeforces/BanBan/rust-solution/Cargo.lock create mode 100644 codeforces/BanBan/rust-solution/Cargo.toml create mode 100644 codeforces/BanBan/rust-solution/src/main.rs create mode 100644 codeforces/BanBan/rust-solution/target/.rustc_info.json create mode 100644 codeforces/BanBan/rust-solution/target/CACHEDIR.TAG create mode 100644 codeforces/BanBan/rust-solution/target/debug/.cargo-lock create mode 100644 codeforces/BanBan/rust-solution/target/debug/.fingerprint/rust-solution-562fe77d76fddac5/bin-rust-solution create mode 100644 codeforces/BanBan/rust-solution/target/debug/.fingerprint/rust-solution-562fe77d76fddac5/bin-rust-solution.json create mode 100644 codeforces/BanBan/rust-solution/target/debug/.fingerprint/rust-solution-562fe77d76fddac5/dep-bin-rust-solution create mode 100644 codeforces/BanBan/rust-solution/target/debug/.fingerprint/rust-solution-562fe77d76fddac5/invoked.timestamp create mode 100644 codeforces/BanBan/rust-solution/target/debug/.fingerprint/rust-solution-5d271a18ea8856ed/dep-test-bin-rust-solution create mode 100644 codeforces/BanBan/rust-solution/target/debug/.fingerprint/rust-solution-5d271a18ea8856ed/invoked.timestamp create mode 100644 codeforces/BanBan/rust-solution/target/debug/.fingerprint/rust-solution-5d271a18ea8856ed/test-bin-rust-solution create mode 100644 codeforces/BanBan/rust-solution/target/debug/.fingerprint/rust-solution-5d271a18ea8856ed/test-bin-rust-solution.json create mode 100644 codeforces/BanBan/rust-solution/target/debug/deps/librust_solution-562fe77d76fddac5.rmeta create mode 100644 codeforces/BanBan/rust-solution/target/debug/deps/librust_solution-5d271a18ea8856ed.rmeta create mode 100644 codeforces/BanBan/rust-solution/target/debug/deps/rust_solution-562fe77d76fddac5.d create mode 100644 codeforces/BanBan/rust-solution/target/debug/deps/rust_solution-5d271a18ea8856ed.d create mode 100644 codeforces/BanBan/rust-solution/target/debug/incremental/rust_solution-12ff9ylte8hiv/s-gfbd1hocp6-3fvc5e-1uv8qdab86usd/dep-graph.bin create mode 100644 codeforces/BanBan/rust-solution/target/debug/incremental/rust_solution-12ff9ylte8hiv/s-gfbd1hocp6-3fvc5e-1uv8qdab86usd/query-cache.bin create mode 100644 codeforces/BanBan/rust-solution/target/debug/incremental/rust_solution-12ff9ylte8hiv/s-gfbd1hocp6-3fvc5e-1uv8qdab86usd/work-products.bin create mode 100755 codeforces/BanBan/rust-solution/target/debug/incremental/rust_solution-12ff9ylte8hiv/s-gfbd1hocp6-3fvc5e.lock create mode 100644 codeforces/BanBan/rust-solution/target/debug/incremental/rust_solution-3011syvpedpmm/s-gfbd1hocp6-1rkjdgp-1t6i5dkfeicva/dep-graph.bin create mode 100644 codeforces/BanBan/rust-solution/target/debug/incremental/rust_solution-3011syvpedpmm/s-gfbd1hocp6-1rkjdgp-1t6i5dkfeicva/query-cache.bin create mode 100644 codeforces/BanBan/rust-solution/target/debug/incremental/rust_solution-3011syvpedpmm/s-gfbd1hocp6-1rkjdgp-1t6i5dkfeicva/work-products.bin create mode 100755 codeforces/BanBan/rust-solution/target/debug/incremental/rust_solution-3011syvpedpmm/s-gfbd1hocp6-1rkjdgp.lock create mode 100644 codeforces/BanBan/rust-solution/target/release/.cargo-lock create mode 100644 codeforces/BanBan/rust-solution/target/release/.fingerprint/rust-solution-d94e8978ea2ee23b/bin-rust-solution create mode 100644 codeforces/BanBan/rust-solution/target/release/.fingerprint/rust-solution-d94e8978ea2ee23b/bin-rust-solution.json create mode 100644 codeforces/BanBan/rust-solution/target/release/.fingerprint/rust-solution-d94e8978ea2ee23b/dep-bin-rust-solution create mode 100644 codeforces/BanBan/rust-solution/target/release/.fingerprint/rust-solution-d94e8978ea2ee23b/invoked.timestamp create mode 100755 codeforces/BanBan/rust-solution/target/release/deps/rust_solution-d94e8978ea2ee23b create mode 100644 codeforces/BanBan/rust-solution/target/release/deps/rust_solution-d94e8978ea2ee23b.d create mode 100755 codeforces/BanBan/rust-solution/target/release/rust-solution create mode 100644 codeforces/BanBan/rust-solution/target/release/rust-solution.d create mode 100755 codeforces/DiverseSubStrings/main create mode 100644 codeforces/DiverseSubStrings/main.cpp create mode 100644 codeforces/DiverseSubStrings/main_input0.txt create mode 100644 codeforces/DiverseSubStrings/main_output0.txt create mode 100755 codeforces/Increasing/main create mode 100644 codeforces/Increasing/main.cpp create mode 100644 codeforces/Increasing/main_input0.txt create mode 100644 codeforces/Increasing/main_output0.txt create mode 100755 codeforces/MakeAEqualToB/main create mode 100644 codeforces/MakeAEqualToB/main.cpp create mode 100644 codeforces/MakeAEqualToB/main_input0.txt create mode 100644 codeforces/MakeAEqualToB/main_output0.txt create mode 100755 codeforces/Password/main create mode 100644 codeforces/Password/main.cpp create mode 100644 codeforces/Password/main_input0.txt create mode 100644 codeforces/Password/main_output0.txt create mode 100644 codeforces/Stripes/main.cpp create mode 100755 codeforces/Sum/main create mode 100644 codeforces/Sum/main.cpp create mode 100644 codeforces/Sum/main_input0.txt create mode 100644 codeforces/Sum/main_output0.txt create mode 100755 codeforces/TechnicalSupport/main create mode 100644 codeforces/TechnicalSupport/main.cpp create mode 100644 codeforces/TechnicalSupport/main_input0.txt create mode 100644 codeforces/TechnicalSupport/main_output0.txt diff --git a/LinearKeyboard/main b/LinearKeyboard/main new file mode 100755 index 0000000..322a82d Binary files /dev/null and b/LinearKeyboard/main differ diff --git a/LinearKeyboard/main.cpp b/LinearKeyboard/main.cpp new file mode 100644 index 0000000..96ac0d4 --- /dev/null +++ b/LinearKeyboard/main.cpp @@ -0,0 +1,60 @@ +#include + +using namespace std; + +using ll = long long; +using pi = pair; +using vpi = vector; +using vi = vector; +using vll = vector; +using mpii = map; +using mpll = map; +using db = long double; + +#define push_back pb +#define all(x) (x).begin(), (x).end() +#define rall(x) (x).rbegin(), (x).rend() +#define lb lower_bound +#define ub upper_bound + +const int MOD = (int)1e9 + 7; +const db PI = acos((db)-1); +const int dx[4]{1, 0, -1, 0}; +const int dy[4]{0, 1, 0, -1}; + +void solve() { + string alphabet, word; + cin >> alphabet; + cin >> word; + map mp; + int ans = 0; + for (int i = 0; i < alphabet.size(); i++) { + mp[alphabet[i]] = i + 1; + } + for (auto [key, val] : mp) { + cerr << (char)key << " : " << val << '\n'; + } + for (int i = 1; i < word.size(); i++) { + ans += abs(mp[word[i]] - mp[word[i - 1]]); + } + cout << ans << '\n'; +} + +int main () { + ios_base::sync_with_stdio(false); + cin.tie(NULL); + int tt; + cin >> tt; + while(tt--) { + solve(); + } +} + +/* stuff you should look for: + --------------------------- + * special cases (n=1?) + * int overflow, array bounds + * do smth instead of nothing and stay organized + * WRITE STUFF DOWN + * DON'T GET STUCK ON ONE APPROACH + */ diff --git a/LinearKeyboard/main_input0.txt b/LinearKeyboard/main_input0.txt new file mode 100644 index 0000000..ec6d524 --- /dev/null +++ b/LinearKeyboard/main_input0.txt @@ -0,0 +1,11 @@ +5 +abcdefghijklmnopqrstuvwxyz +hello +abcdefghijklmnopqrstuvwxyz +i +abcdefghijklmnopqrstuvwxyz +codeforces +qwertyuiopasdfghjklzxcvbnm +qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq +qwertyuiopasdfghjklzxcvbnm +abacaba diff --git a/LinearKeyboard/main_output0.txt b/LinearKeyboard/main_output0.txt new file mode 100644 index 0000000..c0a2149 --- /dev/null +++ b/LinearKeyboard/main_output0.txt @@ -0,0 +1,5 @@ +13 +0 +68 +0 +74 diff --git a/TheUltimateSquare/main b/TheUltimateSquare/main new file mode 100755 index 0000000..81afd64 Binary files /dev/null and b/TheUltimateSquare/main differ diff --git a/TheUltimateSquare/main.cpp b/TheUltimateSquare/main.cpp new file mode 100644 index 0000000..102880d --- /dev/null +++ b/TheUltimateSquare/main.cpp @@ -0,0 +1,53 @@ +#include + +using namespace std; + +using ll = long long; +using pi = pair; +using vpi = vector; +using vi = vector; +using vll = vector; +using mpii = map; +using mpll = map; +using db = long double; + +#define push_back pb +#define all(x) (x).begin(), (x).end() +#define rall(x) (x).rbegin(), (x).rend() +#define lb lower_bound +#define ub upper_bound + +const int MOD = (int)1e9 + 7; +const db PI = acos((db)-1); +const int dx[4]{1, 0, -1, 0}; +const int dy[4]{0, 1, 0, -1}; + +void solve() { + int n; + cin >> n; + if (n & 1) { + cout << (n / 2) + 1 << '\n'; + } else { + cout << n / 2 << '\n'; + } + +} + +int main () { + ios_base::sync_with_stdio(false); + cin.tie(NULL); + int tt; + cin >> tt; + while(tt--) { + solve(); + } +} + +/* stuff you should look for: + --------------------------- + * special cases (n=1?) + * int overflow, array bounds + * do smth instead of nothing and stay organized + * WRITE STUFF DOWN + * DON'T GET STUCK ON ONE APPROACH + */ diff --git a/TheUltimateSquare/main_input0.txt b/TheUltimateSquare/main_input0.txt new file mode 100644 index 0000000..650d174 --- /dev/null +++ b/TheUltimateSquare/main_input0.txt @@ -0,0 +1,4 @@ +3 +2 +5 +197654321 diff --git a/TheUltimateSquare/main_output0.txt b/TheUltimateSquare/main_output0.txt new file mode 100644 index 0000000..773b55e --- /dev/null +++ b/TheUltimateSquare/main_output0.txt @@ -0,0 +1,3 @@ +1 +3 +98827161 diff --git a/codeforces/AmusingJoke/main b/codeforces/AmusingJoke/main new file mode 100755 index 0000000..df6c17d Binary files /dev/null and b/codeforces/AmusingJoke/main differ diff --git a/codeforces/AmusingJoke/main.cpp b/codeforces/AmusingJoke/main.cpp new file mode 100644 index 0000000..3dd0fac --- /dev/null +++ b/codeforces/AmusingJoke/main.cpp @@ -0,0 +1,57 @@ +#include + +using namespace std; + +using ll = long long; +using pi = pair; +using vpi = vector; +using vi = vector; +using vll = vector; +using mpii = map; +using mpll = map; +using db = long double; + +#define push_back pb +#define all(x) (x).begin(), (x).end() +#define rall(x) (x).rbegin(), (x).rend() +#define lb lower_bound +#define ub upper_bound + +const int MOD = (int)1e9 + 7; +const db PI = acos((db)-1); +const int dx[4]{1, 0, -1, 0}; +const int dy[4]{0, 1, 0, -1}; + +string solve() { + vi fq1(28), fq2(28); + string s1, s2, s3; + cin >> s1 >> s2 >> s3; + s1 += s2; + for (auto ch : s1) { + fq1[ch - 'A']++; + } + for (auto ch : s3) { + fq2[ch - 'A']++; + } + for (int i = 0; i < 28; i++) { + if (fq1[i] != fq2[i]) { + return "NO"; + } + } + return "YES"; +} + +int main () { + ios_base::sync_with_stdio(false); + cin.tie(NULL); + cout << solve() << '\n'; +} + +/* stuff you should look for: + --------------------------- + * special cases (n=1?) + * int overflow, array bounds + * do smth instead of nothing and stay organized + * WRITE STUFF DOWN + * DON'T GET STUCK ON ONE APPROACH + */ diff --git a/codeforces/AmusingJoke/main_input0.txt b/codeforces/AmusingJoke/main_input0.txt new file mode 100644 index 0000000..40a66fa --- /dev/null +++ b/codeforces/AmusingJoke/main_input0.txt @@ -0,0 +1,3 @@ +SANTACLAUS +DEDMOROZ +SANTAMOROZDEDCLAUS diff --git a/codeforces/AmusingJoke/main_input1.txt b/codeforces/AmusingJoke/main_input1.txt new file mode 100644 index 0000000..72b3b1a --- /dev/null +++ b/codeforces/AmusingJoke/main_input1.txt @@ -0,0 +1,3 @@ +PAPAINOEL +JOULUPUKKI +JOULNAPAOILELUPUKKI diff --git a/codeforces/AmusingJoke/main_input2.txt b/codeforces/AmusingJoke/main_input2.txt new file mode 100644 index 0000000..07f64f4 --- /dev/null +++ b/codeforces/AmusingJoke/main_input2.txt @@ -0,0 +1,3 @@ +BABBONATALE +FATHERCHRISTMAS +BABCHRISTMASBONATALLEFATHER diff --git a/codeforces/AmusingJoke/main_output0.txt b/codeforces/AmusingJoke/main_output0.txt new file mode 100644 index 0000000..f033a50 --- /dev/null +++ b/codeforces/AmusingJoke/main_output0.txt @@ -0,0 +1 @@ +YES diff --git a/codeforces/AmusingJoke/main_output1.txt b/codeforces/AmusingJoke/main_output1.txt new file mode 100644 index 0000000..5e35d1b --- /dev/null +++ b/codeforces/AmusingJoke/main_output1.txt @@ -0,0 +1 @@ +NO diff --git a/codeforces/AmusingJoke/main_output2.txt b/codeforces/AmusingJoke/main_output2.txt new file mode 100644 index 0000000..5e35d1b --- /dev/null +++ b/codeforces/AmusingJoke/main_output2.txt @@ -0,0 +1 @@ +NO 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) -> i64 { + input.next().unwrap().parse::().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 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 new file mode 100644 index 0000000..5fdf103 Binary files /dev/null and b/codeforces/BanBan/rust-solution/target/debug/.fingerprint/rust-solution-562fe77d76fddac5/dep-bin-rust-solution differ 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 new file mode 100644 index 0000000..5fdf103 Binary files /dev/null and b/codeforces/BanBan/rust-solution/target/debug/.fingerprint/rust-solution-5d271a18ea8856ed/dep-test-bin-rust-solution differ 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 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 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 new file mode 100644 index 0000000..afbd1c4 Binary files /dev/null and b/codeforces/BanBan/rust-solution/target/debug/incremental/rust_solution-12ff9ylte8hiv/s-gfbd1hocp6-3fvc5e-1uv8qdab86usd/dep-graph.bin differ 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 new file mode 100644 index 0000000..106473a Binary files /dev/null and b/codeforces/BanBan/rust-solution/target/debug/incremental/rust_solution-12ff9ylte8hiv/s-gfbd1hocp6-3fvc5e-1uv8qdab86usd/query-cache.bin differ 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 new file mode 100644 index 0000000..2e8fe2d Binary files /dev/null and b/codeforces/BanBan/rust-solution/target/debug/incremental/rust_solution-12ff9ylte8hiv/s-gfbd1hocp6-3fvc5e-1uv8qdab86usd/work-products.bin differ 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 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 new file mode 100644 index 0000000..09083bd Binary files /dev/null and b/codeforces/BanBan/rust-solution/target/debug/incremental/rust_solution-3011syvpedpmm/s-gfbd1hocp6-1rkjdgp-1t6i5dkfeicva/dep-graph.bin differ 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 new file mode 100644 index 0000000..bd1638b Binary files /dev/null and b/codeforces/BanBan/rust-solution/target/debug/incremental/rust_solution-3011syvpedpmm/s-gfbd1hocp6-1rkjdgp-1t6i5dkfeicva/query-cache.bin differ 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 new file mode 100644 index 0000000..2e8fe2d Binary files /dev/null and b/codeforces/BanBan/rust-solution/target/debug/incremental/rust_solution-3011syvpedpmm/s-gfbd1hocp6-1rkjdgp-1t6i5dkfeicva/work-products.bin differ 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 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 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 new file mode 100644 index 0000000..5fdf103 Binary files /dev/null and b/codeforces/BanBan/rust-solution/target/release/.fingerprint/rust-solution-d94e8978ea2ee23b/dep-bin-rust-solution differ 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 new file mode 100755 index 0000000..5631a93 Binary files /dev/null and b/codeforces/BanBan/rust-solution/target/release/deps/rust_solution-d94e8978ea2ee23b differ 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 new file mode 100755 index 0000000..5631a93 Binary files /dev/null and b/codeforces/BanBan/rust-solution/target/release/rust-solution differ 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 diff --git a/codeforces/DiverseSubStrings/main b/codeforces/DiverseSubStrings/main new file mode 100755 index 0000000..90f8e78 Binary files /dev/null and b/codeforces/DiverseSubStrings/main differ diff --git a/codeforces/DiverseSubStrings/main.cpp b/codeforces/DiverseSubStrings/main.cpp new file mode 100644 index 0000000..1e6fbf9 --- /dev/null +++ b/codeforces/DiverseSubStrings/main.cpp @@ -0,0 +1,66 @@ +#include + +using namespace std; + +using ll = long long; +using pi = pair; +using vpi = vector; +using vi = vector; +using vll = vector; +using mpii = map; +using mpll = map; +using db = long double; + +#define push_back pb +#define all(x) (x).begin(), (x).end() +#define rall(x) (x).rbegin(), (x).rend() +#define lb lower_bound +#define ub upper_bound + +const int MOD = (int)1e9 + 7; +const db PI = acos((db)-1); +const int dx[4]{1, 0, -1, 0}; +const int dy[4]{0, 1, 0, -1}; + +void solve() { + int n; + cin >> n; + string s; cin >> s; + set st; + vi v(11); + int cnt = 0; + for (int i = 0; i < n; i++) { + for (int j = i; j < i; j++) { + for (int k = j + 1; k < j - 1; k++) { + st.insert(s[k]); + v[s[k] - '0']++; + if(*max_element(all(v)) <= st.size()) { + cnt++; + } + } + st.clear(); + v.clear(); + } + } + cout << cnt << endl; + +} + +int main () { + ios_base::sync_with_stdio(false); + cin.tie(NULL); + int tt; + cin >> tt; + while(tt--) { + solve(); + } +} + +/* stuff you should look for: + --------------------------- + * special cases (n=1?) + * int overflow, array bounds + * do smth instead of nothing and stay organized + * WRITE STUFF DOWN + * DON'T GET STUCK ON ONE APPROACH + */ diff --git a/codeforces/DiverseSubStrings/main_input0.txt b/codeforces/DiverseSubStrings/main_input0.txt new file mode 100644 index 0000000..0df0884 --- /dev/null +++ b/codeforces/DiverseSubStrings/main_input0.txt @@ -0,0 +1,15 @@ +7 +1 +7 +2 +77 +4 +1010 +5 +01100 +6 +399996 +5 +23456 +18 +789987887987998798 diff --git a/codeforces/DiverseSubStrings/main_output0.txt b/codeforces/DiverseSubStrings/main_output0.txt new file mode 100644 index 0000000..f5bd615 --- /dev/null +++ b/codeforces/DiverseSubStrings/main_output0.txt @@ -0,0 +1,7 @@ +1 +2 +10 +12 +10 +15 +106 diff --git a/codeforces/Increasing/main b/codeforces/Increasing/main new file mode 100755 index 0000000..b880675 Binary files /dev/null and b/codeforces/Increasing/main differ diff --git a/codeforces/Increasing/main.cpp b/codeforces/Increasing/main.cpp new file mode 100644 index 0000000..f2bf814 --- /dev/null +++ b/codeforces/Increasing/main.cpp @@ -0,0 +1,59 @@ +#include + +using namespace std; + +using ll = long long; +using pi = pair; +using vpi = vector; +using vi = vector; +using vll = vector; +using mpii = map; +using mpll = map; +using db = long double; + +#define push_back pb +#define all(x) (x).begin(), (x).end() +#define rall(x) (x).rbegin(), (x).rend() +#define lb lower_bound +#define ub upper_bound + +const int MOD = (int)1e9 + 7; +const db PI = acos((db)-1); +const int dx[4]{1, 0, -1, 0}; +const int dy[4]{0, 1, 0, -1}; + +string solve() { + int n; + cin >> n; + vi v(n); + mpii mp; + for (auto &x : v) cin >> x; + for (auto x : v) { + mp[x]++; + } + for (auto x : v) { + if (mp[x] > 1) { + return "NO"; + } + } + return "YES"; +} + +int main () { + ios_base::sync_with_stdio(false); + cin.tie(NULL); + int tt; + cin >> tt; + while(tt--) { + cout << solve() << '\n'; + } +} + +/* stuff you should look for: + --------------------------- + * special cases (n=1?) + * int overflow, array bounds + * do smth instead of nothing and stay organized + * WRITE STUFF DOWN + * DON'T GET STUCK ON ONE APPROACH + */ diff --git a/codeforces/Increasing/main_input0.txt b/codeforces/Increasing/main_input0.txt new file mode 100644 index 0000000..50804bb --- /dev/null +++ b/codeforces/Increasing/main_input0.txt @@ -0,0 +1,7 @@ +3 +4 +1 1 1 1 +5 +8 7 1 3 4 +1 +5 diff --git a/codeforces/Increasing/main_output0.txt b/codeforces/Increasing/main_output0.txt new file mode 100644 index 0000000..5158019 --- /dev/null +++ b/codeforces/Increasing/main_output0.txt @@ -0,0 +1,3 @@ +NO +YES +YES diff --git a/codeforces/MakeAEqualToB/main b/codeforces/MakeAEqualToB/main new file mode 100755 index 0000000..0cedbdd Binary files /dev/null and b/codeforces/MakeAEqualToB/main differ diff --git a/codeforces/MakeAEqualToB/main.cpp b/codeforces/MakeAEqualToB/main.cpp new file mode 100644 index 0000000..b09768f --- /dev/null +++ b/codeforces/MakeAEqualToB/main.cpp @@ -0,0 +1,67 @@ +#include + +using namespace std; + +using ll = long long; +using pi = pair; +using vpi = vector; +using vi = vector; +using vll = vector; +using mpii = map; +using mpll = map; +using db = long double; + +#define push_back pb +#define all(x) (x).begin(), (x).end() +#define rall(x) (x).rbegin(), (x).rend() +#define lb lower_bound +#define ub upper_bound + +const int MOD = (int)1e9 + 7; +const db PI = acos((db)-1); +const int dx[4]{1, 0, -1, 0}; +const int dy[4]{0, 1, 0, -1}; + +bool isSame(vi v1, vi v2) { + for (int i = 0; i < v1.size(); i++) { + if (v1[i] != v2[i]) { + return false; + } + } + return true; +} + +void solve() { + int n; + cin >> n; + vi a(n); + vi b(n); + for (auto &x : a) cin >> x; + for (auto &x : b) cin >> x; + int za = 0; + int zb = 0; + for (int i = 0; i < n; i++) { + za += a[i] == 0; + zb += b[i] == 0; + } + int ans = 0; +} + +int main () { + ios_base::sync_with_stdio(false); + cin.tie(NULL); + int tt; + cin >> tt; + while(tt--) { + solve(); + } +} + +/* stuff you should look for: + --------------------------- + * special cases (n=1?) + * int overflow, array bounds + * do smth instead of nothing and stay organized + * WRITE STUFF DOWN + * DON'T GET STUCK ON ONE APPROACH + */ diff --git a/codeforces/MakeAEqualToB/main_input0.txt b/codeforces/MakeAEqualToB/main_input0.txt new file mode 100644 index 0000000..8f5ba93 --- /dev/null +++ b/codeforces/MakeAEqualToB/main_input0.txt @@ -0,0 +1,16 @@ +5 +3 +1 0 1 +0 0 1 +4 +1 1 0 0 +0 1 1 1 +2 +1 1 +1 1 +4 +1 0 0 1 +0 1 1 0 +1 +0 +1 diff --git a/codeforces/MakeAEqualToB/main_output0.txt b/codeforces/MakeAEqualToB/main_output0.txt new file mode 100644 index 0000000..cdc0ea2 --- /dev/null +++ b/codeforces/MakeAEqualToB/main_output0.txt @@ -0,0 +1,5 @@ +1 +2 +0 +1 +1 diff --git a/codeforces/Password/main b/codeforces/Password/main new file mode 100755 index 0000000..c3cfbff Binary files /dev/null and b/codeforces/Password/main differ diff --git a/codeforces/Password/main.cpp b/codeforces/Password/main.cpp new file mode 100644 index 0000000..3ea0984 --- /dev/null +++ b/codeforces/Password/main.cpp @@ -0,0 +1,52 @@ +#include + +using namespace std; + +using ll = long long; +using pi = pair; +using vpi = vector; +using vi = vector; +using vll = vector; +using mpii = map; +using mpll = map; +using db = long double; + +#define push_back pb +#define all(x) (x).begin(), (x).end() +#define rall(x) (x).rbegin(), (x).rend() +#define lb lower_bound +#define ub upper_bound + +const int MOD = (int)1e9 + 7; +const db PI = acos((db)-1); +const int dx[4]{1, 0, -1, 0}; +const int dy[4]{0, 1, 0, -1}; + +void solve() { + int n; + cin >> n; + for (int i = 0; i < n; i++) { + int x; + cin >> x; + } + cout << 6 * (10 - n - 1) * (10 - n) / 2 << '\n'; +} + +int main () { + ios_base::sync_with_stdio(false); + cin.tie(NULL); + int tt; + cin >> tt; + while(tt--) { + solve(); + } +} + +/* stuff you should look for: + --------------------------- + * special cases (n=1?) + * int overflow, array bounds + * do smth instead of nothing and stay organized + * WRITE STUFF DOWN + * DON'T GET STUCK ON ONE APPROACH + */ diff --git a/codeforces/Password/main_input0.txt b/codeforces/Password/main_input0.txt new file mode 100644 index 0000000..5ab5c1a --- /dev/null +++ b/codeforces/Password/main_input0.txt @@ -0,0 +1,5 @@ +2 +8 +0 1 2 4 5 6 8 9 +1 +8 diff --git a/codeforces/Password/main_output0.txt b/codeforces/Password/main_output0.txt new file mode 100644 index 0000000..43cf9a2 --- /dev/null +++ b/codeforces/Password/main_output0.txt @@ -0,0 +1,2 @@ +6 +216 diff --git a/codeforces/Stripes/main.cpp b/codeforces/Stripes/main.cpp new file mode 100644 index 0000000..91048d4 --- /dev/null +++ b/codeforces/Stripes/main.cpp @@ -0,0 +1,47 @@ +#include + +using namespace std; + +using ll = long long; +using pi = pair; +using vpi = vector; +using vi = vector; +using vll = vector; +using mpii = map; +using mpll = map; +using db = long double; + +#define push_back pb +#define all(x) (x).begin(), (x).end() +#define rall(x) (x).rbegin(), (x).rend() +#define lb lower_bound +#define ub upper_bound + +const int MOD = (int)1e9 + 7; +const db PI = acos((db)-1); +const int dx[4]{1, 0, -1, 0}; +const int dy[4]{0, 1, 0, -1}; + +void solve() { + + +} + +int main () { + ios_base::sync_with_stdio(false); + cin.tie(NULL); + int tt; + cin >> tt; + while(tt--) { + solve(); + } +} + +/* stuff you should look for: + --------------------------- + * special cases (n=1?) + * int overflow, array bounds + * do smth instead of nothing and stay organized + * WRITE STUFF DOWN + * DON'T GET STUCK ON ONE APPROACH + */ diff --git a/codeforces/Sum/main b/codeforces/Sum/main new file mode 100755 index 0000000..c66786b Binary files /dev/null and b/codeforces/Sum/main differ diff --git a/codeforces/Sum/main.cpp b/codeforces/Sum/main.cpp new file mode 100644 index 0000000..7a56c46 --- /dev/null +++ b/codeforces/Sum/main.cpp @@ -0,0 +1,54 @@ +#include +#include + +using namespace std; + +using ll = long long; +using pi = pair; +using vpi = vector; +using vi = vector; +using vll = vector; +using mpii = map; +using mpll = map; +using db = long double; + +#define push_back pb +#define all(x) (x).begin(), (x).end() +#define rall(x) (x).rbegin(), (x).rend() +#define lb lower_bound +#define ub upper_bound + +const int MOD = (int)1e9 + 7; +const db PI = acos((db)-1); +const int dx[4]{1, 0, -1, 0}; +const int dy[4]{0, 1, 0, -1}; + +void solve() { + vi v(3); + for (auto &x : v) cin >> x; + if (v[0] + v[1] == v[2] || v[1] + v[2] == v[0] || v[0] + v[2] == v[1]) { + cout << "YES" << '\n'; + } else { + cout << "NO" << '\n'; + } + +} + +int main () { + ios_base::sync_with_stdio(false); + cin.tie(NULL); + int tt; + cin >> tt; + while(tt--) { + solve(); + } +} + +/* stuff you should look for: + --------------------------- + * special cases (n=1?) + * int overflow, array bounds + * do smth instead of nothing and stay organized + * WRITE STUFF DOWN + * DON'T GET STUCK ON ONE APPROACH + */ diff --git a/codeforces/Sum/main_input0.txt b/codeforces/Sum/main_input0.txt new file mode 100644 index 0000000..40186dd --- /dev/null +++ b/codeforces/Sum/main_input0.txt @@ -0,0 +1,8 @@ +7 +1 4 3 +2 5 8 +9 11 20 +0 0 0 +20 20 20 +4 12 3 +15 7 8 diff --git a/codeforces/Sum/main_output0.txt b/codeforces/Sum/main_output0.txt new file mode 100644 index 0000000..3b142ff --- /dev/null +++ b/codeforces/Sum/main_output0.txt @@ -0,0 +1,7 @@ +YES +NO +YES +YES +NO +NO +YES diff --git a/codeforces/TechnicalSupport/main b/codeforces/TechnicalSupport/main new file mode 100755 index 0000000..06b1637 Binary files /dev/null and b/codeforces/TechnicalSupport/main differ diff --git a/codeforces/TechnicalSupport/main.cpp b/codeforces/TechnicalSupport/main.cpp new file mode 100644 index 0000000..57e8dd3 --- /dev/null +++ b/codeforces/TechnicalSupport/main.cpp @@ -0,0 +1,58 @@ +#include + +using namespace std; + +using ll = long long; +using pi = pair; +using vpi = vector; +using vi = vector; +using vll = vector; +using mpii = map; +using mpll = map; +using db = long double; + +#define push_back pb +#define all(x) (x).begin(), (x).end() +#define rall(x) (x).rbegin(), (x).rend() +#define lb lower_bound +#define ub upper_bound + +const int MOD = (int)1e9 + 7; +const db PI = acos((db)-1); +const int dx[4]{1, 0, -1, 0}; +const int dy[4]{0, 1, 0, -1}; + +void solve() { + int n; + cin >> n; + string s; + cin >> s; + int cnt = 0; + for (auto ch : s) { + if (ch == 'A') { + cnt = max(cnt - 1, 0); + } else if (ch == 'Q') { + cnt++; + } + } + cout << (cnt == 0 ? "Yes" : "No") << '\n'; +} + +int main () { + ios_base::sync_with_stdio(false); + cin.tie(NULL); + int tt; + cin >> tt; + while(tt--) { + solve(); + } +} + +/* stuff you should look for: + --------------------------- + * special cases (n=1?) + * int overflow, array bounds + * do smth instead of nothing and stay organized + * WRITE STUFF DOWN + * DON'T GET STUCK ON ONE APPROACH + */ diff --git a/codeforces/TechnicalSupport/main_input0.txt b/codeforces/TechnicalSupport/main_input0.txt new file mode 100644 index 0000000..9f27501 --- /dev/null +++ b/codeforces/TechnicalSupport/main_input0.txt @@ -0,0 +1,11 @@ +5 +4 +QQAA +4 +QQAQ +3 +QAA +1 +Q +14 +QAQQAQAAQQQAAA diff --git a/codeforces/TechnicalSupport/main_output0.txt b/codeforces/TechnicalSupport/main_output0.txt new file mode 100644 index 0000000..0705ef5 --- /dev/null +++ b/codeforces/TechnicalSupport/main_output0.txt @@ -0,0 +1,5 @@ +Yes +No +Yes +No +Yes -- cgit v1.2.3