From 292af3b93a9936f6b5b49470fcab941b192bcdcd Mon Sep 17 00:00:00 2001 From: maspypy Date: Sun, 1 Sep 2024 00:38:32 +0900 Subject: [PATCH] add test --- graph/assignment/gen/multiplication_table.cpp | 23 +++++++++++++++++++ graph/assignment/hash.json | 2 ++ graph/assignment/info.toml | 4 ++++ 3 files changed, 29 insertions(+) create mode 100644 graph/assignment/gen/multiplication_table.cpp diff --git a/graph/assignment/gen/multiplication_table.cpp b/graph/assignment/gen/multiplication_table.cpp new file mode 100644 index 000000000..deae3e21f --- /dev/null +++ b/graph/assignment/gen/multiplication_table.cpp @@ -0,0 +1,23 @@ +#include +#include +#include "../params.h" + +using namespace std; + +int main() { + int n = N_MAX; + vector> a(n, vector(n)); + for (int i = 0; i < n; i++) { + for (int j = 0; j < n; j++) { a[i][j] = (1 + i) * (1 + j); } + } + + printf("%d\n", n); + for (int i = 0; i < n; i++) { + for (int j = 0; j < n; j++) { + printf("%d", a[i][j]); + if (j != n - 1) printf(" "); + } + printf("\n"); + } + return 0; +} diff --git a/graph/assignment/hash.json b/graph/assignment/hash.json index 4c2dfe57d..b58ec3ea2 100644 --- a/graph/assignment/hash.json +++ b/graph/assignment/hash.json @@ -15,6 +15,8 @@ "max_random_03.out": "c872eda2dde7618e8da61d78605bd7c4be6418fc95b6f75aa8bd264529cc35ea", "max_random_04.in": "d73f73c804194f30843cf8a53657c3dfd13169351e481a63f0ba9a5098766d18", "max_random_04.out": "fa4fe6fcbb4c1eb082c04eacc9706ef857f5d41039bb9f09e764624c5e563e2a", + "multiplication_table_00.in": "d36a43718ebe8f3699ba5f395963b6124d8aa90109e01e6beffcbfc9d3c11f96", + "multiplication_table_00.out": "a5b217a1b663912f393b10f642845e80ecd9c32d14cea2f5f026cf89d735b346", "random_00.in": "eea2789c3c26f96aee5317ce8c510b3db643a58a1ea1c86dc10edd760f184bcb", "random_00.out": "18ea26f96bfb3dd293e676649abfc21837889f7d538de02dc6289699d6b05c4a", "random_01.in": "37859b964265e2fe2333f8e013d1786e12803a10f8dbfba60e3e51de22958805", diff --git a/graph/assignment/info.toml b/graph/assignment/info.toml index accc62ef4..17fbee560 100644 --- a/graph/assignment/info.toml +++ b/graph/assignment/info.toml @@ -22,6 +22,10 @@ forum = "https://github.com/yosupo06/library-checker-problems/issues/38" name = "hand_minus.cpp" number = 1 +[[tests]] + name = "multiplication_table.cpp" + number = 1 + [[solutions]] name = 'invalid.cpp' expect = "WA"