当前位置: 首页 > news >正文

织梦制作html 网站地图wordpress 调用文章标签

织梦制作html 网站地图,wordpress 调用文章标签,石家庄发布最新公告,公司简介展板图片http://codeforces.com/contest/734/problem/D 一开始的时候看不懂题目#xff0c;以为象是中国象棋那样走#xff0c;然后看不懂样例。 原来是走对角线的#xff0c;长知识了。 所以我们就知道#xff0c;王有八个方向#xff0c;所以每个方向选一个来做代表就行了。 那么…http://codeforces.com/contest/734/problem/D 一开始的时候看不懂题目以为象是中国象棋那样走然后看不懂样例。 原来是走对角线的长知识了。 所以我们就知道王有八个方向所以每个方向选一个来做代表就行了。 那么选谁呢可以排序按照他们离王的距离从小到大排这样就能选出最近的那个不用被棋挡住 然后注意下方向的表达在王的右上角还要和王在同一对角线才行~不能简单地判x和y的大小关系 #include cstdio #include cstdlib #include cstring #include cmath #include algorithm #define IOS ios::sync_with_stdio(false) using namespace std; #define inf (0x3f3f3f3f) typedef long long int LL;#include iostream #include sstream #include vector #include set #include map #include queue #include string const int maxn 500000 20; LL xx0, yy0; struct node {char ch;LL x, y;node() {}node(char cc, LL xx, LL yy) : ch(cc), x(xx), y(yy) {}bool operator (const struct node rhs) const {LL dis (x - xx0) * (x - xx0) (y - yy0) * (y - yy0);LL dis2 (rhs.x - xx0) * (rhs.x - xx0) (rhs.y - yy0) * (rhs.y - yy0);return dis dis2;} }arr[maxn]; vectorstruct nodepos[66]; void work() {IOS;int n;cin n;cin xx0 yy0;for (int i 1; i n; i) {char str[11];cin str;arr[i].ch str[0];cin arr[i].x arr[i].y;}sort(arr 1, arr 1 n); // for (int i 1; i n; i) { // cout arr[i].ch arr[i].x arr[i].y endl; // }for (int i 1; i n; i) {int face 0;if (arr[i].x xx0 arr[i].y yy0) face 1;else if (arr[i].x xx0 arr[i].y yy0 arr[i].x arr[i].y xx0 yy0) face 2;else if (arr[i].y yy0 arr[i].x xx0) face 3;else if (arr[i].x xx0 arr[i].y yy0 arr[i].x - arr[i].y xx0 - yy0) face 4;else if (arr[i].x xx0 arr[i].y yy0) face 5;else if (arr[i].x xx0 arr[i].y yy0 arr[i].x arr[i].y xx0 yy0) face 6;else if (arr[i].y yy0 arr[i].x xx0) face 7;else if (arr[i].x xx0 arr[i].y yy0 arr[i].x - arr[i].y xx0 - yy0) face 8;if (pos[face].size() ! 0) continue;pos[face].push_back(arr[i]);} // cout fff endl;for (int i 1; i 8; i) {if ((i 1 || i 5) pos[i].size() (pos[i][0].ch Q || pos[i][0].ch R)) {printf(YES\n);return;} else if ((i 2 || i 6) pos[i].size() (pos[i][0].ch Q || pos[i][0].ch B)) {printf(YES\n);return;} else if ((i 3 || i 7) pos[i].size() (pos[i][0].ch Q || pos[i][0].ch R)) {printf(YES\n);return;} else if ((i 4 || i 8) pos[i].size() (pos[i][0].ch B || pos[i][0].ch Q)) {printf(YES\n);return;}}printf(NO\n); }int main() { #ifdef localfreopen(data.txt,r,stdin); #endifwork();return 0; } View Code  转载于:https://www.cnblogs.com/liuweimingcprogram/p/6068366.html
http://www.sadfv.cn/news/38089/

相关文章:

  • 深圳 网站托管自己做网站主机
  • 龙元建设网站网站留言表格怎么做
  • 长沙新能源建站补贴wordpress汉化手机版
  • 高端网站建设系统规划网站平台怎么建立的
  • 国内外免费域名解析网站牡丹江市建设工程交易中心网站
  • 可以做app的网站做电影网站用的云盘
  • 邵阳建网站多少钱东莞企业网站建立报价
  • 电商设计网站素材能赚钱的网站
  • 厦门网站搜索优化做网站后台的时候要注意什么
  • 58同城网站建设要多少钱wordpress 待审文章
  • dota2海涛做的网站科技为了上大学上交可控核聚变免费阅读
  • 网站建设方案 下载郑州房产网新房
  • 杭州网站建设怎么样软件开发文档用什么写
  • 做网站优化为什么要用国外服务器做网站
  • 北京工商局网站怎么做增资福清网站建设专家
  • 做网站挂谷歌广告赚钱吗找一个网站做搜索引擎分析
  • 实现微信绑定登录网站软文怎么优化网站
  • 网站建设可实施性报告微信营销方式
  • 二进制可以做网站是吗网站备案登录
  • asp网站如何打开网站怎么样被百度收录
  • 电脑手机网站首页员工信息查询系统
  • 格朗图手表网站怎么给网站做缓存
  • 如何管理企业网站企业网站首页图片
  • 社保网站做员工用工备案一个网站3个相似域名
  • 中国行业网站大全如何为企业网站设计完整的推广方案
  • 建站如何收费河北建设工程信息网联系电话
  • 广州企业网站建设上海公司牌照价格
  • 秀洲区住房和城乡建设局网站布吉网站建设哪家技术好
  • 沈阳建设厅网站首页创新的企业网站制作
  • 网站建设相关论文电子商务工资多少钱一个月