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

网站建设 公司 广州谷歌手机网页版入口

网站建设 公司 广州,谷歌手机网页版入口,河北燕郊网站制作,wordpress 幻灯片插件CF1692C Wheres the Bishop? 题解题目链接字面描述题面翻译题目描述题目描述输入格式输出格式样例 #1样例输入 #1样例输出 #1提示代码实现题目 链接 https://www.luogu.com.cn/problem/CF1692C 字面描述 题面翻译 题目描述 有一个888\times888的棋盘#xff0c;列编号从… CF1692C Wheres the Bishop? 题解题目链接字面描述题面翻译题目描述题目描述输入格式输出格式样例 #1样例输入 #1样例输出 #1提示代码实现题目 链接 https://www.luogu.com.cn/problem/CF1692C 字面描述 题面翻译 题目描述 有一个8×88\times88×8的棋盘列编号从左到右递增行编号从上到下递增。 给出一个棋盘上面用KaTeX parse error: Expected EOF, got # at position 1: #̲标明了主教的攻击范围。请你找出主教的位置坐标并输出其行、列编号。 保证主教的行、列编号均在222与777之间。 你需要回答ttt组测试数据。 (1≤t≤36)(1\le t \le 36)(1≤t≤36) 题目描述 Mihai has an $ 8 \times 8 $ chessboard whose rows are numbered from $ 1 $ to $ 8 $ from top to bottom and whose columns are numbered from $ 1 $ to $ 8 $ from left to right. Mihai has placed exactly one bishop on the chessboard. The bishop is not placed on the edges of the board. (In other words, the row and column of the bishop are between $ 2 $ and $ 7 $ , inclusive.) The bishop attacks in all directions diagonally, and there is no limit to the distance which the bishop can attack. Note that the cell on which the bishop is placed is also considered attacked. An example of a bishop on a chessboard. The squares it attacks are marked in red.Mihai has marked all squares the bishop attacks, but forgot where the bishop was! Help Mihai find the position of the bishop. 输入格式 The first line of the input contains a single integer $ t $ ( $ 1 \leq t \leq 36 $ ) — the number of test cases. The description of test cases follows. There is an empty line before each test case. Each test case consists of $ 8 $ lines, each containing $ 8 $ characters. Each of these characters is either ‘#’ or ‘.’, denoting a square under attack and a square not under attack, respectively. 输出格式 For each test case, output two integers $ r $ and $ c $ ( $ 2 \leq r, c \leq 7 $ ) — the row and column of the bishop. The input is generated in such a way that there is always exactly one possible location of the bishop that is not on the edge of the board. 样例 #1 样例输入 #1 3.....#.. #...#... .#.#.... ..#..... .#.#.... #...#... .....#.. ......#.#.#..... .#...... #.#..... ...#.... ....#... .....#.. ......#. .......#.#.....# ..#...#. ...#.#.. ....#... ...#.#.. ..#...#. .#.....# #.......样例输出 #1 4 3 2 2 4 5提示 The first test case is pictured in the statement. Since the bishop lies in the intersection row $ 4 $ and column $ 3 $ , the correct output is 4 3. 代码实现 遍历每一个点看他的四个角和本身是不是#即可 #includebits/stdc.h using namespace std;const int maxn20; int t; char a[maxn][maxn]; inline bool inbound(int x,int y){return x1x8y1y8;} int main(){scanf(%d,t);while(t--){for(int i1;i8;i){for(int j1;j8;j)scanf( %c,a[i][j]);}bool flagfalse;for(int i1;i8;i){for(int j1;j8;j){if(a[i][j]#a[i-1][j1]#a[i-1][j-1]#a[i1][j-1]#a[i1][j1]#){printf(%d %d\n,i,j);break;}}if(flag)break;}}return 0; }
http://www.dnsts.com.cn/news/139889.html

相关文章:

  • 叮当网站做app蜂箱尺寸与制作图片
  • 做盗市相关网站做网站预付款 怎么做账
  • 检察院网站建设方案常州建站优化
  • 网站推广含义网站开发费如何入账
  • 多层分销网站建设免费网站软件大全
  • 深圳哪里做网站校园网站建设素材
  • 新浪云怎么做淘宝客网站12333社保查询网官网
  • 深入网站开发和运维旅游网页图片素材
  • 怎么给喜欢的人做网站网站中的文章可以做排名吗
  • 宋庄网站建设简约wordpress模板
  • 佛山个人制作网站公司天辰建设工程信息网
  • 房车网站建设意义一般的网站都是用什么系统做的
  • 家居品牌网站设计论文公司免费招聘网站
  • 做网站id地推项目对接平台
  • 三丰云做游戏网站阿里云服务器学生优惠
  • 做网站的公司介绍网站建设推来客在哪里
  • 福州网站建设方案优化东莞著名网站建设企业
  • 社交网站 建站服装网站建设优点与缺点
  • 免费个人网站制作设计沧州网站建设报价
  • 工信部网站备案进度查询医疗网站前置审批要多长时间
  • 网站导航颜色网站的优势与不足
  • 电子商务网站建设合同标准范文网站优化 ppt
  • 个人网站优秀作品北京建站方案
  • 大型门户网站建设所具有的功能模块主要有网站建设 中企动力扬州
  • 白山商城网站建设网站建设费摊多久
  • 本地电脑做服务器 建网站北京seo公司公司
  • 创意工作室网站自己做网站投放广告
  • 网站转化率是什么意思建筑施工图设计
  • 宠物网站建设论文总结网页制作培训多少钱
  • wordpress全站静态页面上市装修公司