From 92870f31523fecf32e4b982accfdfbc57fc7614c Mon Sep 17 00:00:00 2001 From: Nachia Vivias Date: Sat, 13 Jul 2024 21:31:37 +0900 Subject: [PATCH 1/2] [graph/counting_c4] add problem --- graph/counting_c4/checker.cpp | 62 ++++++++ graph/counting_c4/gen/dense.cpp | 20 +++ graph/counting_c4/gen/erdos_renyi.h | 41 ++++++ graph/counting_c4/gen/example_00.in | 6 + graph/counting_c4/gen/example_01.in | 8 + graph/counting_c4/gen/large_random_simple.cpp | 15 ++ graph/counting_c4/gen/max_complete.cpp | 16 ++ graph/counting_c4/gen/max_near_k_simple.cpp | 58 ++++++++ graph/counting_c4/gen/max_random_simple.cpp | 13 ++ graph/counting_c4/gen/minimum_00.in | 2 + graph/counting_c4/gen/multiplied_c4.cpp | 42 ++++++ graph/counting_c4/gen/small_dense_simple.cpp | 18 +++ graph/counting_c4/gen/small_sparse_simple.cpp | 20 +++ graph/counting_c4/gen/star.cpp | 35 +++++ graph/counting_c4/hash.json | 60 ++++++++ graph/counting_c4/info.toml | 47 ++++++ graph/counting_c4/sol/correct.cpp | 139 ++++++++++++++++++ graph/counting_c4/sol/naive.cpp | 47 ++++++ graph/counting_c4/task.md | 45 ++++++ graph/counting_c4/verifier.cpp | 24 +++ 20 files changed, 718 insertions(+) create mode 100644 graph/counting_c4/checker.cpp create mode 100644 graph/counting_c4/gen/dense.cpp create mode 100644 graph/counting_c4/gen/erdos_renyi.h create mode 100644 graph/counting_c4/gen/example_00.in create mode 100644 graph/counting_c4/gen/example_01.in create mode 100644 graph/counting_c4/gen/large_random_simple.cpp create mode 100644 graph/counting_c4/gen/max_complete.cpp create mode 100644 graph/counting_c4/gen/max_near_k_simple.cpp create mode 100644 graph/counting_c4/gen/max_random_simple.cpp create mode 100644 graph/counting_c4/gen/minimum_00.in create mode 100644 graph/counting_c4/gen/multiplied_c4.cpp create mode 100644 graph/counting_c4/gen/small_dense_simple.cpp create mode 100644 graph/counting_c4/gen/small_sparse_simple.cpp create mode 100644 graph/counting_c4/gen/star.cpp create mode 100644 graph/counting_c4/hash.json create mode 100644 graph/counting_c4/info.toml create mode 100644 graph/counting_c4/sol/correct.cpp create mode 100644 graph/counting_c4/sol/naive.cpp create mode 100644 graph/counting_c4/task.md create mode 100644 graph/counting_c4/verifier.cpp diff --git a/graph/counting_c4/checker.cpp b/graph/counting_c4/checker.cpp new file mode 100644 index 000000000..6a66d5330 --- /dev/null +++ b/graph/counting_c4/checker.cpp @@ -0,0 +1,62 @@ +// https://github.com/MikeMirzayanov/testlib/blob/master/checkers/wcmp.cpp + +// The MIT License (MIT) + +// Copyright (c) 2015 Mike Mirzayanov + +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: + +// The above copyright notice and this permission notice shall be included in all +// copies or substantial portions of the Software. + +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +// SOFTWARE. + +#include "testlib.h" + +using namespace std; + +int main(int argc, char * argv[]) +{ + setName("compare sequences of tokens"); + registerTestlibCmd(argc, argv); + + int n = 0; + string j, p; + + while (!ans.seekEof() && !ouf.seekEof()) + { + n++; + + ans.readWordTo(j); + ouf.readWordTo(p); + + if (j != p) + quitf(_wa, "%d%s words differ - expected: '%s', found: '%s'", n, englishEnding(n).c_str(), compress(j).c_str(), compress(p).c_str()); + } + + if (ans.seekEof() && ouf.seekEof()) + { + if (n == 1) + quitf(_ok, "\"%s\"", compress(j).c_str()); + else + quitf(_ok, "%d tokens", n); + } + else + { + if (ans.seekEof()) + quitf(_wa, "Participant output contains extra tokens"); + else + quitf(_wa, "Unexpected EOF in the participants output"); + } +} diff --git a/graph/counting_c4/gen/dense.cpp b/graph/counting_c4/gen/dense.cpp new file mode 100644 index 000000000..13bf0c741 --- /dev/null +++ b/graph/counting_c4/gen/dense.cpp @@ -0,0 +1,20 @@ +#include "../params.h" +#include "random.h" +#include + +int main(int, char **argv) { + long long seed = atoll(argv[1]); + auto gen = Random(seed); + + int n = 10; + int m = M_MAX; + + std::printf("%d %d\n", n, m); + + for(int i=0; i +#include +#include +#include +#include +#include + +void erdos_renyi(int n, int m, Random &gen) { + assert(static_cast(n) * (n - 1) / 2 >= m); + + std::vector> edges(m); + if (static_cast(n) * (n - 1) / 2 > m * 2) { + // sparse + std::set> eset; + for (auto &e : edges) { + do { + e = gen.uniform_pair(0, n - 1); + } while (!eset.insert(std::minmax(e.first, e.second)).second); + } + } else { + // dense + std::vector> all; + for (int u = 0; u < n; ++u) { + for (int v = 0; v < u; ++v) { + if (gen.uniform_bool()) { + all.emplace_back(u, v); + } else { + all.emplace_back(v, u); + } + } + } + gen.shuffle(all.begin(), all.end()); + std::copy(all.begin(), all.begin() + m, edges.begin()); + } + + std::printf("%d %d\n", n, m); + for (const auto &e : edges) { + std::printf("%d %d\n", e.first, e.second); + } +} diff --git a/graph/counting_c4/gen/example_00.in b/graph/counting_c4/gen/example_00.in new file mode 100644 index 000000000..3aeeedf28 --- /dev/null +++ b/graph/counting_c4/gen/example_00.in @@ -0,0 +1,6 @@ +4 5 +0 3 +2 0 +2 1 +2 3 +1 3 diff --git a/graph/counting_c4/gen/example_01.in b/graph/counting_c4/gen/example_01.in new file mode 100644 index 000000000..3b39aba22 --- /dev/null +++ b/graph/counting_c4/gen/example_01.in @@ -0,0 +1,8 @@ +4 7 +0 1 +0 1 +0 1 +0 3 +0 3 +1 2 +2 3 diff --git a/graph/counting_c4/gen/large_random_simple.cpp b/graph/counting_c4/gen/large_random_simple.cpp new file mode 100644 index 000000000..b4d9f77dd --- /dev/null +++ b/graph/counting_c4/gen/large_random_simple.cpp @@ -0,0 +1,15 @@ +#include "../params.h" +#include "./erdos_renyi.h" +#include "random.h" +#include + +int main(int, char **argv) { + long long seed = atoll(argv[1]); + auto gen = Random(seed); + + int n = gen.uniform(N_MIN, N_MAX); + int m = gen.uniform( + M_MIN, std::min(M_MAX, static_cast(n) * (n - 1) / 2)); + + erdos_renyi(n, m, gen); +} diff --git a/graph/counting_c4/gen/max_complete.cpp b/graph/counting_c4/gen/max_complete.cpp new file mode 100644 index 000000000..ce1a544a6 --- /dev/null +++ b/graph/counting_c4/gen/max_complete.cpp @@ -0,0 +1,16 @@ +#include "../params.h" +#include "./erdos_renyi.h" +#include "random.h" + +int main(int, char **argv) { + long long seed = atoll(argv[1]); + auto gen = Random(seed); + + int n = N_MIN; + while (n < N_MAX && n * (n + 1) / 2 <= M_MAX) { + n += 1; + } + int m = n * (n - 1) / 2; + + erdos_renyi(n, m, gen); +} diff --git a/graph/counting_c4/gen/max_near_k_simple.cpp b/graph/counting_c4/gen/max_near_k_simple.cpp new file mode 100644 index 000000000..3461c169c --- /dev/null +++ b/graph/counting_c4/gen/max_near_k_simple.cpp @@ -0,0 +1,58 @@ +#include "../params.h" +#include "random.h" +#include +#include +#include +#include + +std::vector generate_phase(int n, int k){ + std::vector nph; + for(int t=0; t= m) break; + } + + auto nph = generate_phase(n, k); + std::vector beg_phase(k+1); + for(int t=0; t> edges; + for(int t=0; t +#include +#include + +int main(int, char **argv) { + long long seed = atoll(argv[1]); + auto gen = Random(seed); + + int n = N_MAX; + int m = M_MAX; + + // seed 0 : divide equally + // seed 1 : divide randomly + + auto sp = gen.choice(3, 1, m-1); + if(seed == 0){ + sp[0] = m / 4; + sp[1] = m * 2 / 4; + sp[2] = m * 3 / 4; + } + auto nodes = gen.choice(4, 0, n-1); + + std::vector> edges; + for(int i=0; i(N_MIN, N_MAX_2); + int m = gen.uniform(M_MIN, n * (n - 1) / 2); + + erdos_renyi(n, m, gen); +} diff --git a/graph/counting_c4/gen/small_sparse_simple.cpp b/graph/counting_c4/gen/small_sparse_simple.cpp new file mode 100644 index 000000000..b3a9c55c8 --- /dev/null +++ b/graph/counting_c4/gen/small_sparse_simple.cpp @@ -0,0 +1,20 @@ +#include "../params.h" +#include "./erdos_renyi.h" +#include "random.h" +#include + +int main(int, char **argv) { + long long seed = atoll(argv[1]); + auto gen = Random(seed); + + int N_MAX_2 = 1; + while (N_MAX_2 < N_MAX && N_MAX_2 * (N_MAX_2 + 1) / 2 <= M_MAX) { + N_MAX_2 += 1; + } + + int n = gen.uniform(N_MIN, N_MAX_2); + int m = + gen.uniform(M_MIN, std::min({M_MAX, n * 2, n * (n - 1) / 2})); + + erdos_renyi(n, m, gen); +} diff --git a/graph/counting_c4/gen/star.cpp b/graph/counting_c4/gen/star.cpp new file mode 100644 index 000000000..944de7885 --- /dev/null +++ b/graph/counting_c4/gen/star.cpp @@ -0,0 +1,35 @@ +#include "../params.h" +#include "random.h" +#include +#include +#include + +int main(int, char **argv) { + long long seed = atoll(argv[1]); + auto gen = Random(seed); + + int n = std::min(N_MAX, M_MAX + 1); + int m = n - 1; + + int center = gen.uniform(0, n - 1); + + std::vector> edges; + for (int i = 0; i < n; ++i) { + if (i != center) { + edges.emplace_back(center, i); + } + } + + for (auto &e : edges) { + if (gen.uniform_bool()) { + std::swap(e.first, e.second); + } + } + + gen.shuffle(edges.begin(), edges.end()); + + std::printf("%d %d\n", n, m); + for (const auto &e : edges) { + std::printf("%d %d\n", e.first, e.second); + } +} diff --git a/graph/counting_c4/hash.json b/graph/counting_c4/hash.json new file mode 100644 index 000000000..72c852ac8 --- /dev/null +++ b/graph/counting_c4/hash.json @@ -0,0 +1,60 @@ +{ + "dense_00.in": "e094020e96b98962eb929388c46421334b09c734cea8995af39b5f87b245977e", + "dense_00.out": "7d97f03351ee77d5301238323b9a328b03f0c8f6c384a7323660daccf6d96142", + "dense_01.in": "9988c9cef78e20ceec57aa49319381b6053660dbc9fc462c170fb0b90f8506b2", + "dense_01.out": "a993386deda82be497fa2ccfe1d4ff1afca8856bd52a2c13f02e5ef3792c8397", + "dense_02.in": "087cb8df79855a4fae2d7f60f3126b8ff42d5a975c3e01a669b6c6b833c0439c", + "dense_02.out": "98b75020089d1d03b652a892124842dd0aa40f82a50203a854c24325c69ba770", + "dense_03.in": "ae3be9059e3bbf481671496fb3fc37e897ca438de46d14591099a3abed715083", + "dense_03.out": "59696fcce2ddcf9bb625c22bcd26af748d0e214236027c1d7bdff3481a8cdb68", + "dense_04.in": "03672372e216fadee5b088d757428c4006875d8806e4569e8b84eabf93eda86f", + "dense_04.out": "c3e749357d8b72cb2984b71e37a9a7a17db5a79bb15dfa6e4a4113198f2fc0c0", + "example_00.in": "cc57432262a7d38b259e2fb989aedfda116c5d57dd0ca80b2d5efc3bcceb3784", + "example_00.out": "4d63f406a3bcef559f00b5f813653f1af9df3aa68b74a7ffeb807a6aac50e4b5", + "example_01.in": "bfa92308133a7d4e3243715928f76308b2558be73b2b04003c48b55984e843e8", + "example_01.out": "dba632e9f3ed534062fc9cb1baa9359e6793be03ee7763ec77144b3f829f6d50", + "large_random_simple_00.in": "44cb27620d64b62f047ba8f8a423dbed80acfa23cd59e93cf54224cbf9b61723", + "large_random_simple_00.out": "d36652df2526a4c7138dfee0c223cf920ef62ca7e15ada504c47f55f6d7b2ad1", + "large_random_simple_01.in": "9e64f63c2dbfb9f690672c05526a430ef84f916176e9a623c5abf1449078487a", + "large_random_simple_01.out": "548a36dea177236cf83a5f64891953e0a2e3ff1e9d86c3accab157d5a2fcc1f3", + "large_random_simple_02.in": "d26fa7116f774d95d2e7d99369cc7b3f0a5cfacee7199b305e186233846fc191", + "large_random_simple_02.out": "238d4004061ef66946c03f90ad41b4843df66341ed8d7db5b45863a1954865a4", + "max_complete_00.in": "faa8f55ece1e03c5bbf84c0dd3ffb666311da65bff1fabe845efdf87c41f8f67", + "max_complete_00.out": "7d7afb1647bbf969f458cffc99ef56ce01371df76c18427a655ccfbb925d35d9", + "max_near_k_simple_00.in": "5a30f2b4749da5b232f4935c48da94313fda3eb98d14c0bfc1ca5eba50bb6c30", + "max_near_k_simple_00.out": "032f8bd34e76f3d2fd5015501b7be8a6899b834aae2cfc34b47c29868047407c", + "max_near_k_simple_01.in": "ecff5afd66e8cd61c99e00ad271fcb0840c1aa4707408643efa590d00c10e961", + "max_near_k_simple_01.out": "868fdfba76941e275f75854f19e55cd026c359084f4d20204b69f72f8b183c4a", + "max_near_k_simple_02.in": "64a2231ec062d81879e3bb324f95c46f6f288988fb56ce7f9915e3a594f096e0", + "max_near_k_simple_02.out": "84c7fadb836a1991e18a952a493f81490afe2865fcc458d50f9606f43274ba32", + "max_near_k_simple_03.in": "d0c92cf80129a01bd54e4d0e2ca70b6379395c2b5c350355ca526e0358414865", + "max_near_k_simple_03.out": "f90d691355122301132562a2a6f880cb5fcb82c8d6a09916c7d85772da3b8a0b", + "max_random_simple_00.in": "6d62e0a770f55545c6cbc2a72a79daf29594dac81bec7f5d7a8ce91f3bf59a4c", + "max_random_simple_00.out": "199cd45e48fed339ae19915bc06dac09c089d05422c4d446561194310e97cc89", + "max_random_simple_01.in": "1698c470864ad106b0966c9783c889dcaed99e7988036d20436b40786124ee1e", + "max_random_simple_01.out": "9751a557d208ce9093dbffb930c98b4a51bec37659b8765ccc0ac71a1695d695", + "max_random_simple_02.in": "1542361e07db5072604b0e4deea51869b38bc4181b3846db52953d884ea792ae", + "max_random_simple_02.out": "9751a557d208ce9093dbffb930c98b4a51bec37659b8765ccc0ac71a1695d695", + "minimum_00.in": "4a6ae7226283a4b6277ce3e77a91585c0cad93929046f3c7bd9105d7ed101834", + "minimum_00.out": "9a271f2a916b0b6ee6cecb2426f0b3206ef074578be55d9bc94f6f3fe3ab86aa", + "multiplied_c4_00.in": "ac20ac463708fff6b2ae74ab072ddd801d807b0e99444b41ddd20f8ac17ae4f0", + "multiplied_c4_00.out": "fb609cbf127b3b57d5a37db729a4c06fb739fd38314aada9930fd4837ae11205", + "multiplied_c4_01.in": "d89740ef8722439394989088d2eb56153cb27878fef7b5bf0baa57b33b63e3f1", + "multiplied_c4_01.out": "76c1472c0ebe10d2692d74ec0eb829026c630f33f7a610ab5c886e55c34a1a87", + "small_dense_simple_00.in": "4026e5c3c70e13a13fcb6822fa1ea5740a522036b6330f530823fcebed6a785b", + "small_dense_simple_00.out": "bf5de309d2f5082675cb5cc72cca04dc11ec0b64dc59e7cff4749ffd49acec23", + "small_dense_simple_01.in": "e2c872ad4f3be89102459c3a723591906c20e61e90b2717df2342cd6899b7b34", + "small_dense_simple_01.out": "f4fa3e67247b138fb01ef342d0ba569c5a8933845f08934380e7e1d1ba2cc4eb", + "small_dense_simple_02.in": "7327e34632e7fc581c6b8cbe102c2e3f9724ea8e538587707122df6f53a22f62", + "small_dense_simple_02.out": "f4f5b0750d196dc875594cd91cd2f1fc21f2acf2487ce8aac024f8631bc7037c", + "small_sparse_simple_00.in": "2ac3dae959ad57452a968dd7cc52b15c27e61e74c74b9de77c09dab157e14006", + "small_sparse_simple_00.out": "3c9752241fd367167acb485d31e21ae10c16f45ea5afda3a139761aac6456fbd", + "small_sparse_simple_01.in": "b9bf6eaf04589a863ddeb01bad2476201d2f65d24a97119124d6f3cb2334601d", + "small_sparse_simple_01.out": "72bfe168435d32a0ecc4a907c1eb5aaf92eba8ad63f5087c0fb5a40dab0467ba", + "small_sparse_simple_02.in": "5a01175d6c3f45d92f67acf75619e19d779251229b85dda1981f74d6f9b33935", + "small_sparse_simple_02.out": "afde75fab8c06d89460032f59a7d28d8684d93d8006d2e120727c1e7c075c9ad", + "star_00.in": "789d728a7dc148dcac46e927ead606f1d3aeb1f5930bca3cbf428f1adf56742f", + "star_00.out": "3f213530dc3b6d43b2cee656c9e8f61037a3872c4c6b93781b91f30837f15cb1", + "star_01.in": "14ab39e690b81115380a89f1e93e1d15275b3dd850b196cdc86a173c6175f9da", + "star_01.out": "3f213530dc3b6d43b2cee656c9e8f61037a3872c4c6b93781b91f30837f15cb1" +} \ No newline at end of file diff --git a/graph/counting_c4/info.toml b/graph/counting_c4/info.toml new file mode 100644 index 000000000..f967c0ace --- /dev/null +++ b/graph/counting_c4/info.toml @@ -0,0 +1,47 @@ +title = "Counting $C _ 4$'s" +timelimit = 10.0 +forum = "https://github.com/yosupo06/library-checker-problems/issues/973" + +[[tests]] + name = "example.in" + number = 2 +[[tests]] + name = "minimum.in" + number = 1 +[[tests]] + name = "small_sparse_simple.cpp" + number = 3 +[[tests]] + name = "small_dense_simple.cpp" + number = 3 +[[tests]] + name = "large_random_simple.cpp" + number = 3 +[[tests]] + name = "max_random_simple.cpp" + number = 3 +[[tests]] + name = "star.cpp" + number = 2 +[[tests]] + name = "max_near_k_simple.cpp" + number = 4 +[[tests]] + name = "max_complete.cpp" + number = 1 +[[tests]] + name = "multiplied_c4.cpp" + number = 2 +[[tests]] + name = "dense.cpp" + number = 5 + +[[solutions]] + name = "naive.cpp" + expect = "TLE" + +[params] + N_MIN = 1 + N_MAX = 300000 + M_MIN = 1 + M_MAX = 300000 diff --git a/graph/counting_c4/sol/correct.cpp b/graph/counting_c4/sol/correct.cpp new file mode 100644 index 000000000..e53c4057b --- /dev/null +++ b/graph/counting_c4/sol/correct.cpp @@ -0,0 +1,139 @@ +#include +#include +#include +#include +#include + +// simple graph +// for each edge +// O( n + m sqrt(m) ) time +std::vector CountC4Simple( + int n, + std::vector U, + std::vector V, + std::vector W +){ + int m = int(W.size()); + + // less incident edges, smaller index + std::vector deg(n); + for(int e=0; e I(n); for(int i=0; i O(n); + for(int i=0; i estart(n); + for(int i=0; i eend = estart; + std::vector eid(m*2); + std::vector eto(m*2); + + for(int e=0; e eendx = eend; + for(int v=0; v c(n); // c[x] : number of paths(v --> w --> x) + std::vector ans(m); + for(int v=n-1; v>=0; v--){ + for(int i=estart[v]; i v + for(int j=estart[w]; j CountC4( + int n, + std::vector U, + std::vector V, + std::vector W +){ + int m = int(W.size()); + for(int i=0; i V[i]) std::swap(U[i], V[i]); + std::vector I(m); + for(int i=0; i Q(m); + std::vector U2; + std::vector V2; + std::vector W2; + for(int i=0; i ans(m); + for(int e=0; e U(M), V(M); + for(int i=0; i(M, 1)); + for(int i=0; i +#include +#include +#include +#include +using namespace std; + +int main(){ + int N, M; scanf("%d%d", &N, &M); + std::vector U(M), V(M); + for(int i=0; i V[i]) std::swap(U[i], V[i]); + std::vector ans(M); + int D[8] = {}; + for(int i=0; i +#include +#include + +int main() { + registerValidation(); + + int n = inf.readInt(N_MIN, N_MAX); + inf.readSpace(); + int m = inf.readInt(M_MIN, M_MAX); + inf.readChar('\n'); + + for (int i = 0; i < m; ++i) { + int u = inf.readInt(0, n - 1); + inf.readSpace(); + int v = inf.readInt(0, n - 1); + inf.readChar('\n'); + ensure(u != v); + } + + inf.readEof(); +} From 5be08b42faca27c0a40825a6f28ede4b0ed807f4 Mon Sep 17 00:00:00 2001 From: NachiaVivias Date: Mon, 4 Nov 2024 22:16:59 +0900 Subject: [PATCH 2/2] [graph/counting_c4] apply review comment --- graph/counting_c4/hash.json | 36 ++++++++++++++++++------------------ graph/counting_c4/info.toml | 2 +- graph/counting_c4/task.md | 2 +- 3 files changed, 20 insertions(+), 20 deletions(-) diff --git a/graph/counting_c4/hash.json b/graph/counting_c4/hash.json index 72c852ac8..12b9c13a5 100644 --- a/graph/counting_c4/hash.json +++ b/graph/counting_c4/hash.json @@ -13,12 +13,12 @@ "example_00.out": "4d63f406a3bcef559f00b5f813653f1af9df3aa68b74a7ffeb807a6aac50e4b5", "example_01.in": "bfa92308133a7d4e3243715928f76308b2558be73b2b04003c48b55984e843e8", "example_01.out": "dba632e9f3ed534062fc9cb1baa9359e6793be03ee7763ec77144b3f829f6d50", - "large_random_simple_00.in": "44cb27620d64b62f047ba8f8a423dbed80acfa23cd59e93cf54224cbf9b61723", - "large_random_simple_00.out": "d36652df2526a4c7138dfee0c223cf920ef62ca7e15ada504c47f55f6d7b2ad1", - "large_random_simple_01.in": "9e64f63c2dbfb9f690672c05526a430ef84f916176e9a623c5abf1449078487a", - "large_random_simple_01.out": "548a36dea177236cf83a5f64891953e0a2e3ff1e9d86c3accab157d5a2fcc1f3", - "large_random_simple_02.in": "d26fa7116f774d95d2e7d99369cc7b3f0a5cfacee7199b305e186233846fc191", - "large_random_simple_02.out": "238d4004061ef66946c03f90ad41b4843df66341ed8d7db5b45863a1954865a4", + "large_random_simple_00.in": "14b5d1a028977df03661e2520c683cc2037ce61fd6268fad52400fce2cc14da0", + "large_random_simple_00.out": "70136d4393178036e3758ed994292ba81c24954f731ec06545645e5adcdf0063", + "large_random_simple_01.in": "faced67b3643dd0254c6b4556b2098f18d0eeec145a9f3dc6b645ff8ccf5cd93", + "large_random_simple_01.out": "51f88c18bae2d1c7c2c0aa9dee11d4d8deb31aac6dd64aa7c1bbb5ab14c13900", + "large_random_simple_02.in": "86e4fd47363100ef342e583f8a7e61a199cf804223e175e95802b44ddcf57aee", + "large_random_simple_02.out": "3e2062a317a352cc85454945b084a8d5932c1880815a8eb64f712cab519a62b8", "max_complete_00.in": "faa8f55ece1e03c5bbf84c0dd3ffb666311da65bff1fabe845efdf87c41f8f67", "max_complete_00.out": "7d7afb1647bbf969f458cffc99ef56ce01371df76c18427a655ccfbb925d35d9", "max_near_k_simple_00.in": "5a30f2b4749da5b232f4935c48da94313fda3eb98d14c0bfc1ca5eba50bb6c30", @@ -41,18 +41,18 @@ "multiplied_c4_00.out": "fb609cbf127b3b57d5a37db729a4c06fb739fd38314aada9930fd4837ae11205", "multiplied_c4_01.in": "d89740ef8722439394989088d2eb56153cb27878fef7b5bf0baa57b33b63e3f1", "multiplied_c4_01.out": "76c1472c0ebe10d2692d74ec0eb829026c630f33f7a610ab5c886e55c34a1a87", - "small_dense_simple_00.in": "4026e5c3c70e13a13fcb6822fa1ea5740a522036b6330f530823fcebed6a785b", - "small_dense_simple_00.out": "bf5de309d2f5082675cb5cc72cca04dc11ec0b64dc59e7cff4749ffd49acec23", - "small_dense_simple_01.in": "e2c872ad4f3be89102459c3a723591906c20e61e90b2717df2342cd6899b7b34", - "small_dense_simple_01.out": "f4fa3e67247b138fb01ef342d0ba569c5a8933845f08934380e7e1d1ba2cc4eb", - "small_dense_simple_02.in": "7327e34632e7fc581c6b8cbe102c2e3f9724ea8e538587707122df6f53a22f62", - "small_dense_simple_02.out": "f4f5b0750d196dc875594cd91cd2f1fc21f2acf2487ce8aac024f8631bc7037c", - "small_sparse_simple_00.in": "2ac3dae959ad57452a968dd7cc52b15c27e61e74c74b9de77c09dab157e14006", - "small_sparse_simple_00.out": "3c9752241fd367167acb485d31e21ae10c16f45ea5afda3a139761aac6456fbd", - "small_sparse_simple_01.in": "b9bf6eaf04589a863ddeb01bad2476201d2f65d24a97119124d6f3cb2334601d", - "small_sparse_simple_01.out": "72bfe168435d32a0ecc4a907c1eb5aaf92eba8ad63f5087c0fb5a40dab0467ba", - "small_sparse_simple_02.in": "5a01175d6c3f45d92f67acf75619e19d779251229b85dda1981f74d6f9b33935", - "small_sparse_simple_02.out": "afde75fab8c06d89460032f59a7d28d8684d93d8006d2e120727c1e7c075c9ad", + "small_dense_simple_00.in": "e049cbd4560b5794bed7ed257b7c570e37fc936e8c9d90553d2792b5063ca8ad", + "small_dense_simple_00.out": "65c33e5a8e23ad3ae3e9eedcad670361503601de3a43b846b1811e0e24e52ced", + "small_dense_simple_01.in": "234a9d7a84baa31ed908778a29b3ead196bd52881ccccd588565b7e680ea12b3", + "small_dense_simple_01.out": "b668cc0d1b8251a9d772668a939a446d56f4b1d94a7035d774d87eec42f9d38f", + "small_dense_simple_02.in": "ed9240ab3d7d86404e7204e5ff9cc2588cf37a9d88956f7f95957cb67745651c", + "small_dense_simple_02.out": "a99bffd672da98017ed2415b821da94aba4f22dc0252780cd55c0d4fce7aece4", + "small_sparse_simple_00.in": "bc90cd416ca69b7f3357b0b2180ddb546eb42f1ed32afd85c6fb6ba0fafbac22", + "small_sparse_simple_00.out": "b5589774c732a33c2415ba1c9020f43e7acb9696c5dd40846bb204a97895a553", + "small_sparse_simple_01.in": "a7d64c2ed5f3ee6b7572b2a7d68f30335ef493950fc97adae2f18913d95172b5", + "small_sparse_simple_01.out": "0017d9f8d3bdf9e95de189cfffe3e1040b8207ef8264632eaa25c68a83da0192", + "small_sparse_simple_02.in": "4ebc3a3c2af8505fa07beab03f0ae081ad9df9bfcc715f171422fbda60a2ea80", + "small_sparse_simple_02.out": "fd9c3768851f7f1c300836f563d41cafc56909cd8d7fbe65e04e7f85c457a1cc", "star_00.in": "789d728a7dc148dcac46e927ead606f1d3aeb1f5930bca3cbf428f1adf56742f", "star_00.out": "3f213530dc3b6d43b2cee656c9e8f61037a3872c4c6b93781b91f30837f15cb1", "star_01.in": "14ab39e690b81115380a89f1e93e1d15275b3dd850b196cdc86a173c6175f9da", diff --git a/graph/counting_c4/info.toml b/graph/counting_c4/info.toml index f967c0ace..8fef6ffa7 100644 --- a/graph/counting_c4/info.toml +++ b/graph/counting_c4/info.toml @@ -41,7 +41,7 @@ forum = "https://github.com/yosupo06/library-checker-problems/issues/973" expect = "TLE" [params] - N_MIN = 1 + N_MIN = 2 N_MAX = 300000 M_MIN = 1 M_MAX = 300000 diff --git a/graph/counting_c4/task.md b/graph/counting_c4/task.md index e8a40eabd..cd3005f6a 100644 --- a/graph/counting_c4/task.md +++ b/graph/counting_c4/task.md @@ -35,7 +35,7 @@ $u _ {M-1}$ $v _ {M-1}$ ## @{keyword.output} ``` -$A _ 0$ $A _ 1$ $\cdots$ $A _ {N-1}$ +$A _ 0$ $A _ 1$ $\cdots$ $A _ {M-1}$ ``` ## @{keyword.sample}