0
1
mirror of https://git.sb/baoshuo/OI-codes.git synced 2024-12-24 03:31:59 +00:00

3378. [Usaco2004 Open]MooFest 狂欢节

https://hydro.ac/d/bzoj/record/6322eaf3bdf9bc31d1609e18
This commit is contained in:
Baoshuo Ren 2022-09-15 17:06:29 +08:00
parent 9f201129c2
commit 67fcc9cd0a
Signed by: baoshuo
GPG Key ID: 00CB9680AB29F51A
23 changed files with 98 additions and 0 deletions

32
BZOJ/3378/3378.cpp Normal file
View File

@ -0,0 +1,32 @@
#include <iostream>
using std::cin;
using std::cout;
const char endl = '\n';
const int N = 5e4 + 5;
int n;
long long ans;
std::pair<int, int> p[N];
int main() {
std::ios::sync_with_stdio(false);
cin.tie(nullptr);
cin >> n;
for (int i = 1; i <= n; i++) {
cin >> p[i].first >> p[i].second;
}
for (int i = 1; i <= n; i++) {
for (int j = 1; j < i; j++) {
ans += 1ll * std::max(p[i].first, p[j].first) * std::abs(p[i].second - p[j].second);
}
}
cout << ans << endl;
return 0;
}

BIN
BZOJ/3378/data/1.in (Stored with Git LFS) Normal file

Binary file not shown.

BIN
BZOJ/3378/data/1.out (Stored with Git LFS) Normal file

Binary file not shown.

BIN
BZOJ/3378/data/10.in (Stored with Git LFS) Normal file

Binary file not shown.

BIN
BZOJ/3378/data/10.out (Stored with Git LFS) Normal file

Binary file not shown.

BIN
BZOJ/3378/data/11.in (Stored with Git LFS) Normal file

Binary file not shown.

BIN
BZOJ/3378/data/11.out (Stored with Git LFS) Normal file

Binary file not shown.

BIN
BZOJ/3378/data/2.in (Stored with Git LFS) Normal file

Binary file not shown.

BIN
BZOJ/3378/data/2.out (Stored with Git LFS) Normal file

Binary file not shown.

BIN
BZOJ/3378/data/3.in (Stored with Git LFS) Normal file

Binary file not shown.

BIN
BZOJ/3378/data/3.out (Stored with Git LFS) Normal file

Binary file not shown.

BIN
BZOJ/3378/data/4.in (Stored with Git LFS) Normal file

Binary file not shown.

BIN
BZOJ/3378/data/4.out (Stored with Git LFS) Normal file

Binary file not shown.

BIN
BZOJ/3378/data/5.in (Stored with Git LFS) Normal file

Binary file not shown.

BIN
BZOJ/3378/data/5.out (Stored with Git LFS) Normal file

Binary file not shown.

BIN
BZOJ/3378/data/6.in (Stored with Git LFS) Normal file

Binary file not shown.

BIN
BZOJ/3378/data/6.out (Stored with Git LFS) Normal file

Binary file not shown.

BIN
BZOJ/3378/data/7.in (Stored with Git LFS) Normal file

Binary file not shown.

BIN
BZOJ/3378/data/7.out (Stored with Git LFS) Normal file

Binary file not shown.

BIN
BZOJ/3378/data/8.in (Stored with Git LFS) Normal file

Binary file not shown.

BIN
BZOJ/3378/data/8.out (Stored with Git LFS) Normal file

Binary file not shown.

BIN
BZOJ/3378/data/9.in (Stored with Git LFS) Normal file

Binary file not shown.

BIN
BZOJ/3378/data/9.out (Stored with Git LFS) Normal file

Binary file not shown.