From b79a55ceee2f4532ef6621f9d86c6c61543ce6c9 Mon Sep 17 00:00:00 2001 From: omagdy7 Date: Thu, 3 Nov 2022 19:21:07 +0200 Subject: Added some problems --- cses/TwoSets/main | Bin 49768 -> 0 bytes cses/TwoSets/main.cpp | 46 ------------------------------------------ cses/TwoSets/main_input0.txt | 1 - cses/TwoSets/main_input1.txt | 1 - cses/TwoSets/main_output0.txt | 5 ----- cses/TwoSets/main_output1.txt | 1 - 6 files changed, 54 deletions(-) delete mode 100755 cses/TwoSets/main delete mode 100644 cses/TwoSets/main.cpp delete mode 100644 cses/TwoSets/main_input0.txt delete mode 100644 cses/TwoSets/main_input1.txt delete mode 100644 cses/TwoSets/main_output0.txt delete mode 100644 cses/TwoSets/main_output1.txt (limited to 'cses/TwoSets') diff --git a/cses/TwoSets/main b/cses/TwoSets/main deleted file mode 100755 index 61c6ec3..0000000 Binary files a/cses/TwoSets/main and /dev/null differ diff --git a/cses/TwoSets/main.cpp b/cses/TwoSets/main.cpp deleted file mode 100644 index 8c1aed0..0000000 --- a/cses/TwoSets/main.cpp +++ /dev/null @@ -1,46 +0,0 @@ -#include - -using namespace std; - -typedef long long ll; - -int main () { - ios_base::sync_with_stdio(false); - cin.tie(NULL); - ll n; - cin >> n; - ll sum = (n * (n + 1)) / 2; - ll s = sum / 2; - set vis; - vector st2; - if (sum & 1) { - cout << "NO" << '\n'; - } else { - cout << "YES" << '\n'; - for (int i = n; i >= 1; --i) { - if (s - i > 0) { - s -= i; - vis.insert(i); - } else { - vis.insert(s); - s -= i; - break; - } - } - for (int i = 1; i <= n; ++i) { - if (!vis.count(i)) { - st2.push_back(i); - } - } - cout << vis.size() << '\n'; - for (auto x : vis) { - cout << x << " "; - } - cout << '\n'; - cout << st2.size() << '\n'; - for (auto x : st2) { - cout << x << " "; - } - cout << '\n'; - } -} diff --git a/cses/TwoSets/main_input0.txt b/cses/TwoSets/main_input0.txt deleted file mode 100644 index 7f8f011..0000000 --- a/cses/TwoSets/main_input0.txt +++ /dev/null @@ -1 +0,0 @@ -7 diff --git a/cses/TwoSets/main_input1.txt b/cses/TwoSets/main_input1.txt deleted file mode 100644 index 1e8b314..0000000 --- a/cses/TwoSets/main_input1.txt +++ /dev/null @@ -1 +0,0 @@ -6 diff --git a/cses/TwoSets/main_output0.txt b/cses/TwoSets/main_output0.txt deleted file mode 100644 index 90d1101..0000000 --- a/cses/TwoSets/main_output0.txt +++ /dev/null @@ -1,5 +0,0 @@ -YES -4 -1 2 4 7 -3 -3 5 6 diff --git a/cses/TwoSets/main_output1.txt b/cses/TwoSets/main_output1.txt deleted file mode 100644 index 5e35d1b..0000000 --- a/cses/TwoSets/main_output1.txt +++ /dev/null @@ -1 +0,0 @@ -NO -- cgit v1.2.3