diff options
Diffstat (limited to 'cses/TwoSets')
| -rwxr-xr-x | cses/TwoSets/main | bin | 49768 -> 0 bytes | |||
| -rw-r--r-- | cses/TwoSets/main.cpp | 46 | ||||
| -rw-r--r-- | cses/TwoSets/main_input0.txt | 1 | ||||
| -rw-r--r-- | cses/TwoSets/main_input1.txt | 1 | ||||
| -rw-r--r-- | cses/TwoSets/main_output0.txt | 5 | ||||
| -rw-r--r-- | cses/TwoSets/main_output1.txt | 1 |
6 files changed, 0 insertions, 54 deletions
diff --git a/cses/TwoSets/main b/cses/TwoSets/main Binary files differdeleted file mode 100755 index 61c6ec3..0000000 --- a/cses/TwoSets/main +++ /dev/null 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<bits/stdc++.h> - -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<int> vis; - vector<int> 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 |
