0
1
mirror of https://git.sb/baoshuo/OI-codes.git synced 2024-11-23 19:08:47 +00:00

#1803. 【2017.3长乐省选集训Day2T1】冒泡排序

https://sjzezoj.com/submission/65907
This commit is contained in:
Baoshuo Ren 2022-12-18 12:22:36 +08:00
parent 148a2511af
commit dd6f260b29
Signed by: baoshuo
GPG Key ID: 00CB9680AB29F51A
22 changed files with 93 additions and 0 deletions

30
S2OJ/1803/1803.cpp Normal file
View File

@ -0,0 +1,30 @@
#include <iostream>
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<long long>(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;
}

BIN
S2OJ/1803/data/bubble1.ans (Stored with Git LFS) Normal file

Binary file not shown.

BIN
S2OJ/1803/data/bubble1.in (Stored with Git LFS) Normal file

Binary file not shown.

BIN
S2OJ/1803/data/bubble10.ans (Stored with Git LFS) Normal file

Binary file not shown.

BIN
S2OJ/1803/data/bubble10.in (Stored with Git LFS) Normal file

Binary file not shown.

BIN
S2OJ/1803/data/bubble2.ans (Stored with Git LFS) Normal file

Binary file not shown.

BIN
S2OJ/1803/data/bubble2.in (Stored with Git LFS) Normal file

Binary file not shown.

BIN
S2OJ/1803/data/bubble3.ans (Stored with Git LFS) Normal file

Binary file not shown.

BIN
S2OJ/1803/data/bubble3.in (Stored with Git LFS) Normal file

Binary file not shown.

BIN
S2OJ/1803/data/bubble4.ans (Stored with Git LFS) Normal file

Binary file not shown.

BIN
S2OJ/1803/data/bubble4.in (Stored with Git LFS) Normal file

Binary file not shown.

BIN
S2OJ/1803/data/bubble5.ans (Stored with Git LFS) Normal file

Binary file not shown.

BIN
S2OJ/1803/data/bubble5.in (Stored with Git LFS) Normal file

Binary file not shown.

BIN
S2OJ/1803/data/bubble6.ans (Stored with Git LFS) Normal file

Binary file not shown.

BIN
S2OJ/1803/data/bubble6.in (Stored with Git LFS) Normal file

Binary file not shown.

BIN
S2OJ/1803/data/bubble7.ans (Stored with Git LFS) Normal file

Binary file not shown.

BIN
S2OJ/1803/data/bubble7.in (Stored with Git LFS) Normal file

Binary file not shown.

BIN
S2OJ/1803/data/bubble8.ans (Stored with Git LFS) Normal file

Binary file not shown.

BIN
S2OJ/1803/data/bubble8.in (Stored with Git LFS) Normal file

Binary file not shown.

BIN
S2OJ/1803/data/bubble9.ans (Stored with Git LFS) Normal file

Binary file not shown.

BIN
S2OJ/1803/data/bubble9.in (Stored with Git LFS) Normal file

Binary file not shown.

BIN
S2OJ/1803/data/problem.conf (Stored with Git LFS) Normal file

Binary file not shown.