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

#1732. 【NOIP 2022 模拟赛 by AzusaCat】小黄鸭与矩阵(matrix)

https://sjzezoj.com/submission/63545
This commit is contained in:
Baoshuo Ren 2022-11-05 19:42:56 +08:00
parent 0cced61690
commit 10a127cebf
Signed by: baoshuo
GPG Key ID: 00CB9680AB29F51A
28 changed files with 109 additions and 0 deletions

28
S2OJ/1732/1732.cpp Normal file
View File

@ -0,0 +1,28 @@
#include <iostream>
using std::cin;
using std::cout;
const char endl = '\n';
int n, k;
int main() {
std::ios::sync_with_stdio(false);
cin.tie(nullptr);
cin >> n >> k;
int a = n / k,
b = (n - 1) / k + 1;
int cb = n % k,
ca = k - n % k;
long long res = 0;
res += static_cast<long long>(ca) * (ca - 1) / 2 * a * a;
res += static_cast<long long>(cb) * (cb - 1) / 2 * b * b;
res += static_cast<long long>(a) * b * ca * cb;
cout << res << endl;
return 0;
}

BIN
S2OJ/1732/data/ex_matrix1.ans (Stored with Git LFS) Normal file

Binary file not shown.

BIN
S2OJ/1732/data/ex_matrix1.in (Stored with Git LFS) Normal file

Binary file not shown.

BIN
S2OJ/1732/data/ex_matrix2.ans (Stored with Git LFS) Normal file

Binary file not shown.

BIN
S2OJ/1732/data/ex_matrix2.in (Stored with Git LFS) Normal file

Binary file not shown.

BIN
S2OJ/1732/data/ex_matrix3.ans (Stored with Git LFS) Normal file

Binary file not shown.

BIN
S2OJ/1732/data/ex_matrix3.in (Stored with Git LFS) Normal file

Binary file not shown.

BIN
S2OJ/1732/data/matrix1.ans (Stored with Git LFS) Normal file

Binary file not shown.

BIN
S2OJ/1732/data/matrix1.in (Stored with Git LFS) Normal file

Binary file not shown.

BIN
S2OJ/1732/data/matrix10.ans (Stored with Git LFS) Normal file

Binary file not shown.

BIN
S2OJ/1732/data/matrix10.in (Stored with Git LFS) Normal file

Binary file not shown.

BIN
S2OJ/1732/data/matrix2.ans (Stored with Git LFS) Normal file

Binary file not shown.

BIN
S2OJ/1732/data/matrix2.in (Stored with Git LFS) Normal file

Binary file not shown.

BIN
S2OJ/1732/data/matrix3.ans (Stored with Git LFS) Normal file

Binary file not shown.

BIN
S2OJ/1732/data/matrix3.in (Stored with Git LFS) Normal file

Binary file not shown.

BIN
S2OJ/1732/data/matrix4.ans (Stored with Git LFS) Normal file

Binary file not shown.

BIN
S2OJ/1732/data/matrix4.in (Stored with Git LFS) Normal file

Binary file not shown.

BIN
S2OJ/1732/data/matrix5.ans (Stored with Git LFS) Normal file

Binary file not shown.

BIN
S2OJ/1732/data/matrix5.in (Stored with Git LFS) Normal file

Binary file not shown.

BIN
S2OJ/1732/data/matrix6.ans (Stored with Git LFS) Normal file

Binary file not shown.

BIN
S2OJ/1732/data/matrix6.in (Stored with Git LFS) Normal file

Binary file not shown.

BIN
S2OJ/1732/data/matrix7.ans (Stored with Git LFS) Normal file

Binary file not shown.

BIN
S2OJ/1732/data/matrix7.in (Stored with Git LFS) Normal file

Binary file not shown.

BIN
S2OJ/1732/data/matrix8.ans (Stored with Git LFS) Normal file

Binary file not shown.

BIN
S2OJ/1732/data/matrix8.in (Stored with Git LFS) Normal file

Binary file not shown.

BIN
S2OJ/1732/data/matrix9.ans (Stored with Git LFS) Normal file

Binary file not shown.

BIN
S2OJ/1732/data/matrix9.in (Stored with Git LFS) Normal file

Binary file not shown.

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

Binary file not shown.