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

2299. [HAOI2011]向量

https://hydro.ac/d/bzoj/record/63a46049cf75a716a1673aee
This commit is contained in:
Baoshuo Ren 2022-12-22 21:49:09 +08:00
parent 47ffa5ada6
commit 0dc2cb7fe2
Signed by: baoshuo
GPG Key ID: 00CB9680AB29F51A
23 changed files with 96 additions and 0 deletions

30
BZOJ/2299/2299.cpp Normal file
View File

@ -0,0 +1,30 @@
#include <iostream>
#include <algorithm>
using std::cin;
using std::cout;
const char endl = '\n';
int t, a, b, x, y;
int main() {
std::ios::sync_with_stdio(false);
cin.tie(nullptr);
cin >> t;
while (t--) {
cin >> a >> b >> x >> y;
int g = std::__gcd(a, b) * 2;
a %= g, b %= g, x %= g, y %= g;
auto check = [&](int x, int y) -> bool {
return x % g == 0 && y % g == 0;
};
cout << (check(x, y) || check(x + a, y + b) || check(x + b, y + a) || check(x + a + b, y + a + b) ? "Y" : "N") << endl;
}
return 0;
}

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

Binary file not shown.

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

Binary file not shown.

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

Binary file not shown.

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

Binary file not shown.

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

Binary file not shown.

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

Binary file not shown.

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

Binary file not shown.

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

Binary file not shown.

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

Binary file not shown.

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

Binary file not shown.

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

Binary file not shown.

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

Binary file not shown.

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

Binary file not shown.

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

Binary file not shown.

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

Binary file not shown.

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

Binary file not shown.

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

Binary file not shown.

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

Binary file not shown.

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

Binary file not shown.

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

Binary file not shown.

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

Binary file not shown.

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

Binary file not shown.