aboutsummaryrefslogtreecommitdiff
path: root/works/life/algorithm-contest-3
diff options
context:
space:
mode:
Diffstat (limited to 'works/life/algorithm-contest-3')
-rw-r--r--works/life/algorithm-contest-3/.gitignore4
-rw-r--r--works/life/algorithm-contest-3/README.md15
-rw-r--r--works/life/algorithm-contest-3/code/1.cpp16
-rw-r--r--works/life/algorithm-contest-3/code/2.cpp106
-rw-r--r--works/life/algorithm-contest-3/code/3.cpp22
-rw-r--r--works/life/algorithm-contest-3/code/4.cpp34
-rw-r--r--works/life/algorithm-contest-3/code/5.cpp52
-rwxr-xr-xworks/life/algorithm-contest-3/gen.bash31
-rw-r--r--works/life/algorithm-contest-3/output.zipbin747027 -> 0 bytes
-rw-r--r--works/life/algorithm-contest-3/test-data/1/1.in1
-rw-r--r--works/life/algorithm-contest-3/test-data/1/2.in1
-rw-r--r--works/life/algorithm-contest-3/test-data/1/3.in1
-rw-r--r--works/life/algorithm-contest-3/test-data/1/4.in1
-rw-r--r--works/life/algorithm-contest-3/test-data/1/5.in1
-rw-r--r--works/life/algorithm-contest-3/test-data/1/6.in1
-rw-r--r--works/life/algorithm-contest-3/test-data/1/7.in1
-rw-r--r--works/life/algorithm-contest-3/test-data/2/1.in1
-rw-r--r--works/life/algorithm-contest-3/test-data/2/10.in1
-rw-r--r--works/life/algorithm-contest-3/test-data/2/11.in1
-rw-r--r--works/life/algorithm-contest-3/test-data/2/12.in1
-rw-r--r--works/life/algorithm-contest-3/test-data/2/2.in1
-rw-r--r--works/life/algorithm-contest-3/test-data/2/3.in1
-rw-r--r--works/life/algorithm-contest-3/test-data/2/4.in1
-rw-r--r--works/life/algorithm-contest-3/test-data/2/5.in1
-rw-r--r--works/life/algorithm-contest-3/test-data/2/6.in1
-rw-r--r--works/life/algorithm-contest-3/test-data/2/7.in1
-rw-r--r--works/life/algorithm-contest-3/test-data/2/8.in1
-rw-r--r--works/life/algorithm-contest-3/test-data/2/9.in1
-rw-r--r--works/life/algorithm-contest-3/test-data/3/1.in1
-rw-r--r--works/life/algorithm-contest-3/test-data/3/2.in1
-rw-r--r--works/life/algorithm-contest-3/test-data/3/3.in1
-rw-r--r--works/life/algorithm-contest-3/test-data/3/4.in1
-rw-r--r--works/life/algorithm-contest-3/test-data/3/5.in1
-rw-r--r--works/life/algorithm-contest-3/test-data/4/1.in2
-rw-r--r--works/life/algorithm-contest-3/test-data/4/2.in2
-rw-r--r--works/life/algorithm-contest-3/test-data/4/3.in2
-rw-r--r--works/life/algorithm-contest-3/test-data/4/4.in2
-rw-r--r--works/life/algorithm-contest-3/test-data/4/5.cpp31
-rw-r--r--works/life/algorithm-contest-3/test-data/4/6.cpp31
-rw-r--r--works/life/algorithm-contest-3/test-data/4/7.cpp31
-rw-r--r--works/life/algorithm-contest-3/test-data/4/8.cpp31
-rw-r--r--works/life/algorithm-contest-3/test-data/5/1.in6
-rw-r--r--works/life/algorithm-contest-3/test-data/5/10.cpp20
-rw-r--r--works/life/algorithm-contest-3/test-data/5/11.cpp20
-rw-r--r--works/life/algorithm-contest-3/test-data/5/12.cpp20
-rw-r--r--works/life/algorithm-contest-3/test-data/5/13.cpp20
-rw-r--r--works/life/algorithm-contest-3/test-data/5/14.in5
-rw-r--r--works/life/algorithm-contest-3/test-data/5/2.in6
-rw-r--r--works/life/algorithm-contest-3/test-data/5/3.in6
-rw-r--r--works/life/algorithm-contest-3/test-data/5/4.in6
-rw-r--r--works/life/algorithm-contest-3/test-data/5/5.in6
-rw-r--r--works/life/algorithm-contest-3/test-data/5/6.in6
-rw-r--r--works/life/algorithm-contest-3/test-data/5/7.in6
-rw-r--r--works/life/algorithm-contest-3/test-data/5/8.in6
-rw-r--r--works/life/algorithm-contest-3/test-data/5/9.in6
-rwxr-xr-xworks/life/algorithm-contest-3/zip.bash11
56 files changed, 0 insertions, 586 deletions
diff --git a/works/life/algorithm-contest-3/.gitignore b/works/life/algorithm-contest-3/.gitignore
deleted file mode 100644
index 9d58650..0000000
--- a/works/life/algorithm-contest-3/.gitignore
+++ /dev/null
@@ -1,4 +0,0 @@
-.vscode
-temp
-output
-arc \ No newline at end of file
diff --git a/works/life/algorithm-contest-3/README.md b/works/life/algorithm-contest-3/README.md
deleted file mode 100644
index 0b31f7a..0000000
--- a/works/life/algorithm-contest-3/README.md
+++ /dev/null
@@ -1,15 +0,0 @@
-2021.3.26
-
-此文件夹包含第三届数计学院算法大赛相关的文件。
-
-| 文件夹/文件 | 用途 |
-| ----------- | -------------- |
-| code | 参考答案代码 |
-| test-data | 测试数据生成 |
-| output.zip | 最终的测试数据 |
-
-# Update
-
-1. Update `gen.bash` script so that it can handle more than 9 pieces of test data. Because of `sed` does not support **lazy match** (aka. non-greedy match) so I turn to `perl`.
-
-2. There seems to be a bug in integer sanitizer in clang, which cause the program (exactly problem 2 solution) outputs different result. So I turn off it. But I do not file a bug to llvm for laziness!
diff --git a/works/life/algorithm-contest-3/code/1.cpp b/works/life/algorithm-contest-3/code/1.cpp
deleted file mode 100644
index 2c8ea1a..0000000
--- a/works/life/algorithm-contest-3/code/1.cpp
+++ /dev/null
@@ -1,16 +0,0 @@
-#include <iostream>
-
-int main() {
- std::ios_base::sync_with_stdio(false);
- std::cin.tie(nullptr);
-
- long long n;
- std::cin >> n;
-
- while (n) {
- std::cout << n << ' ';
- n /= 3;
- }
-
- return 0;
-}
diff --git a/works/life/algorithm-contest-3/code/2.cpp b/works/life/algorithm-contest-3/code/2.cpp
deleted file mode 100644
index ad4c840..0000000
--- a/works/life/algorithm-contest-3/code/2.cpp
+++ /dev/null
@@ -1,106 +0,0 @@
-#include <algorithm>
-#include <cstdio>
-#include <vector>
-
-int ConvertYear(int x) {
- if (x >= 60)
- return 1900 + x;
- return 2000 + x;
-}
-
-bool CheckMonth(int x) {
- if (x <= 0 && x >= 13) {
- return false;
- }
-
- return true;
-}
-
-bool IsLeapYear(int y) {
- if (y == 2000)
- return false;
- if (y % 4)
- return false;
- return true;
-}
-
-int days[] = {0, 31, 0, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};
-
-bool CheckDay(int day, int month, int year) {
- if (month == 2) {
- const bool leap = IsLeapYear(year);
- if (leap) {
- return day >= 1 && day <= 29;
- } else {
- return day >= 1 && day <= 28;
- }
- }
-
- return day >= 1 && day <= days[month];
-}
-
-struct Date {
- int year;
- int month;
- int day;
-};
-
-bool operator==(const Date &l, const Date &r) {
- return l.year == r.year && l.month == r.month && l.day == r.day;
-}
-
-bool operator<(const Date &l, const Date &r) {
- if (l.year < r.year)
- return true;
- else if (l.year > r.year)
- return false;
- else if (l.month < r.month)
- return true;
- else if (l.month > r.month)
- return false;
- else if (l.day < r.day)
- return true;
- return false;
-}
-
-bool Check(int year, int month, int day, Date *result) {
- if (!CheckMonth(month))
- return false;
- const auto y = ConvertYear(year);
- if (!CheckDay(day, month, y))
- return false;
-
- result->year = y;
- result->month = month;
- result->day = day;
- return true;
-}
-
-int main() {
- std::vector<Date> results;
-
- int a, b, c;
- std::scanf("%d/%d/%d", &a, &b, &c);
-
- Date temp;
- if (Check(a, b, c, &temp)) {
- results.push_back(temp);
- }
-
- if (Check(c, a, b, &temp)) {
- results.push_back(temp);
- }
-
- if (Check(c, b, a, &temp)) {
- results.push_back(temp);
- }
-
- results.erase(std::unique(results.begin(), results.end()), results.end());
- std::sort(results.begin(), results.end());
-
- for (const auto &r : results) {
- std::printf("%d-%02d-%02d\n", r.year, r.month, r.day);
- }
-
- return 0;
-}
diff --git a/works/life/algorithm-contest-3/code/3.cpp b/works/life/algorithm-contest-3/code/3.cpp
deleted file mode 100644
index 20abfa1..0000000
--- a/works/life/algorithm-contest-3/code/3.cpp
+++ /dev/null
@@ -1,22 +0,0 @@
-#include <iostream>
-
-int n, m;
-long long f[31][31];
-
-int main() {
- std::cin >> n >> m;
-
- f[1][1] = 1;
-
- for (int r = 1; r <= n; r++) {
- for (int c = 1; c <= m; c++) {
- if (!(r == 1 && c == 1) && !(r % 2 == 0 && c % 2 == 0)) {
- f[r][c] = f[r - 1][c] + f[r][c - 1];
- }
- }
- }
-
- std::cout << f[n][m];
-
- return 0;
-}
diff --git a/works/life/algorithm-contest-3/code/4.cpp b/works/life/algorithm-contest-3/code/4.cpp
deleted file mode 100644
index aebd735..0000000
--- a/works/life/algorithm-contest-3/code/4.cpp
+++ /dev/null
@@ -1,34 +0,0 @@
-#include <algorithm>
-#include <iostream>
-#include <numeric>
-
-int gcd(int a, int b) { return b ? gcd(b, a % b) : a; }
-
-int N;
-int A[100010];
-
-int main() {
- std::ios_base::sync_with_stdio(false);
- std::cin.tie(nullptr);
-
- std::cin >> N;
-
- for (int i = 0; i < N; i++) {
- std::cin >> A[i];
- }
-
- std::sort(A, A + N);
-
- int g = A[1] - A[0];
- for (int i = 1; i < N - 1; i++) {
- g = gcd(g, A[i + 1] - A[i]);
- }
-
- if (g == 0) {
- std::cout << N;
- } else {
- std::cout << (A[N - 1] - A[0]) / g + 1;
- }
-
- return 0;
-}
diff --git a/works/life/algorithm-contest-3/code/5.cpp b/works/life/algorithm-contest-3/code/5.cpp
deleted file mode 100644
index 8d70a55..0000000
--- a/works/life/algorithm-contest-3/code/5.cpp
+++ /dev/null
@@ -1,52 +0,0 @@
-#include <algorithm>
-#include <iostream>
-
-int N, K;
-long long A[100010];
-
-long long M = 1000000009;
-
-int main() {
- std::ios_base::sync_with_stdio(false);
- std::cin.tie(nullptr);
-
- std::cin >> N >> K;
-
- for (int i = 0; i < N; i++) {
- std::cin >> A[i];
- }
-
- std::sort(A, A + N);
-
- long long result = 1;
- int left = 0, right = N - 1;
- long long sign = 1;
- int k = K;
-
- if (k % 2) {
- result = A[N - 1];
- right--;
- k--;
-
- if (result < 0) {
- sign = -1;
- }
- }
-
- while (k) {
- long long x = A[left] * A[left + 1], y = A[right] * A[right - 1];
-
- if (x * sign > y * sign) {
- result = x % M * result % M;
- left += 2;
- } else {
- result = y % M * result % M;
- right -= 2;
- }
- k -= 2;
- }
-
- std::cout << result;
-
- return 0;
-}
diff --git a/works/life/algorithm-contest-3/gen.bash b/works/life/algorithm-contest-3/gen.bash
deleted file mode 100755
index a93da88..0000000
--- a/works/life/algorithm-contest-3/gen.bash
+++ /dev/null
@@ -1,31 +0,0 @@
-#!/bin/bash
-shopt -s nullglob
-
-if [ $# -ne 1 ]; then
- echo "please input exact one argument, problem number"
- exit 1
-fi
-
-problem_number=$1
-
-mkdir -p ./output/$problem_number
-
-cp ./test-data/$problem_number/*.in ./output/$problem_number/
-
-mkdir -p ./temp
-
-clang++ ./code/$problem_number.cpp -o ./temp/$problem_number -O2
-
-
-for generator in ./test-data/$problem_number/*.cpp; do
-test_data_number=`echo $generator | perl -pe "s|.*?([0-9]+)\.cpp|\1|"`
-
-clang++ $generator -o ./temp/$problem_number-$test_data_number-g -O2
-
-./temp/$problem_number-$test_data_number-g > ./output/$problem_number/$test_data_number.in
-done
-
-for test_data in ./output/$problem_number/*.in; do
-out_file=`echo $test_data | sed "s/\.in/.out/"`
-./temp/$problem_number < $test_data | tee > $out_file
-done
diff --git a/works/life/algorithm-contest-3/output.zip b/works/life/algorithm-contest-3/output.zip
deleted file mode 100644
index d9aa182..0000000
--- a/works/life/algorithm-contest-3/output.zip
+++ /dev/null
Binary files differ
diff --git a/works/life/algorithm-contest-3/test-data/1/1.in b/works/life/algorithm-contest-3/test-data/1/1.in
deleted file mode 100644
index 9a03714..0000000
--- a/works/life/algorithm-contest-3/test-data/1/1.in
+++ /dev/null
@@ -1 +0,0 @@
-10 \ No newline at end of file
diff --git a/works/life/algorithm-contest-3/test-data/1/2.in b/works/life/algorithm-contest-3/test-data/1/2.in
deleted file mode 100644
index 8580e7b..0000000
--- a/works/life/algorithm-contest-3/test-data/1/2.in
+++ /dev/null
@@ -1 +0,0 @@
-30 \ No newline at end of file
diff --git a/works/life/algorithm-contest-3/test-data/1/3.in b/works/life/algorithm-contest-3/test-data/1/3.in
deleted file mode 100644
index d892ef5..0000000
--- a/works/life/algorithm-contest-3/test-data/1/3.in
+++ /dev/null
@@ -1 +0,0 @@
-32158 \ No newline at end of file
diff --git a/works/life/algorithm-contest-3/test-data/1/4.in b/works/life/algorithm-contest-3/test-data/1/4.in
deleted file mode 100644
index 97b3e56..0000000
--- a/works/life/algorithm-contest-3/test-data/1/4.in
+++ /dev/null
@@ -1 +0,0 @@
-49658245 \ No newline at end of file
diff --git a/works/life/algorithm-contest-3/test-data/1/5.in b/works/life/algorithm-contest-3/test-data/1/5.in
deleted file mode 100644
index 70dfac1..0000000
--- a/works/life/algorithm-contest-3/test-data/1/5.in
+++ /dev/null
@@ -1 +0,0 @@
-436356535634 \ No newline at end of file
diff --git a/works/life/algorithm-contest-3/test-data/1/6.in b/works/life/algorithm-contest-3/test-data/1/6.in
deleted file mode 100644
index 2ced27a..0000000
--- a/works/life/algorithm-contest-3/test-data/1/6.in
+++ /dev/null
@@ -1 +0,0 @@
-13425465454334 \ No newline at end of file
diff --git a/works/life/algorithm-contest-3/test-data/1/7.in b/works/life/algorithm-contest-3/test-data/1/7.in
deleted file mode 100644
index 384eda4..0000000
--- a/works/life/algorithm-contest-3/test-data/1/7.in
+++ /dev/null
@@ -1 +0,0 @@
-123456789123456789 \ No newline at end of file
diff --git a/works/life/algorithm-contest-3/test-data/2/1.in b/works/life/algorithm-contest-3/test-data/2/1.in
deleted file mode 100644
index 79c38cd..0000000
--- a/works/life/algorithm-contest-3/test-data/2/1.in
+++ /dev/null
@@ -1 +0,0 @@
-31/12/59 \ No newline at end of file
diff --git a/works/life/algorithm-contest-3/test-data/2/10.in b/works/life/algorithm-contest-3/test-data/2/10.in
deleted file mode 100644
index bcdc0a9..0000000
--- a/works/life/algorithm-contest-3/test-data/2/10.in
+++ /dev/null
@@ -1 +0,0 @@
-30/11/10 \ No newline at end of file
diff --git a/works/life/algorithm-contest-3/test-data/2/11.in b/works/life/algorithm-contest-3/test-data/2/11.in
deleted file mode 100644
index 56dc9d3..0000000
--- a/works/life/algorithm-contest-3/test-data/2/11.in
+++ /dev/null
@@ -1 +0,0 @@
-04/02/29 \ No newline at end of file
diff --git a/works/life/algorithm-contest-3/test-data/2/12.in b/works/life/algorithm-contest-3/test-data/2/12.in
deleted file mode 100644
index 569a346..0000000
--- a/works/life/algorithm-contest-3/test-data/2/12.in
+++ /dev/null
@@ -1 +0,0 @@
-05/02/29 \ No newline at end of file
diff --git a/works/life/algorithm-contest-3/test-data/2/2.in b/works/life/algorithm-contest-3/test-data/2/2.in
deleted file mode 100644
index e7e8e8b..0000000
--- a/works/life/algorithm-contest-3/test-data/2/2.in
+++ /dev/null
@@ -1 +0,0 @@
-01/01/60 \ No newline at end of file
diff --git a/works/life/algorithm-contest-3/test-data/2/3.in b/works/life/algorithm-contest-3/test-data/2/3.in
deleted file mode 100644
index 735e9d4..0000000
--- a/works/life/algorithm-contest-3/test-data/2/3.in
+++ /dev/null
@@ -1 +0,0 @@
-12/31/60 \ No newline at end of file
diff --git a/works/life/algorithm-contest-3/test-data/2/4.in b/works/life/algorithm-contest-3/test-data/2/4.in
deleted file mode 100644
index dd7f868..0000000
--- a/works/life/algorithm-contest-3/test-data/2/4.in
+++ /dev/null
@@ -1 +0,0 @@
-01/02/03 \ No newline at end of file
diff --git a/works/life/algorithm-contest-3/test-data/2/5.in b/works/life/algorithm-contest-3/test-data/2/5.in
deleted file mode 100644
index f740cc4..0000000
--- a/works/life/algorithm-contest-3/test-data/2/5.in
+++ /dev/null
@@ -1 +0,0 @@
-13/12/11 \ No newline at end of file
diff --git a/works/life/algorithm-contest-3/test-data/2/6.in b/works/life/algorithm-contest-3/test-data/2/6.in
deleted file mode 100644
index 45fc450..0000000
--- a/works/life/algorithm-contest-3/test-data/2/6.in
+++ /dev/null
@@ -1 +0,0 @@
-41/12/12 \ No newline at end of file
diff --git a/works/life/algorithm-contest-3/test-data/2/7.in b/works/life/algorithm-contest-3/test-data/2/7.in
deleted file mode 100644
index 5a71023..0000000
--- a/works/life/algorithm-contest-3/test-data/2/7.in
+++ /dev/null
@@ -1 +0,0 @@
-01/01/01 \ No newline at end of file
diff --git a/works/life/algorithm-contest-3/test-data/2/8.in b/works/life/algorithm-contest-3/test-data/2/8.in
deleted file mode 100644
index c11526c..0000000
--- a/works/life/algorithm-contest-3/test-data/2/8.in
+++ /dev/null
@@ -1 +0,0 @@
-10/11/15 \ No newline at end of file
diff --git a/works/life/algorithm-contest-3/test-data/2/9.in b/works/life/algorithm-contest-3/test-data/2/9.in
deleted file mode 100644
index eb24a27..0000000
--- a/works/life/algorithm-contest-3/test-data/2/9.in
+++ /dev/null
@@ -1 +0,0 @@
-31/11/10 \ No newline at end of file
diff --git a/works/life/algorithm-contest-3/test-data/3/1.in b/works/life/algorithm-contest-3/test-data/3/1.in
deleted file mode 100644
index cadb504..0000000
--- a/works/life/algorithm-contest-3/test-data/3/1.in
+++ /dev/null
@@ -1 +0,0 @@
-4 5 \ No newline at end of file
diff --git a/works/life/algorithm-contest-3/test-data/3/2.in b/works/life/algorithm-contest-3/test-data/3/2.in
deleted file mode 100644
index f5381fa..0000000
--- a/works/life/algorithm-contest-3/test-data/3/2.in
+++ /dev/null
@@ -1 +0,0 @@
-7 7 \ No newline at end of file
diff --git a/works/life/algorithm-contest-3/test-data/3/3.in b/works/life/algorithm-contest-3/test-data/3/3.in
deleted file mode 100644
index bb7be06..0000000
--- a/works/life/algorithm-contest-3/test-data/3/3.in
+++ /dev/null
@@ -1 +0,0 @@
-12 17 \ No newline at end of file
diff --git a/works/life/algorithm-contest-3/test-data/3/4.in b/works/life/algorithm-contest-3/test-data/3/4.in
deleted file mode 100644
index e17177b..0000000
--- a/works/life/algorithm-contest-3/test-data/3/4.in
+++ /dev/null
@@ -1 +0,0 @@
-21 17 \ No newline at end of file
diff --git a/works/life/algorithm-contest-3/test-data/3/5.in b/works/life/algorithm-contest-3/test-data/3/5.in
deleted file mode 100644
index ada4381..0000000
--- a/works/life/algorithm-contest-3/test-data/3/5.in
+++ /dev/null
@@ -1 +0,0 @@
-29 30 \ No newline at end of file
diff --git a/works/life/algorithm-contest-3/test-data/4/1.in b/works/life/algorithm-contest-3/test-data/4/1.in
deleted file mode 100644
index 99e00b5..0000000
--- a/works/life/algorithm-contest-3/test-data/4/1.in
+++ /dev/null
@@ -1,2 +0,0 @@
-3
-1 2 3
diff --git a/works/life/algorithm-contest-3/test-data/4/2.in b/works/life/algorithm-contest-3/test-data/4/2.in
deleted file mode 100644
index f33d5ec..0000000
--- a/works/life/algorithm-contest-3/test-data/4/2.in
+++ /dev/null
@@ -1,2 +0,0 @@
-3
-1 3 4
diff --git a/works/life/algorithm-contest-3/test-data/4/3.in b/works/life/algorithm-contest-3/test-data/4/3.in
deleted file mode 100644
index a18e01d..0000000
--- a/works/life/algorithm-contest-3/test-data/4/3.in
+++ /dev/null
@@ -1,2 +0,0 @@
-3
-1 1 1 \ No newline at end of file
diff --git a/works/life/algorithm-contest-3/test-data/4/4.in b/works/life/algorithm-contest-3/test-data/4/4.in
deleted file mode 100644
index 4ef3642..0000000
--- a/works/life/algorithm-contest-3/test-data/4/4.in
+++ /dev/null
@@ -1,2 +0,0 @@
-4
-0 3 12 18 \ No newline at end of file
diff --git a/works/life/algorithm-contest-3/test-data/4/5.cpp b/works/life/algorithm-contest-3/test-data/4/5.cpp
deleted file mode 100644
index 774b407..0000000
--- a/works/life/algorithm-contest-3/test-data/4/5.cpp
+++ /dev/null
@@ -1,31 +0,0 @@
-#include <algorithm>
-#include <iostream>
-#include <random>
-
-const int kCommonDifference = 25;
-const int kSequenceSize = 100;
-
-int main() {
-
- std::random_device random_device;
- auto random = std::default_random_engine{random_device()};
- std::binomial_distribution<int> distribution{100, 0.4};
-
- std::vector<int> sequence;
-
- int current_value = 0;
-
- for (int i = 0; i < kSequenceSize; i++) {
- sequence.push_back(current_value);
- current_value += distribution(random) * kCommonDifference;
- }
-
- std::shuffle(sequence.begin(), sequence.end(), random);
-
- std::cout << kSequenceSize << "\n";
- for (auto v : sequence) {
- std::cout << v << ' ';
- }
-
- return 0;
-}
diff --git a/works/life/algorithm-contest-3/test-data/4/6.cpp b/works/life/algorithm-contest-3/test-data/4/6.cpp
deleted file mode 100644
index 32c3a9f..0000000
--- a/works/life/algorithm-contest-3/test-data/4/6.cpp
+++ /dev/null
@@ -1,31 +0,0 @@
-#include <algorithm>
-#include <iostream>
-#include <random>
-
-const int kCommonDifference = 10;
-const int kSequenceSize = 1000;
-
-int main() {
-
- std::random_device random_device;
- auto random = std::default_random_engine{random_device()};
- std::binomial_distribution<int> distribution{100, 0.4};
-
- std::vector<int> sequence;
-
- int current_value = 0;
-
- for (int i = 0; i < kSequenceSize; i++) {
- sequence.push_back(current_value);
- current_value += distribution(random) * kCommonDifference;
- }
-
- std::shuffle(sequence.begin(), sequence.end(), random);
-
- std::cout << kSequenceSize << "\n";
- for (auto v : sequence) {
- std::cout << v << ' ';
- }
-
- return 0;
-}
diff --git a/works/life/algorithm-contest-3/test-data/4/7.cpp b/works/life/algorithm-contest-3/test-data/4/7.cpp
deleted file mode 100644
index 185e27c..0000000
--- a/works/life/algorithm-contest-3/test-data/4/7.cpp
+++ /dev/null
@@ -1,31 +0,0 @@
-#include <algorithm>
-#include <iostream>
-#include <random>
-
-const int kCommonDifference = 6;
-const int kSequenceSize = 10000;
-
-int main() {
-
- std::random_device random_device;
- auto random = std::default_random_engine{random_device()};
- std::binomial_distribution<int> distribution{100, 0.4};
-
- std::vector<int> sequence;
-
- int current_value = 0;
-
- for (int i = 0; i < kSequenceSize; i++) {
- sequence.push_back(current_value);
- current_value += distribution(random) * kCommonDifference;
- }
-
- std::shuffle(sequence.begin(), sequence.end(), random);
-
- std::cout << kSequenceSize << "\n";
- for (auto v : sequence) {
- std::cout << v << ' ';
- }
-
- return 0;
-}
diff --git a/works/life/algorithm-contest-3/test-data/4/8.cpp b/works/life/algorithm-contest-3/test-data/4/8.cpp
deleted file mode 100644
index d3c7d38..0000000
--- a/works/life/algorithm-contest-3/test-data/4/8.cpp
+++ /dev/null
@@ -1,31 +0,0 @@
-#include <algorithm>
-#include <iostream>
-#include <random>
-
-const int kCommonDifference = 4;
-const int kSequenceSize = 100000;
-
-int main() {
-
- std::random_device random_device;
- auto random = std::default_random_engine{random_device()};
- std::binomial_distribution<int> distribution{100, 0.4};
-
- std::vector<int> sequence;
-
- int current_value = 0;
-
- for (int i = 0; i < kSequenceSize; i++) {
- sequence.push_back(current_value);
- current_value += distribution(random) * kCommonDifference;
- }
-
- std::shuffle(sequence.begin(), sequence.end(), random);
-
- std::cout << kSequenceSize << "\n";
- for (auto v : sequence) {
- std::cout << v << ' ';
- }
-
- return 0;
-}
diff --git a/works/life/algorithm-contest-3/test-data/5/1.in b/works/life/algorithm-contest-3/test-data/5/1.in
deleted file mode 100644
index 67955b5..0000000
--- a/works/life/algorithm-contest-3/test-data/5/1.in
+++ /dev/null
@@ -1,6 +0,0 @@
-5 3
-100
-200
-300
-400
-500 \ No newline at end of file
diff --git a/works/life/algorithm-contest-3/test-data/5/10.cpp b/works/life/algorithm-contest-3/test-data/5/10.cpp
deleted file mode 100644
index c74d96d..0000000
--- a/works/life/algorithm-contest-3/test-data/5/10.cpp
+++ /dev/null
@@ -1,20 +0,0 @@
-#include <algorithm>
-#include <iostream>
-#include <random>
-
-const int kNumberCount = 100;
-const int kChooseCount = 40;
-
-int main() {
- std::random_device random_device;
- auto random = std::default_random_engine{random_device()};
- std::uniform_int_distribution<int> distribution{0, 200000};
-
- std::cout << kNumberCount << ' ' << kChooseCount << "\n";
-
- for (int i = 0; i < kNumberCount; i++) {
- std::cout << distribution(random) - 100000 << "\n";
- }
-
- return 0;
-}
diff --git a/works/life/algorithm-contest-3/test-data/5/11.cpp b/works/life/algorithm-contest-3/test-data/5/11.cpp
deleted file mode 100644
index 039ca04..0000000
--- a/works/life/algorithm-contest-3/test-data/5/11.cpp
+++ /dev/null
@@ -1,20 +0,0 @@
-#include <algorithm>
-#include <iostream>
-#include <random>
-
-const int kNumberCount = 1000;
-const int kChooseCount = 200;
-
-int main() {
- std::random_device random_device;
- auto random = std::default_random_engine{random_device()};
- std::uniform_int_distribution<int> distribution{0, 200000};
-
- std::cout << kNumberCount << ' ' << kChooseCount << "\n";
-
- for (int i = 0; i < kNumberCount; i++) {
- std::cout << distribution(random) - 100000 << "\n";
- }
-
- return 0;
-}
diff --git a/works/life/algorithm-contest-3/test-data/5/12.cpp b/works/life/algorithm-contest-3/test-data/5/12.cpp
deleted file mode 100644
index f7488fb..0000000
--- a/works/life/algorithm-contest-3/test-data/5/12.cpp
+++ /dev/null
@@ -1,20 +0,0 @@
-#include <algorithm>
-#include <iostream>
-#include <random>
-
-const int kNumberCount = 10000;
-const int kChooseCount = 1000;
-
-int main() {
- std::random_device random_device;
- auto random = std::default_random_engine{random_device()};
- std::uniform_int_distribution<int> distribution{0, 200000};
-
- std::cout << kNumberCount << ' ' << kChooseCount << "\n";
-
- for (int i = 0; i < kNumberCount; i++) {
- std::cout << distribution(random) - 100000 << "\n";
- }
-
- return 0;
-} \ No newline at end of file
diff --git a/works/life/algorithm-contest-3/test-data/5/13.cpp b/works/life/algorithm-contest-3/test-data/5/13.cpp
deleted file mode 100644
index b4e115e..0000000
--- a/works/life/algorithm-contest-3/test-data/5/13.cpp
+++ /dev/null
@@ -1,20 +0,0 @@
-#include <algorithm>
-#include <iostream>
-#include <random>
-
-const int kNumberCount = 100000;
-const int kChooseCount = 30000;
-
-int main() {
- std::random_device random_device;
- auto random = std::default_random_engine{random_device()};
- std::uniform_int_distribution<int> distribution{0, 200000};
-
- std::cout << kNumberCount << ' ' << kChooseCount << "\n";
-
- for (int i = 0; i < kNumberCount; i++) {
- std::cout << distribution(random) - 100000 << "\n";
- }
-
- return 0;
-}
diff --git a/works/life/algorithm-contest-3/test-data/5/14.in b/works/life/algorithm-contest-3/test-data/5/14.in
deleted file mode 100644
index 9a880e1..0000000
--- a/works/life/algorithm-contest-3/test-data/5/14.in
+++ /dev/null
@@ -1,5 +0,0 @@
-4 4
--100
--100
--100
-100 \ No newline at end of file
diff --git a/works/life/algorithm-contest-3/test-data/5/2.in b/works/life/algorithm-contest-3/test-data/5/2.in
deleted file mode 100644
index 44e28ef..0000000
--- a/works/life/algorithm-contest-3/test-data/5/2.in
+++ /dev/null
@@ -1,6 +0,0 @@
-5 3
--100
--200
--300
--400
--500 \ No newline at end of file
diff --git a/works/life/algorithm-contest-3/test-data/5/3.in b/works/life/algorithm-contest-3/test-data/5/3.in
deleted file mode 100644
index d784df0..0000000
--- a/works/life/algorithm-contest-3/test-data/5/3.in
+++ /dev/null
@@ -1,6 +0,0 @@
-5 4
--100
--200
--300
--400
--500 \ No newline at end of file
diff --git a/works/life/algorithm-contest-3/test-data/5/4.in b/works/life/algorithm-contest-3/test-data/5/4.in
deleted file mode 100644
index f710da1..0000000
--- a/works/life/algorithm-contest-3/test-data/5/4.in
+++ /dev/null
@@ -1,6 +0,0 @@
-5 3
-20
--300
-100
-200
--100 \ No newline at end of file
diff --git a/works/life/algorithm-contest-3/test-data/5/5.in b/works/life/algorithm-contest-3/test-data/5/5.in
deleted file mode 100644
index 7eba3f5..0000000
--- a/works/life/algorithm-contest-3/test-data/5/5.in
+++ /dev/null
@@ -1,6 +0,0 @@
-5 3
-100
--100
--200
-300
-400 \ No newline at end of file
diff --git a/works/life/algorithm-contest-3/test-data/5/6.in b/works/life/algorithm-contest-3/test-data/5/6.in
deleted file mode 100644
index 106730a..0000000
--- a/works/life/algorithm-contest-3/test-data/5/6.in
+++ /dev/null
@@ -1,6 +0,0 @@
-5 4
-100
--100
--200
-300
-400 \ No newline at end of file
diff --git a/works/life/algorithm-contest-3/test-data/5/7.in b/works/life/algorithm-contest-3/test-data/5/7.in
deleted file mode 100644
index 01bd232..0000000
--- a/works/life/algorithm-contest-3/test-data/5/7.in
+++ /dev/null
@@ -1,6 +0,0 @@
-5 3
--100
--200
-0
--300
--400 \ No newline at end of file
diff --git a/works/life/algorithm-contest-3/test-data/5/8.in b/works/life/algorithm-contest-3/test-data/5/8.in
deleted file mode 100644
index 7e0ce0b..0000000
--- a/works/life/algorithm-contest-3/test-data/5/8.in
+++ /dev/null
@@ -1,6 +0,0 @@
-5 3
--100
-200
-0
--300
--400 \ No newline at end of file
diff --git a/works/life/algorithm-contest-3/test-data/5/9.in b/works/life/algorithm-contest-3/test-data/5/9.in
deleted file mode 100644
index 210953e..0000000
--- a/works/life/algorithm-contest-3/test-data/5/9.in
+++ /dev/null
@@ -1,6 +0,0 @@
-5 4
--100
--100
-100
-100
-200 \ No newline at end of file
diff --git a/works/life/algorithm-contest-3/zip.bash b/works/life/algorithm-contest-3/zip.bash
deleted file mode 100755
index 519dd45..0000000
--- a/works/life/algorithm-contest-3/zip.bash
+++ /dev/null
@@ -1,11 +0,0 @@
-if [ $# -ne 1 ]
-then
- echo "please provide exact one argument, problem number"
- exit 1
-fi
-
-pushd ./output/$1/
-zip ./$1.zip *.in *.out
-popd
-
-mv ./output/$1/$1.zip ./output