diff options
| author | Kleidi Bujari <mail@4kb.net> | 2025-04-02 21:59:20 -0400 |
|---|---|---|
| committer | Kleidi Bujari <mail@4kb.net> | 2025-04-02 21:59:20 -0400 |
| commit | 09c2b6de63a6ff35348fcb2c2eb57b974f0a8a52 (patch) | |
| tree | bd8f1d3a51f12cd98764ae572b00f0b32de62644 /mod/code/cses | |
| parent | b1738c105de3bc0ba7cd27f68c9eb146439a0964 (diff) | |
| download | depot-09c2b6de63a6ff35348fcb2c2eb57b974f0a8a52.tar.gz depot-09c2b6de63a6ff35348fcb2c2eb57b974f0a8a52.tar.bz2 depot-09c2b6de63a6ff35348fcb2c2eb57b974f0a8a52.zip | |
automate project structure
Diffstat (limited to 'mod/code/cses')
| -rw-r--r-- | mod/code/cses/.envrc | 1 | ||||
| -rw-r--r-- | mod/code/cses/default.nix | 13 | ||||
| -rw-r--r-- | mod/code/cses/problems/1068.cpp | 17 | ||||
| -rw-r--r-- | mod/code/cses/problems/1069.cpp | 23 | ||||
| -rw-r--r-- | mod/code/cses/problems/1070.cpp | 15 | ||||
| -rw-r--r-- | mod/code/cses/problems/1071.cpp | 19 | ||||
| -rw-r--r-- | mod/code/cses/problems/1083.cpp | 20 | ||||
| -rw-r--r-- | mod/code/cses/problems/1094.cpp | 27 |
8 files changed, 0 insertions, 135 deletions
diff --git a/mod/code/cses/.envrc b/mod/code/cses/.envrc deleted file mode 100644 index 1d953f4..0000000 --- a/mod/code/cses/.envrc +++ /dev/null @@ -1 +0,0 @@ -use nix diff --git a/mod/code/cses/default.nix b/mod/code/cses/default.nix deleted file mode 100644 index 6538eb8..0000000 --- a/mod/code/cses/default.nix +++ /dev/null @@ -1,13 +0,0 @@ -{ pkgs ? import <nixpkgs> { }, ... }: - -pkgs.mkShell { - packages = with pkgs; [ - clang-tools - (writeShellScriptBin "cpprun" '' - TEMP=".tmp.cpp" - g++ -std=c++20 -O3 ./problems/"$1.cpp" -o $TEMP - ./$TEMP - rm $TEMP - '') - ]; -} diff --git a/mod/code/cses/problems/1068.cpp b/mod/code/cses/problems/1068.cpp deleted file mode 100644 index 8d05936..0000000 --- a/mod/code/cses/problems/1068.cpp +++ /dev/null @@ -1,17 +0,0 @@ -#include <iostream> - -int main(int argc, char *argv[]) { - unsigned long long n; - std::cin >> n; - - while (n != 1) { - std::cout << n << " "; - - if (n % 2 == 0) - n /= 2; - else - n = (n * 3) + 1; - } - - std::cout << 1; -} diff --git a/mod/code/cses/problems/1069.cpp b/mod/code/cses/problems/1069.cpp deleted file mode 100644 index 232d2f7..0000000 --- a/mod/code/cses/problems/1069.cpp +++ /dev/null @@ -1,23 +0,0 @@ -#include <iostream> - -int main() { - std::string input; - std::cin >> input; - - auto max = 0; - auto curr = '-'; - auto count = 0; - - for (auto const ch : input) { - if (curr != ch) { - curr = ch; - count = 0; - } - - count += 1; - max = std::max(max, count); - } - - std::cout << max; - return 0; -} diff --git a/mod/code/cses/problems/1070.cpp b/mod/code/cses/problems/1070.cpp deleted file mode 100644 index 131a644..0000000 --- a/mod/code/cses/problems/1070.cpp +++ /dev/null @@ -1,15 +0,0 @@ -#include <iostream> - -int main() { - int n; - std::cin >> n; - - if (n == 1) - std::cout << 1; - else if (n < 4) - std::cout << "NO SOLUTION"; - else { - for (auto i = 2; i <= n; i += 2) std::cout << i << " "; - for (auto i = 1; i <= n; i += 2) std::cout << i << " "; - } -} diff --git a/mod/code/cses/problems/1071.cpp b/mod/code/cses/problems/1071.cpp deleted file mode 100644 index 778cc86..0000000 --- a/mod/code/cses/problems/1071.cpp +++ /dev/null @@ -1,19 +0,0 @@ -#include <iostream> -#include <tuple> -#include <vector> - -using ull = unsigned long long; - -int main() { - int n; - std::cin >> n; - - while (n--) { - ull x, y; - std::cin >> y >> x; - - auto area = y * y; - auto perimeter = y + y + 1; - auto max = area + perimeter; - } -} diff --git a/mod/code/cses/problems/1083.cpp b/mod/code/cses/problems/1083.cpp deleted file mode 100644 index a3cd253..0000000 --- a/mod/code/cses/problems/1083.cpp +++ /dev/null @@ -1,20 +0,0 @@ -#include <iostream> -#include <set> - -using ull = unsigned long long; - -int main(int argc, char *argv[]) { - ull n; - std::cin >> n; - - auto set = std::set<ull>{}; - - std::string numstr; - while (std::getline(std::cin, numstr, ' ')) set.insert(std::stoi(numstr)); - - for (auto i = 1; i <= n; i++) { - if (set.contains(i)) continue; - std::cout << i; - break; - } -} diff --git a/mod/code/cses/problems/1094.cpp b/mod/code/cses/problems/1094.cpp deleted file mode 100644 index 56f3886..0000000 --- a/mod/code/cses/problems/1094.cpp +++ /dev/null @@ -1,27 +0,0 @@ -#include <iostream> -#include <vector> - -using ull = unsigned long long; - -int main() { - ull n; - auto arr = std::vector<ull>{}; - - std::cin >> n; - - std::string type; - while (std::cin >> type) arr.push_back(std::stoi(type)); - - ull count = 0; - auto last = arr[0]; - - for (auto const num : arr) { - if (num > last) { - last = num; - continue; - } - count += last - num; - } - - std::cout << count; -} |
