mirror of
https://git.sb/baoshuo/OI-codes.git
synced 2024-12-24 03:31:59 +00:00
2299. [HAOI2011]向量
https://hydro.ac/d/bzoj/record/63a46049cf75a716a1673aee
This commit is contained in:
parent
47ffa5ada6
commit
0dc2cb7fe2
30
BZOJ/2299/2299.cpp
Normal file
30
BZOJ/2299/2299.cpp
Normal 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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
BIN
BZOJ/2299/data/9.out
(Stored with Git LFS)
Normal file
Binary file not shown.
Loading…
Reference in New Issue
Block a user