From 7fd28acab2d8acca27438251e0533a9190fc5b4d Mon Sep 17 00:00:00 2001 From: Baoshuo Date: Wed, 19 Oct 2022 22:06:03 +0800 Subject: [PATCH] =?UTF-8?q?#1665.=20=E3=80=902022.10.19=20=E8=81=94?= =?UTF-8?q?=E8=80=83=E3=80=91=E6=8E=92=E5=88=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit https://sjzezoj.com/submission/61143 --- S2OJ/1665/1665.cpp | 48 ++++++++++++++++++++++++++++++++ S2OJ/1665/data/permutation1.in | 3 ++ S2OJ/1665/data/permutation1.out | 3 ++ S2OJ/1665/data/permutation10.in | 3 ++ S2OJ/1665/data/permutation10.out | 3 ++ S2OJ/1665/data/permutation2.in | 3 ++ S2OJ/1665/data/permutation2.out | 3 ++ S2OJ/1665/data/permutation3.in | 3 ++ S2OJ/1665/data/permutation3.out | 3 ++ S2OJ/1665/data/permutation4.in | 3 ++ S2OJ/1665/data/permutation4.out | 3 ++ S2OJ/1665/data/permutation5.in | 3 ++ S2OJ/1665/data/permutation5.out | 3 ++ S2OJ/1665/data/permutation6.in | 3 ++ S2OJ/1665/data/permutation6.out | 3 ++ S2OJ/1665/data/permutation7.in | 3 ++ S2OJ/1665/data/permutation7.out | 3 ++ S2OJ/1665/data/permutation8.in | 3 ++ S2OJ/1665/data/permutation8.out | 3 ++ S2OJ/1665/data/permutation9.in | 3 ++ S2OJ/1665/data/permutation9.out | 3 ++ S2OJ/1665/data/problem.conf | 3 ++ 22 files changed, 111 insertions(+) create mode 100644 S2OJ/1665/1665.cpp create mode 100644 S2OJ/1665/data/permutation1.in create mode 100644 S2OJ/1665/data/permutation1.out create mode 100644 S2OJ/1665/data/permutation10.in create mode 100644 S2OJ/1665/data/permutation10.out create mode 100644 S2OJ/1665/data/permutation2.in create mode 100644 S2OJ/1665/data/permutation2.out create mode 100644 S2OJ/1665/data/permutation3.in create mode 100644 S2OJ/1665/data/permutation3.out create mode 100644 S2OJ/1665/data/permutation4.in create mode 100644 S2OJ/1665/data/permutation4.out create mode 100644 S2OJ/1665/data/permutation5.in create mode 100644 S2OJ/1665/data/permutation5.out create mode 100644 S2OJ/1665/data/permutation6.in create mode 100644 S2OJ/1665/data/permutation6.out create mode 100644 S2OJ/1665/data/permutation7.in create mode 100644 S2OJ/1665/data/permutation7.out create mode 100644 S2OJ/1665/data/permutation8.in create mode 100644 S2OJ/1665/data/permutation8.out create mode 100644 S2OJ/1665/data/permutation9.in create mode 100644 S2OJ/1665/data/permutation9.out create mode 100644 S2OJ/1665/data/problem.conf diff --git a/S2OJ/1665/1665.cpp b/S2OJ/1665/1665.cpp new file mode 100644 index 00000000..f6a21fe8 --- /dev/null +++ b/S2OJ/1665/1665.cpp @@ -0,0 +1,48 @@ +#include + +using std::cin; +using std::cout; +const char endl = '\n'; + +const int N = 1e6 + 5; +const int mod = 1e9 + 7; + +int n; +long long f[N], ans; + +int main() { + std::ios::sync_with_stdio(false); + cin.tie(nullptr); + + cin >> n; + + if (n == 1) { + cout << 1 << endl; + + exit(0); + } + + f[1] = 1; + + for (int j = 1; j < n; j++) { + if (j <= 3) { + for (int i = j + 1; i < n; i++) { + f[i] = (f[i] + f[j]) % mod; + } + } else { + for (int k = -1; k <= 1; k++) { + for (int i = j + k; i < n; i += j) { + if (j < i) f[i] = (f[i] + f[j]) % mod; + } + } + } + } + + for (int i = 1; i < n; i++) { + ans = (ans + f[i]) % mod; + } + + cout << ans * n % mod << endl; + + return 0; +} diff --git a/S2OJ/1665/data/permutation1.in b/S2OJ/1665/data/permutation1.in new file mode 100644 index 00000000..f4808fee --- /dev/null +++ b/S2OJ/1665/data/permutation1.in @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:917df3320d778ddbaa5c5c7742bc4046bf803c36ed2b050f30844ed206783469 +size 3 diff --git a/S2OJ/1665/data/permutation1.out b/S2OJ/1665/data/permutation1.out new file mode 100644 index 00000000..7d650d15 --- /dev/null +++ b/S2OJ/1665/data/permutation1.out @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3c1636261e71d475f64bab6ca440abada65104a04dc48e9bd7c05740e26609fd +size 5 diff --git a/S2OJ/1665/data/permutation10.in b/S2OJ/1665/data/permutation10.in new file mode 100644 index 00000000..56b15465 --- /dev/null +++ b/S2OJ/1665/data/permutation10.in @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2c69ffaa2ccdba358f9000d08b1c0a0c4b09054a78ecbbeb8d39959732a39e39 +size 7 diff --git a/S2OJ/1665/data/permutation10.out b/S2OJ/1665/data/permutation10.out new file mode 100644 index 00000000..cf784422 --- /dev/null +++ b/S2OJ/1665/data/permutation10.out @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:494d852b61161b8a04fc6b4953532727eca70b3a6acb852af82d69a3cb10cdfc +size 10 diff --git a/S2OJ/1665/data/permutation2.in b/S2OJ/1665/data/permutation2.in new file mode 100644 index 00000000..d790bd49 --- /dev/null +++ b/S2OJ/1665/data/permutation2.in @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2e6d31a5983a91251bfae5aefa1c0a19d8ba3cf601d0e8a706b4cfa9661a6b8a +size 2 diff --git a/S2OJ/1665/data/permutation2.out b/S2OJ/1665/data/permutation2.out new file mode 100644 index 00000000..702c6178 --- /dev/null +++ b/S2OJ/1665/data/permutation2.out @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e267861aa56e0f32d0ee3bb3d0c5cfaf8a9b724433c3c9c45ab1750c37c825a4 +size 4 diff --git a/S2OJ/1665/data/permutation3.in b/S2OJ/1665/data/permutation3.in new file mode 100644 index 00000000..36250e7f --- /dev/null +++ b/S2OJ/1665/data/permutation3.in @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:83bbf3eb07b8d7e5f5b3e4ff2515c010f31775e7ec29c5dc8f1a9f9c6566c15d +size 5 diff --git a/S2OJ/1665/data/permutation3.out b/S2OJ/1665/data/permutation3.out new file mode 100644 index 00000000..44dba7b0 --- /dev/null +++ b/S2OJ/1665/data/permutation3.out @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f8503a4ea1e380a23b2c5b8300ba505bf0d34e650476ce905696ea23b59651ea +size 10 diff --git a/S2OJ/1665/data/permutation4.in b/S2OJ/1665/data/permutation4.in new file mode 100644 index 00000000..c158f8cc --- /dev/null +++ b/S2OJ/1665/data/permutation4.in @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:da1a7ec0117ac03d898bb6724fbf08dd79538d11664ace501070bc00bf839f64 +size 5 diff --git a/S2OJ/1665/data/permutation4.out b/S2OJ/1665/data/permutation4.out new file mode 100644 index 00000000..35ac12ad --- /dev/null +++ b/S2OJ/1665/data/permutation4.out @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:28e996cc1aed3f6e90c589b95c24fa96e7253b83f868e2cf54a22a1f24a6d7ee +size 10 diff --git a/S2OJ/1665/data/permutation5.in b/S2OJ/1665/data/permutation5.in new file mode 100644 index 00000000..1d51e9e1 --- /dev/null +++ b/S2OJ/1665/data/permutation5.in @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d7dff9b4de6403091b09aa111a6a30adcb196a1b0aeb20065aa178b21726a963 +size 5 diff --git a/S2OJ/1665/data/permutation5.out b/S2OJ/1665/data/permutation5.out new file mode 100644 index 00000000..e89966da --- /dev/null +++ b/S2OJ/1665/data/permutation5.out @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3785fefb89a8578f0c05c3d9848f1eca8544889cb999321560d31ba4857bc588 +size 10 diff --git a/S2OJ/1665/data/permutation6.in b/S2OJ/1665/data/permutation6.in new file mode 100644 index 00000000..62ba21d4 --- /dev/null +++ b/S2OJ/1665/data/permutation6.in @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:eeea91ca5dc14a768e15388da60f9f6f5f5380d4d87f341689956a88c3878f00 +size 5 diff --git a/S2OJ/1665/data/permutation6.out b/S2OJ/1665/data/permutation6.out new file mode 100644 index 00000000..c94f90b1 --- /dev/null +++ b/S2OJ/1665/data/permutation6.out @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a38cd5e77662162d26979900ef19ecc89fb9d9a68dc71cea6b503e3908824481 +size 10 diff --git a/S2OJ/1665/data/permutation7.in b/S2OJ/1665/data/permutation7.in new file mode 100644 index 00000000..c85e5b5d --- /dev/null +++ b/S2OJ/1665/data/permutation7.in @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:777f2dddfb28b367f03773b3d7ea5bceb426e2e45a1ad0f7035f84a24b998947 +size 7 diff --git a/S2OJ/1665/data/permutation7.out b/S2OJ/1665/data/permutation7.out new file mode 100644 index 00000000..2853e215 --- /dev/null +++ b/S2OJ/1665/data/permutation7.out @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1ba1df1e6b546d2e48a414762f6bd10a7d00d4ad015205ee6398cf9a2b1fd63f +size 8 diff --git a/S2OJ/1665/data/permutation8.in b/S2OJ/1665/data/permutation8.in new file mode 100644 index 00000000..200d73d9 --- /dev/null +++ b/S2OJ/1665/data/permutation8.in @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:788fd027861e0793c4c7300db540a02a5ab5f5ab1e15c1b5cb5ba661818d2ffd +size 7 diff --git a/S2OJ/1665/data/permutation8.out b/S2OJ/1665/data/permutation8.out new file mode 100644 index 00000000..1f57be48 --- /dev/null +++ b/S2OJ/1665/data/permutation8.out @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1e35e063edaaca8786f7cf3d2ed522155365b6147e8e73ddb8d4612396db0754 +size 10 diff --git a/S2OJ/1665/data/permutation9.in b/S2OJ/1665/data/permutation9.in new file mode 100644 index 00000000..13e05173 --- /dev/null +++ b/S2OJ/1665/data/permutation9.in @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:085c348f64a3b543e973a33749e90ba20847b99016a87e5228847597d61ce582 +size 8 diff --git a/S2OJ/1665/data/permutation9.out b/S2OJ/1665/data/permutation9.out new file mode 100644 index 00000000..1656cb19 --- /dev/null +++ b/S2OJ/1665/data/permutation9.out @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5fd68d9c4159a37cbb4b6d26f804dcc86a5cd5643e630d04a2667a391d30e045 +size 10 diff --git a/S2OJ/1665/data/problem.conf b/S2OJ/1665/data/problem.conf new file mode 100644 index 00000000..2a244c3e --- /dev/null +++ b/S2OJ/1665/data/problem.conf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:81fc781dff764d272b4650f8ca2fff130a4d1896c0b6f4f299c22fc8df18e1a5 +size 191