Educational Codeforces Round 23 A
来源:互联网 发布:sql 时间区间条件查询 编辑:程序博客网 时间:2024/05/19 00:48
#include <bits/stdc++.h>using namespace std;int main(){ int x1,y1,x2,y2,x,y; cin >> x1 >> y1 >> x2 >> y2; cin >> x >> y; int derx,dery; int flag1 = -1,flag2 = -1; derx = abs(x1-x2); dery = abs(y1-y2); if(derx%x != 0) { cout << "NO" <<endl; return 0; } if(dery%y != 0) { cout << "NO" <<endl; return 0; } //如果当前起点x坐标移动到终点x坐标的步数 //多余起点y坐标移动到终点y坐标的度数多 //就交换一下,方便计算 int cntx = derx/x; int cnty = dery/y; if(cntx > cnty) { cntx ^= cnty ^= cntx ^= cnty; x ^= y ^= x ^= y; } cnty -= cntx; if(cnty%2 == 0) cout << "YES" << endl; else cout << "NO" << endl; return 0;}
阅读全文
0 0
- Educational Codeforces Round 23 A
- Educational Codeforces Round 23 A. Treasure Hunt
- Educational Codeforces Round 23 A-F
- Educational Codeforces Round 23#A. Treasure Hunt
- Educational Codeforces Round 5 A
- Educational Codeforces Round 20 A
- Educational Codeforces Round 21 A
- codeforces Educational Codeforces Round 21 A
- Educational Codeforces Round 23总结
- [CF] Educational Codeforces Round 23
- Educational Codeforces Round 23 B
- Educational Codeforces Round 23 题解
- Educational Codeforces Round 1 A. Tricky Sum
- Educational Codeforces Round 1 (A)模拟
- Educational Codeforces Round 1 A. Tricky Sum
- Educational Codeforces Round 2 A. Extract Numbers
- Educational Codeforces Round 5(A) 模拟
- Educational Codeforces Round 6 (A)贪心
- ASP.NET获取客户端、服务器端基础信息
- grub的reboot 命令实现
- CentOS下yum命令出现Loaded plugins: fastestmirror
- 个推服务器端设置代理服务器
- C++ 基础学习教程 第二章 变量(2)
- Educational Codeforces Round 23 A
- 53. Maximum Subarray
- 【Spring实战】Spring容器初始化完成后执行初始化数据方法
- day11
- SQL Server数据库设计规范
- [CodeVS 1166] 高精度加法
- idea配置tomcat
- Oracle between and 边界问题
- Android 解决setRequestedOrientation之后手机屏幕的旋转不触发onConfigurationChanged方法