From e05182f7cd6772a3afd0419a0aeb28d3a4f35b70 Mon Sep 17 00:00:00 2001 From: Baoshuo Date: Thu, 30 Mar 2023 17:29:56 +0800 Subject: [PATCH] =?UTF-8?q?#2104.=20=E3=80=90=E6=A8=A1=E6=9D=BF=E3=80=91?= =?UTF-8?q?=E5=89=B2=E7=82=B9=EF=BC=88=E5=89=B2=E9=A1=B6=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit https://sjzezoj.com/submission/74885 --- S2OJ/2104/2104.cpp | 68 +++++++++++++++++++++++++++++++++++++ S2OJ/2104/data/1.in | 3 ++ S2OJ/2104/data/1.out | 3 ++ S2OJ/2104/data/10.in | 3 ++ S2OJ/2104/data/10.out | 3 ++ S2OJ/2104/data/11.in | 3 ++ S2OJ/2104/data/11.out | 3 ++ S2OJ/2104/data/12.in | 3 ++ S2OJ/2104/data/12.out | 3 ++ S2OJ/2104/data/13.in | 3 ++ S2OJ/2104/data/13.out | 3 ++ S2OJ/2104/data/14.in | 3 ++ S2OJ/2104/data/14.out | 3 ++ S2OJ/2104/data/15.in | 3 ++ S2OJ/2104/data/15.out | 3 ++ S2OJ/2104/data/16.in | 3 ++ S2OJ/2104/data/16.out | 3 ++ S2OJ/2104/data/17.in | 3 ++ S2OJ/2104/data/17.out | 3 ++ S2OJ/2104/data/18.in | 3 ++ S2OJ/2104/data/18.out | 3 ++ S2OJ/2104/data/19.in | 3 ++ S2OJ/2104/data/19.out | 3 ++ S2OJ/2104/data/2.in | 3 ++ S2OJ/2104/data/2.out | 3 ++ S2OJ/2104/data/20.in | 3 ++ S2OJ/2104/data/20.out | 3 ++ S2OJ/2104/data/21.in | 3 ++ S2OJ/2104/data/21.out | 3 ++ S2OJ/2104/data/22.in | 3 ++ S2OJ/2104/data/22.out | 3 ++ S2OJ/2104/data/23.in | 3 ++ S2OJ/2104/data/23.out | 3 ++ S2OJ/2104/data/24.in | 3 ++ S2OJ/2104/data/24.out | 3 ++ S2OJ/2104/data/25.in | 3 ++ S2OJ/2104/data/25.out | 3 ++ S2OJ/2104/data/3.in | 3 ++ S2OJ/2104/data/3.out | 3 ++ S2OJ/2104/data/4.in | 3 ++ S2OJ/2104/data/4.out | 3 ++ S2OJ/2104/data/5.in | 3 ++ S2OJ/2104/data/5.out | 3 ++ S2OJ/2104/data/6.in | 3 ++ S2OJ/2104/data/6.out | 3 ++ S2OJ/2104/data/7.in | 3 ++ S2OJ/2104/data/7.out | 3 ++ S2OJ/2104/data/8.in | 3 ++ S2OJ/2104/data/8.out | 3 ++ S2OJ/2104/data/9.in | 3 ++ S2OJ/2104/data/9.out | 3 ++ S2OJ/2104/data/problem.conf | 3 ++ S2OJ/2104/data/std.cpp | 3 ++ S2OJ/2104/data/val.cpp | 3 ++ S2OJ/2104/resources/gen.cpp | 51 ++++++++++++++++++++++++++++ 55 files changed, 278 insertions(+) create mode 100644 S2OJ/2104/2104.cpp create mode 100644 S2OJ/2104/data/1.in create mode 100644 S2OJ/2104/data/1.out create mode 100644 S2OJ/2104/data/10.in create mode 100644 S2OJ/2104/data/10.out create mode 100644 S2OJ/2104/data/11.in create mode 100644 S2OJ/2104/data/11.out create mode 100644 S2OJ/2104/data/12.in create mode 100644 S2OJ/2104/data/12.out create mode 100644 S2OJ/2104/data/13.in create mode 100644 S2OJ/2104/data/13.out create mode 100644 S2OJ/2104/data/14.in create mode 100644 S2OJ/2104/data/14.out create mode 100644 S2OJ/2104/data/15.in create mode 100644 S2OJ/2104/data/15.out create mode 100644 S2OJ/2104/data/16.in create mode 100644 S2OJ/2104/data/16.out create mode 100644 S2OJ/2104/data/17.in create mode 100644 S2OJ/2104/data/17.out create mode 100644 S2OJ/2104/data/18.in create mode 100644 S2OJ/2104/data/18.out create mode 100644 S2OJ/2104/data/19.in create mode 100644 S2OJ/2104/data/19.out create mode 100644 S2OJ/2104/data/2.in create mode 100644 S2OJ/2104/data/2.out create mode 100644 S2OJ/2104/data/20.in create mode 100644 S2OJ/2104/data/20.out create mode 100644 S2OJ/2104/data/21.in create mode 100644 S2OJ/2104/data/21.out create mode 100644 S2OJ/2104/data/22.in create mode 100644 S2OJ/2104/data/22.out create mode 100644 S2OJ/2104/data/23.in create mode 100644 S2OJ/2104/data/23.out create mode 100644 S2OJ/2104/data/24.in create mode 100644 S2OJ/2104/data/24.out create mode 100644 S2OJ/2104/data/25.in create mode 100644 S2OJ/2104/data/25.out create mode 100644 S2OJ/2104/data/3.in create mode 100644 S2OJ/2104/data/3.out create mode 100644 S2OJ/2104/data/4.in create mode 100644 S2OJ/2104/data/4.out create mode 100644 S2OJ/2104/data/5.in create mode 100644 S2OJ/2104/data/5.out create mode 100644 S2OJ/2104/data/6.in create mode 100644 S2OJ/2104/data/6.out create mode 100644 S2OJ/2104/data/7.in create mode 100644 S2OJ/2104/data/7.out create mode 100644 S2OJ/2104/data/8.in create mode 100644 S2OJ/2104/data/8.out create mode 100644 S2OJ/2104/data/9.in create mode 100644 S2OJ/2104/data/9.out create mode 100644 S2OJ/2104/data/problem.conf create mode 100644 S2OJ/2104/data/std.cpp create mode 100644 S2OJ/2104/data/val.cpp create mode 100644 S2OJ/2104/resources/gen.cpp diff --git a/S2OJ/2104/2104.cpp b/S2OJ/2104/2104.cpp new file mode 100644 index 00000000..be75a5bb --- /dev/null +++ b/S2OJ/2104/2104.cpp @@ -0,0 +1,68 @@ +#include +#include +#include + +using std::cin; +using std::cout; +const char endl = '\n'; + +const int N = 2e4 + 5; + +int n, m; +std::vector g[N]; +int root, cnt, dfn[N], low[N]; +bool cut[N]; + +void tarjan(int u) { + dfn[u] = low[u] = ++cnt; + bool flag = false; + + for (int v : g[u]) { + if (!dfn[v]) { + tarjan(v); + low[u] = std::min(low[u], low[v]); + if (dfn[u] <= low[v]) { + if (u != root || flag) { + cut[u] = true; + } else { + flag = true; + } + } + } else { + low[u] = std::min(low[u], dfn[v]); + } + } +} + +int main() { + std::ios::sync_with_stdio(false); + cin.tie(nullptr); + + cin >> n >> m; + + for (int i = 1, x, y; i <= m; i++) { + cin >> x >> y; + + g[x].emplace_back(y); + g[y].emplace_back(x); + } + + for (int i = 1; i <= n; i++) { + if (!dfn[i]) { + root = i; + tarjan(i); + } + } + + cout << std::count(cut + 1, cut + n + 1, true) << endl; + + for (int i = 1; i <= n; i++) { + if (cut[i]) { + cout << i << ' '; + } + } + + cout << endl; + + return 0; +} diff --git a/S2OJ/2104/data/1.in b/S2OJ/2104/data/1.in new file mode 100644 index 00000000..60386304 --- /dev/null +++ b/S2OJ/2104/data/1.in @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:264af68f24a895acf82b65cf22670b9ac1213bf694ffde8186deb4690b30d326 +size 23399 diff --git a/S2OJ/2104/data/1.out b/S2OJ/2104/data/1.out new file mode 100644 index 00000000..7abed199 --- /dev/null +++ b/S2OJ/2104/data/1.out @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2ef7e5fd79eb187e1a08113bbbe625677dccaf3162bb66cf8253703e630126bd +size 7 diff --git a/S2OJ/2104/data/10.in b/S2OJ/2104/data/10.in new file mode 100644 index 00000000..6bc7bd19 --- /dev/null +++ b/S2OJ/2104/data/10.in @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d3f74814884d27d6c3d4b4944f9eb2b521e8d7e069d227bf453a41614af1b993 +size 928253 diff --git a/S2OJ/2104/data/10.out b/S2OJ/2104/data/10.out new file mode 100644 index 00000000..e875dedf --- /dev/null +++ b/S2OJ/2104/data/10.out @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:74d01a0c051c963d9a9b8ab9dbeab1723f0ad8534ea9fa6a942f358d7fa011b4 +size 3 diff --git a/S2OJ/2104/data/11.in b/S2OJ/2104/data/11.in new file mode 100644 index 00000000..89858f3c --- /dev/null +++ b/S2OJ/2104/data/11.in @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:001ec11ce95ece84e190a526c1b5cda684a97ad093bfedf0064bd558c520f03f +size 875962 diff --git a/S2OJ/2104/data/11.out b/S2OJ/2104/data/11.out new file mode 100644 index 00000000..49cbc95b --- /dev/null +++ b/S2OJ/2104/data/11.out @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:642b05fc32d0b9a6424b7bfbfd350a56de406cda9d7b15af32c20801beaabd16 +size 153 diff --git a/S2OJ/2104/data/12.in b/S2OJ/2104/data/12.in new file mode 100644 index 00000000..de1b10b7 --- /dev/null +++ b/S2OJ/2104/data/12.in @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:db058cb587fca0823e243e60437c07898c73d43001edaad4b8a0bdd3e92a6007 +size 580259 diff --git a/S2OJ/2104/data/12.out b/S2OJ/2104/data/12.out new file mode 100644 index 00000000..e06ee854 --- /dev/null +++ b/S2OJ/2104/data/12.out @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:465a9e659d1dd63fdcdf17b55521b5de6611a02a4657f7ce5de1d26b6b96a0b3 +size 1469 diff --git a/S2OJ/2104/data/13.in b/S2OJ/2104/data/13.in new file mode 100644 index 00000000..10ef7595 --- /dev/null +++ b/S2OJ/2104/data/13.in @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f3ad9545db0f832b38fa2d64f105cb93a855af13ea56c2df1d571cb462ad73fb +size 674442 diff --git a/S2OJ/2104/data/13.out b/S2OJ/2104/data/13.out new file mode 100644 index 00000000..2eb469e8 --- /dev/null +++ b/S2OJ/2104/data/13.out @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:fba8d209629883e622fba47c9546d0693a075ac09ec32efd373d6cd747057c50 +size 105 diff --git a/S2OJ/2104/data/14.in b/S2OJ/2104/data/14.in new file mode 100644 index 00000000..b7e153bb --- /dev/null +++ b/S2OJ/2104/data/14.in @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ea79f8c5a0a040f8ec22723cb093455015c24611697990d973aa91cfbc1820d0 +size 725145 diff --git a/S2OJ/2104/data/14.out b/S2OJ/2104/data/14.out new file mode 100644 index 00000000..54b21575 --- /dev/null +++ b/S2OJ/2104/data/14.out @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:71203af3ace12f42d4352d99662b3e8f8bfdc8e19ca576c5cf1a7ef4101bc26a +size 68 diff --git a/S2OJ/2104/data/15.in b/S2OJ/2104/data/15.in new file mode 100644 index 00000000..52723d84 --- /dev/null +++ b/S2OJ/2104/data/15.in @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:236780e4ffd3547152478414caaa2dc36300f94b3462f699cc72d0bf43e4ccef +size 931808 diff --git a/S2OJ/2104/data/15.out b/S2OJ/2104/data/15.out new file mode 100644 index 00000000..e875dedf --- /dev/null +++ b/S2OJ/2104/data/15.out @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:74d01a0c051c963d9a9b8ab9dbeab1723f0ad8534ea9fa6a942f358d7fa011b4 +size 3 diff --git a/S2OJ/2104/data/16.in b/S2OJ/2104/data/16.in new file mode 100644 index 00000000..b38e6d5b --- /dev/null +++ b/S2OJ/2104/data/16.in @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9f1006b2600668a9ccb6252118090f70e25e5636dd24615d0400d2cd83f478dd +size 904742 diff --git a/S2OJ/2104/data/16.out b/S2OJ/2104/data/16.out new file mode 100644 index 00000000..5d5b3651 --- /dev/null +++ b/S2OJ/2104/data/16.out @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:18b2a329e8430a2f9b0c2b801d8c563e63b334f138bca0b4ecce28c68fb60f78 +size 127 diff --git a/S2OJ/2104/data/17.in b/S2OJ/2104/data/17.in new file mode 100644 index 00000000..c63a5fa8 --- /dev/null +++ b/S2OJ/2104/data/17.in @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:cf47d903360c5dd34be19984346cec3e1f9b708167d5403f158e829ae91a93d9 +size 608506 diff --git a/S2OJ/2104/data/17.out b/S2OJ/2104/data/17.out new file mode 100644 index 00000000..d399adb2 --- /dev/null +++ b/S2OJ/2104/data/17.out @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:fa9c170b8af3134e4613b1702475689a727ce9f672d6ff28fcff18d15403e5ce +size 1348 diff --git a/S2OJ/2104/data/18.in b/S2OJ/2104/data/18.in new file mode 100644 index 00000000..1933b505 --- /dev/null +++ b/S2OJ/2104/data/18.in @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f2eb1ae7f6bbbd7709c3c25903e9615bc08730242eabf86b1e9936e96644e47d +size 702676 diff --git a/S2OJ/2104/data/18.out b/S2OJ/2104/data/18.out new file mode 100644 index 00000000..9ddb653a --- /dev/null +++ b/S2OJ/2104/data/18.out @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:48131be8b685e44f6071adcb0f7becd580e3518bbe991a4a8949fc41ccbefe99 +size 98 diff --git a/S2OJ/2104/data/19.in b/S2OJ/2104/data/19.in new file mode 100644 index 00000000..a4ec03c6 --- /dev/null +++ b/S2OJ/2104/data/19.in @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:bbe4d2c4374faec2f5515951bbc0dbe99ae5419282046de86a9151205ee91538 +size 594584 diff --git a/S2OJ/2104/data/19.out b/S2OJ/2104/data/19.out new file mode 100644 index 00000000..7af13b6a --- /dev/null +++ b/S2OJ/2104/data/19.out @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2bae06cfe61f35ab57b8d867cb6392b3f5b260870433efd1d4b809f403e3348c +size 99 diff --git a/S2OJ/2104/data/2.in b/S2OJ/2104/data/2.in new file mode 100644 index 00000000..15bd3bd1 --- /dev/null +++ b/S2OJ/2104/data/2.in @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0d37ef74b799011dbf6104815eb8349fc4a9ef3bf7248afee4ae7fc4802fda36 +size 30508 diff --git a/S2OJ/2104/data/2.out b/S2OJ/2104/data/2.out new file mode 100644 index 00000000..e875dedf --- /dev/null +++ b/S2OJ/2104/data/2.out @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:74d01a0c051c963d9a9b8ab9dbeab1723f0ad8534ea9fa6a942f358d7fa011b4 +size 3 diff --git a/S2OJ/2104/data/20.in b/S2OJ/2104/data/20.in new file mode 100644 index 00000000..65299def --- /dev/null +++ b/S2OJ/2104/data/20.in @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4b9f395f0b6f05105a892b8c90e9ec08001c8f0c5649328e184cab77b27b7b20 +size 900022 diff --git a/S2OJ/2104/data/20.out b/S2OJ/2104/data/20.out new file mode 100644 index 00000000..e875dedf --- /dev/null +++ b/S2OJ/2104/data/20.out @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:74d01a0c051c963d9a9b8ab9dbeab1723f0ad8534ea9fa6a942f358d7fa011b4 +size 3 diff --git a/S2OJ/2104/data/21.in b/S2OJ/2104/data/21.in new file mode 100644 index 00000000..47220b86 --- /dev/null +++ b/S2OJ/2104/data/21.in @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5ebb4f7c3c90094e29895f34f1926f42bcbfebbe9921ed84e1535c214cb50731 +size 1056976 diff --git a/S2OJ/2104/data/21.out b/S2OJ/2104/data/21.out new file mode 100644 index 00000000..bc87099d --- /dev/null +++ b/S2OJ/2104/data/21.out @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4afdcdbb78d8d56bbab60e81f87d49bb4a1a9443ed87689fbac81fccfc0d5acb +size 14 diff --git a/S2OJ/2104/data/22.in b/S2OJ/2104/data/22.in new file mode 100644 index 00000000..1e8c2ccd --- /dev/null +++ b/S2OJ/2104/data/22.in @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:60f20fb84f42f191cbdc5a63737ead2f1d38da0ae0005fd6af5967af6065b2f7 +size 763074 diff --git a/S2OJ/2104/data/22.out b/S2OJ/2104/data/22.out new file mode 100644 index 00000000..85d1a49e --- /dev/null +++ b/S2OJ/2104/data/22.out @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c782d5a7bb84d2ab5a14f454a6a929d8a72eb024504cba2471750ec49582b51c +size 132 diff --git a/S2OJ/2104/data/23.in b/S2OJ/2104/data/23.in new file mode 100644 index 00000000..96076158 --- /dev/null +++ b/S2OJ/2104/data/23.in @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ee5c8b2588b767765a7cdfc30148aa9d577a5f71a3b632aee7f6fec835acd1d5 +size 655007 diff --git a/S2OJ/2104/data/23.out b/S2OJ/2104/data/23.out new file mode 100644 index 00000000..42c91365 --- /dev/null +++ b/S2OJ/2104/data/23.out @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1a191dca2f096d6889b425d26cd5fdbeb7979ac18d3689e19c3f8268e8e9f873 +size 93 diff --git a/S2OJ/2104/data/24.in b/S2OJ/2104/data/24.in new file mode 100644 index 00000000..53f4be02 --- /dev/null +++ b/S2OJ/2104/data/24.in @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:44dc4f44258607656b058285ae17970fef11173c56715e1e6b1995a7d00a33ee +size 855693 diff --git a/S2OJ/2104/data/24.out b/S2OJ/2104/data/24.out new file mode 100644 index 00000000..e875dedf --- /dev/null +++ b/S2OJ/2104/data/24.out @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:74d01a0c051c963d9a9b8ab9dbeab1723f0ad8534ea9fa6a942f358d7fa011b4 +size 3 diff --git a/S2OJ/2104/data/25.in b/S2OJ/2104/data/25.in new file mode 100644 index 00000000..a7cb0f43 --- /dev/null +++ b/S2OJ/2104/data/25.in @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c6f6e9c0f2d6beaeb888d8edc061038c6c08638794b5abba330670eb4ba48463 +size 896046 diff --git a/S2OJ/2104/data/25.out b/S2OJ/2104/data/25.out new file mode 100644 index 00000000..e875dedf --- /dev/null +++ b/S2OJ/2104/data/25.out @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:74d01a0c051c963d9a9b8ab9dbeab1723f0ad8534ea9fa6a942f358d7fa011b4 +size 3 diff --git a/S2OJ/2104/data/3.in b/S2OJ/2104/data/3.in new file mode 100644 index 00000000..dc53e83a --- /dev/null +++ b/S2OJ/2104/data/3.in @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b06db10cf17fc52d69f3ff648595e85fde3112493b8c791295c4ff55801bfe2c +size 7856 diff --git a/S2OJ/2104/data/3.out b/S2OJ/2104/data/3.out new file mode 100644 index 00000000..b447c1c6 --- /dev/null +++ b/S2OJ/2104/data/3.out @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:58e060033f9d1125b27fb2ce87e58f960dbd38d1565407bdfd0e419390c35c76 +size 531 diff --git a/S2OJ/2104/data/4.in b/S2OJ/2104/data/4.in new file mode 100644 index 00000000..c9350c29 --- /dev/null +++ b/S2OJ/2104/data/4.in @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:56bdad14b43568e7d61c8076fbbe1d867d010213bc2531dd910282cc144412b7 +size 9822 diff --git a/S2OJ/2104/data/4.out b/S2OJ/2104/data/4.out new file mode 100644 index 00000000..45b1f63c --- /dev/null +++ b/S2OJ/2104/data/4.out @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ea84f5fc27d68ab07376d35c8ef74ef8ac6533c3046606d305257e3d07809c15 +size 738 diff --git a/S2OJ/2104/data/5.in b/S2OJ/2104/data/5.in new file mode 100644 index 00000000..4ead1798 --- /dev/null +++ b/S2OJ/2104/data/5.in @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e7d98de77605634f9569c3f7f63471cb8eb9dce7a893fabaaf3eff9558fc748f +size 17378 diff --git a/S2OJ/2104/data/5.out b/S2OJ/2104/data/5.out new file mode 100644 index 00000000..4fdec43c --- /dev/null +++ b/S2OJ/2104/data/5.out @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:bc3df40155d506c49200ce647091022e49df82ce15b86aee325f7350f159fa17 +size 14 diff --git a/S2OJ/2104/data/6.in b/S2OJ/2104/data/6.in new file mode 100644 index 00000000..f7e33f4e --- /dev/null +++ b/S2OJ/2104/data/6.in @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:635fe7a42ab32671fc54c9e5ca4402c733cf0633b5448e94768f26a968eb6b15 +size 8362 diff --git a/S2OJ/2104/data/6.out b/S2OJ/2104/data/6.out new file mode 100644 index 00000000..1a2637cd --- /dev/null +++ b/S2OJ/2104/data/6.out @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0852f5591c6992b74abdee80ee90cdceb2ec3d77cb9aff477fdfc0e1ba8b87d4 +size 765 diff --git a/S2OJ/2104/data/7.in b/S2OJ/2104/data/7.in new file mode 100644 index 00000000..0e19d7c9 --- /dev/null +++ b/S2OJ/2104/data/7.in @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:796cf110dd28df3dc7e7ae6bc728c153fcd81d464c67045e34483494cd46ca3f +size 15837 diff --git a/S2OJ/2104/data/7.out b/S2OJ/2104/data/7.out new file mode 100644 index 00000000..22a7156a --- /dev/null +++ b/S2OJ/2104/data/7.out @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5d95c7c73d45775a9cb02b378cd75bf76fc4b6d538378c487135d1ee22617328 +size 11 diff --git a/S2OJ/2104/data/8.in b/S2OJ/2104/data/8.in new file mode 100644 index 00000000..517ecfd4 --- /dev/null +++ b/S2OJ/2104/data/8.in @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e20cb38bde0d6a18c3f976baff719f039c8dfd5af3e7dbb273de4f79246654ec +size 552687 diff --git a/S2OJ/2104/data/8.out b/S2OJ/2104/data/8.out new file mode 100644 index 00000000..6e5651f3 --- /dev/null +++ b/S2OJ/2104/data/8.out @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:372857019fa3cdb3afba3a024a5ef1dce6f7a8a5668ce7d4d260175f71970215 +size 770 diff --git a/S2OJ/2104/data/9.in b/S2OJ/2104/data/9.in new file mode 100644 index 00000000..770e943f --- /dev/null +++ b/S2OJ/2104/data/9.in @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c06920037c27d3d2bfa8bc2b67af9311f38ee9f5917c67bab5ee1cc30c5d36e1 +size 964457 diff --git a/S2OJ/2104/data/9.out b/S2OJ/2104/data/9.out new file mode 100644 index 00000000..e875dedf --- /dev/null +++ b/S2OJ/2104/data/9.out @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:74d01a0c051c963d9a9b8ab9dbeab1723f0ad8534ea9fa6a942f358d7fa011b4 +size 3 diff --git a/S2OJ/2104/data/problem.conf b/S2OJ/2104/data/problem.conf new file mode 100644 index 00000000..14603c46 --- /dev/null +++ b/S2OJ/2104/data/problem.conf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ec7a4bbfb9c4bf02acea418a923fd81457eb8614e1f95b4f3aa28389b0b6801e +size 167 diff --git a/S2OJ/2104/data/std.cpp b/S2OJ/2104/data/std.cpp new file mode 100644 index 00000000..540fe4e2 --- /dev/null +++ b/S2OJ/2104/data/std.cpp @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:dc046441c6b187bd281c87f287e1f1088927cf3b26dd9f093630adfcd9820b7e +size 1382 diff --git a/S2OJ/2104/data/val.cpp b/S2OJ/2104/data/val.cpp new file mode 100644 index 00000000..6bfc3f3f --- /dev/null +++ b/S2OJ/2104/data/val.cpp @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:77c42b58fed95637d40dfc94db9660d072659b5736c32599a8ca1672e744dfee +size 547 diff --git a/S2OJ/2104/resources/gen.cpp b/S2OJ/2104/resources/gen.cpp new file mode 100644 index 00000000..8562452b --- /dev/null +++ b/S2OJ/2104/resources/gen.cpp @@ -0,0 +1,51 @@ +/** + * @file S2OJ/2104/gen.cpp + * @author Baoshuo + * @url https://baoshuo.ren + * @license GPL-3.0 + * @date 2023-03-30 + */ + +#include "testlib.h" + +#include +#include + +using std::cin; +using std::cout; +const char endl = '\n'; + +#define N_TESTS 25 +#define PERCENT_TESTS(_percent) (static_cast(_percent) / 100 * N_TESTS) + +int main(int argc, char* argv[]) { + registerGen(argc, argv, 1); + + int id = opt("id"); + + int min_n = 10000, + max_n = 20000; + int min_m = 50000, + max_m = 100000; + + if (id <= PERCENT_TESTS(30)) { + min_n = 500, max_n = 1000; + min_m = 1000, max_m = 5000; + } else { // all tests + // (none) + } + + int n = rnd.next(min_n, max_n); + int m = rnd.next(min_m, max_m); + + cout << n << ' ' << m << endl; + + for (int i = 1; i <= m; i++) { + int u = rnd.next(1, n); + int v = rnd.next(1, n); + + cout << u << ' ' << v << endl; + } + + return 0; +}