From dd6f260b29b562a1cfac5519956ef852b664496b Mon Sep 17 00:00:00 2001 From: Baoshuo Date: Sun, 18 Dec 2022 12:22:36 +0800 Subject: [PATCH] =?UTF-8?q?#1803.=20=E3=80=902017.3=E9=95=BF=E4=B9=90?= =?UTF-8?q?=E7=9C=81=E9=80=89=E9=9B=86=E8=AE=ADDay2T1=E3=80=91=E5=86=92?= =?UTF-8?q?=E6=B3=A1=E6=8E=92=E5=BA=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit https://sjzezoj.com/submission/65907 --- S2OJ/1803/1803.cpp | 30 ++++++++++++++++++++++++++++++ S2OJ/1803/data/bubble1.ans | 3 +++ S2OJ/1803/data/bubble1.in | 3 +++ S2OJ/1803/data/bubble10.ans | 3 +++ S2OJ/1803/data/bubble10.in | 3 +++ S2OJ/1803/data/bubble2.ans | 3 +++ S2OJ/1803/data/bubble2.in | 3 +++ S2OJ/1803/data/bubble3.ans | 3 +++ S2OJ/1803/data/bubble3.in | 3 +++ S2OJ/1803/data/bubble4.ans | 3 +++ S2OJ/1803/data/bubble4.in | 3 +++ S2OJ/1803/data/bubble5.ans | 3 +++ S2OJ/1803/data/bubble5.in | 3 +++ S2OJ/1803/data/bubble6.ans | 3 +++ S2OJ/1803/data/bubble6.in | 3 +++ S2OJ/1803/data/bubble7.ans | 3 +++ S2OJ/1803/data/bubble7.in | 3 +++ S2OJ/1803/data/bubble8.ans | 3 +++ S2OJ/1803/data/bubble8.in | 3 +++ S2OJ/1803/data/bubble9.ans | 3 +++ S2OJ/1803/data/bubble9.in | 3 +++ S2OJ/1803/data/problem.conf | 3 +++ 22 files changed, 93 insertions(+) create mode 100644 S2OJ/1803/1803.cpp create mode 100644 S2OJ/1803/data/bubble1.ans create mode 100644 S2OJ/1803/data/bubble1.in create mode 100644 S2OJ/1803/data/bubble10.ans create mode 100644 S2OJ/1803/data/bubble10.in create mode 100644 S2OJ/1803/data/bubble2.ans create mode 100644 S2OJ/1803/data/bubble2.in create mode 100644 S2OJ/1803/data/bubble3.ans create mode 100644 S2OJ/1803/data/bubble3.in create mode 100644 S2OJ/1803/data/bubble4.ans create mode 100644 S2OJ/1803/data/bubble4.in create mode 100644 S2OJ/1803/data/bubble5.ans create mode 100644 S2OJ/1803/data/bubble5.in create mode 100644 S2OJ/1803/data/bubble6.ans create mode 100644 S2OJ/1803/data/bubble6.in create mode 100644 S2OJ/1803/data/bubble7.ans create mode 100644 S2OJ/1803/data/bubble7.in create mode 100644 S2OJ/1803/data/bubble8.ans create mode 100644 S2OJ/1803/data/bubble8.in create mode 100644 S2OJ/1803/data/bubble9.ans create mode 100644 S2OJ/1803/data/bubble9.in create mode 100644 S2OJ/1803/data/problem.conf diff --git a/S2OJ/1803/1803.cpp b/S2OJ/1803/1803.cpp new file mode 100644 index 00000000..1ea2688a --- /dev/null +++ b/S2OJ/1803/1803.cpp @@ -0,0 +1,30 @@ +#include + +using std::cin; +using std::cout; +const char endl = '\n'; + +const int N = 3e7 + 5; + +int n, s, b, c, d, a[N], ans; + +int main() { + std::ios::sync_with_stdio(false); + cin.tie(nullptr); + + cin >> n >> s >> b >> c >> d; + + for (int i = 1; i <= n; i++) { + a[i] = i; + s = (static_cast(s) * b + c) % d; + std::swap(a[i], a[s % i + 1]); + } + + for (int i = 1; i <= n; i++) { + ans = std::max(ans, i - a[i]); + } + + cout << ans << endl; + + return 0; +} diff --git a/S2OJ/1803/data/bubble1.ans b/S2OJ/1803/data/bubble1.ans new file mode 100644 index 00000000..7071ccbc --- /dev/null +++ b/S2OJ/1803/data/bubble1.ans @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e595be81bf15aa95763adb4fc0ba525bbed1971cf5fccdf3a946cd37025fb2c9 +size 4 diff --git a/S2OJ/1803/data/bubble1.in b/S2OJ/1803/data/bubble1.in new file mode 100644 index 00000000..58f24a22 --- /dev/null +++ b/S2OJ/1803/data/bubble1.in @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2d1f3bd40a99007f4c6607b97d8d14b559a16389fea391d16b34adcb88bce82e +size 21 diff --git a/S2OJ/1803/data/bubble10.ans b/S2OJ/1803/data/bubble10.ans new file mode 100644 index 00000000..d4ab08b0 --- /dev/null +++ b/S2OJ/1803/data/bubble10.ans @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:cd94bd98065e46ab9b37897ccaf858344a60ed2f5575a2288c049bc93a27ba39 +size 9 diff --git a/S2OJ/1803/data/bubble10.in b/S2OJ/1803/data/bubble10.in new file mode 100644 index 00000000..3d40ece1 --- /dev/null +++ b/S2OJ/1803/data/bubble10.in @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6a563e3366e03936b5d67f984e09c6df79a9e6b6290df464e3c556d9cf421034 +size 46 diff --git a/S2OJ/1803/data/bubble2.ans b/S2OJ/1803/data/bubble2.ans new file mode 100644 index 00000000..d23aed40 --- /dev/null +++ b/S2OJ/1803/data/bubble2.ans @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:368eda846164b56222286d7fa32728cc65ac749d44113f354480e033be6ca9ff +size 4 diff --git a/S2OJ/1803/data/bubble2.in b/S2OJ/1803/data/bubble2.in new file mode 100644 index 00000000..f0c32cfd --- /dev/null +++ b/S2OJ/1803/data/bubble2.in @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:700f4b21ba1f5be2aa48d4fe76c4b4defac042f6e431e0035835e1e6848ea040 +size 24 diff --git a/S2OJ/1803/data/bubble3.ans b/S2OJ/1803/data/bubble3.ans new file mode 100644 index 00000000..1a6c442b --- /dev/null +++ b/S2OJ/1803/data/bubble3.ans @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3c533e3da5b07893b35bb39d5d77dd811ffd715cf53c89cf29c2e96d8655ff0e +size 4 diff --git a/S2OJ/1803/data/bubble3.in b/S2OJ/1803/data/bubble3.in new file mode 100644 index 00000000..352b7bd5 --- /dev/null +++ b/S2OJ/1803/data/bubble3.in @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e61d34a5d500038fc5e6b190db8f6c271d349588b84df2f9acd12a7f1169e27f +size 24 diff --git a/S2OJ/1803/data/bubble4.ans b/S2OJ/1803/data/bubble4.ans new file mode 100644 index 00000000..d27b7892 --- /dev/null +++ b/S2OJ/1803/data/bubble4.ans @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7b1c177fa97893143187213558b3bcb43051a221e49a18b533a780ee3166d072 +size 6 diff --git a/S2OJ/1803/data/bubble4.in b/S2OJ/1803/data/bubble4.in new file mode 100644 index 00000000..ffbee3bf --- /dev/null +++ b/S2OJ/1803/data/bubble4.in @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7ae3905c30ef285b9fd1c9ee116102478d6a31510c277f73440e948b9d62f1f9 +size 31 diff --git a/S2OJ/1803/data/bubble5.ans b/S2OJ/1803/data/bubble5.ans new file mode 100644 index 00000000..9fdc116a --- /dev/null +++ b/S2OJ/1803/data/bubble5.ans @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:178ef61a1ff88c997a855188783cc016ca5db04849b49822b3095760efaf8a79 +size 6 diff --git a/S2OJ/1803/data/bubble5.in b/S2OJ/1803/data/bubble5.in new file mode 100644 index 00000000..0230bd70 --- /dev/null +++ b/S2OJ/1803/data/bubble5.in @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4876e4105fdecae7386b3b7e8b8c916210c7a9e4a76b3a3bae2bb5eeada0bd7d +size 30 diff --git a/S2OJ/1803/data/bubble6.ans b/S2OJ/1803/data/bubble6.ans new file mode 100644 index 00000000..1fc364c9 --- /dev/null +++ b/S2OJ/1803/data/bubble6.ans @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:efb9bfb69718ba4ca9ea66e7c7da6f9be8cdeac06b2b6cd14d2a3b098f722ad1 +size 7 diff --git a/S2OJ/1803/data/bubble6.in b/S2OJ/1803/data/bubble6.in new file mode 100644 index 00000000..15280720 --- /dev/null +++ b/S2OJ/1803/data/bubble6.in @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:da2fe7eeaa379b541b1cc0e21759900dcd43875847e9acb34565b75a725af5fe +size 38 diff --git a/S2OJ/1803/data/bubble7.ans b/S2OJ/1803/data/bubble7.ans new file mode 100644 index 00000000..f45a2d83 --- /dev/null +++ b/S2OJ/1803/data/bubble7.ans @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:40584c742c848f63847eafb2731d17eda374d89045344da9924ca4489138e404 +size 7 diff --git a/S2OJ/1803/data/bubble7.in b/S2OJ/1803/data/bubble7.in new file mode 100644 index 00000000..ee8cc517 --- /dev/null +++ b/S2OJ/1803/data/bubble7.in @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4eb2633926733ef49dec986b628af6191b3559101b442b12b8d468f2a20d393b +size 38 diff --git a/S2OJ/1803/data/bubble8.ans b/S2OJ/1803/data/bubble8.ans new file mode 100644 index 00000000..a02a3729 --- /dev/null +++ b/S2OJ/1803/data/bubble8.ans @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:76c2c3198653f4d62bbff94d315a80286508b547340c201f64e0c6c8cb45e505 +size 9 diff --git a/S2OJ/1803/data/bubble8.in b/S2OJ/1803/data/bubble8.in new file mode 100644 index 00000000..094f7d4f --- /dev/null +++ b/S2OJ/1803/data/bubble8.in @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ed13f74240fcc43d38c389417dfcdca4a961728cff92a9305a8cdb74c909ade4 +size 46 diff --git a/S2OJ/1803/data/bubble9.ans b/S2OJ/1803/data/bubble9.ans new file mode 100644 index 00000000..01bafd30 --- /dev/null +++ b/S2OJ/1803/data/bubble9.ans @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:feda9576c7feaf8c1511ec207b2f31984ba8c82b6d0ae8e3b19236179612b3a9 +size 9 diff --git a/S2OJ/1803/data/bubble9.in b/S2OJ/1803/data/bubble9.in new file mode 100644 index 00000000..51c63c12 --- /dev/null +++ b/S2OJ/1803/data/bubble9.in @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3a009d10d65f4924f5e3b5753d69351324b5c2da622a22f0843723d772b9bd37 +size 41 diff --git a/S2OJ/1803/data/problem.conf b/S2OJ/1803/data/problem.conf new file mode 100644 index 00000000..3ab8480d --- /dev/null +++ b/S2OJ/1803/data/problem.conf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c3ec41a3e8048f2055c49e37dfcce5dbb0f8eabdc93f95ccc1310ff5ee733728 +size 181