快报:CF 1692C - Where's the Bishop?
Mihai has an 8×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.
Input
The first line of the input contains a single integer t (1≤t≤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.
Output
For each test case, output two integers r and c (2≤r,c≤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.
3
.....#..
#...#...
.#.#....
..#.....
.#.#....
#...#...
.....#..
......#.
#.#.....
.#......
#.#.....
...#....
....#...
.....#..
......#.
.......#
.#.....#
..#...#.
...#.#..
....#...
...#.#..
..#...#.
.#.....#
#.......
output
Copy
4 32 24 5
Note
The first test case is pictured in the statement. Since the bishop lies in the intersection row 44 and column 33, the correct output is 4 3.
判断bishop在哪里,只要这个位置是#并且左上跟左下都是#,这个位置就是了,
依次遍历返回即可;
下面是代码:
标签:
- 快报:CF 1692C - Where's the Bishop?
- 中原崛起尼龙城
- 贝斯特:涡轮增压器渗透率仍不断提升,行业增速保持稳定增长|动态
- 4月份我国钢材出口环比四连升 每日速递
- 插混SUV领域第二条“鲶鱼” 试驾吉利银河L7 全球速讯
- 世界视讯!理想汽车 W01 纯电 MPV 手稿曝光,李想称设计灵感来自于鲸鱼
- 阿斯顿·马丁在英国以外开设首家设计工作室-全球快报
- 渎职罪免予刑事处罚的情形有哪些 当前聚焦
- 英雄联盟召唤师技能有几个(召唤师技能有几个)
- 环球今热点:贵州省地质博物馆首部学术著作——《石画石说:贵州观赏石与石文化阐释》在贵阳出版
- 【世界新要闻】大年初一去拜年歌词_大年初一
- 环球新消息丨阳光“心”行动 健康向未来 安陆市首届未成年人心理健康教育宣传月活动
- 电脑耳机左声道没声音怎么设置(7 1声道耳机怎么设置)
- 今日精选:红油郫县豆瓣酱哪个牌子好_豆瓣酱哪个牌子好
- 全球微速讯:国旅联合(600358.SH):力争三到五年进入国内文旅上市公司第一方阵
- A股午评:三大指数小幅上涨 AI概念股再度集体走强
- [路演]卓郎智能:积极开拓海外市场业务 提升海外订单占比_全球快看点
- 提振消费,推动内外贸一体化——湖南棉纺促销联盟成立
- 无色荧光纤维 荧光纤维
- 陕西延长石油集团总经济师张缠桥一行带队来访海越能源集团
- 湖人名宿詹姆斯-沃西晒和乔丹大学合照:拥抱个性会让你与众不同 世界独家
- 天天观点:腾景科技:公司精密光学元组件产品可应用于高速光模块中 具体需求情况跟随客户订单波动
- 环球头条:推荐一款轻量级全栈式开源测试平台!
- 3.5%预定利率寿险产品将全面退出市场 储蓄类保险还有吸引力吗? 世界观天下
- 【天天播资讯】大众途观黑色RiNo概念车是一款外观酷炫的独一无二的SUV
- 天天新动态:有关于公司的道歉信范文
- 事关高校毕业生档案转递接收工作!两部门印发这一通知
- 港股异动 | 蔚来-SW(09866)涨超7% ET5旅行版今日开启交付 系列有望贡献销量三成
- 世界今热点:通过股票研究报告文本分析来追踪热门行业
- 打断妻子7根肋骨!知名上市公司创始人被指家暴,本人回应|要闻速递
- 通讯!这就是信心丨看!硬核科技铺就万桥飞架新坦途
- 情侣手机壁纸两张一组(情侣手机壁纸一对两张)|焦点讯息
- 叔十二烷基硫醇商品报价动态(2023-06-16) 全球速读
- 应对全球老龄化挑战 抗衰老市场渐引人们关注 环球聚看点
- 当前热议!男子4个月23次不系安全带,罚款4600元驾驶证记23分
- 鑫荣耀终身寿险优缺点?告诉你鑫荣耀终身寿险值得买吗?_焦点快报
- 工程力学可以考哪些大学 工程力学学校排名_观焦点
- 全球关注:美光科技将在西安封测工厂投资逾43亿元
- 周六福黄金价格今天多少一克(2023年06月16日)参考价格
- 乐嘉带娃骑摩托游各国!父女太亲密引争议 世界快消息
- 江苏全方位推动长三角交通快联通|全球热推荐
- 全球观天下!逆水寒手游承影剑在哪获得(承影剑获取方法)[多图]
- 天天微头条丨科创板迎首个场内风险管理工具 今日热讯
- 7.10-7.17:谨言慎行,六大星座感情运势来袭,请做好准备迎接 全球今亮点
- 湖南发布细菌性食源性疾病暴发橙色预警
- 曹禺戏剧文学奖(关于曹禺戏剧文学奖介绍)
- 四级人大代表视察温州亚运筹办情况_要闻速递
- 2019年个人所得税税率表_2019年个人所得税 环球热门
- 荣威D7官图发布
- 有你真好作文开头结尾优美_有你真好作文开头结尾_环球微资讯
- 杨丽萍孔雀舞再惹不雅争议,男舞者近乎赤裸
- 今日播报!一个会踢球的国家有多幸福
- 今日视点:淘宝移动充值为什么便宜(淘宝移动充值)
- 6月15日中盐内蒙古PVC最新报价
- 武汉16日进入梅雨季!暴雨大暴雨来了,高温20℃+|今日精选
- 国药现代财务总监郝超峰由于个人原因辞去公司职务 全球消息
- 陕鼓动力:公司致力于推进两个转变发展战略,加速分布式能源市场开拓,增强企业核心竞争力,扩大和巩固市场份额,为公司提升整体市场价值创造坚实的估值基础 环球精选
- 上海要实施企业成长行动 市级“专精特新”企业达到10000家
- 缅甸为什么一直打仗(缅甸为什么打仗)
- 5月份市场销售持续恢复 社会消费品零售总额同比增长12.7%
- 渤海化学: 截至2023年6月9日公司的股东人数为44257 世界实时
- 环球微头条丨2023年梅花金银兔纪念币价格(2023年06月15日)
- 官方:《完美黑暗》《腐烂国度》18个月内有新消息 每日焦点
- 兵马俑攻略观光车_兵马俑攻略
- 当前头条:15日早盘贵金属板块震荡走低,山东黄金跌超5%
- 环球今日报丨砀山属于哪个市_砀
- 世界热门:众多体育场馆开启“夜场模式” 激活城市“夜消费”
- 今日申购:美硕科技、莱斯信息、东方碳素 全球消息
- Jeep回归纯进口!2024款牧马人,国内首度亮相,价格公布... 世界快播报
- 香港金管局维持基准利率在5.50%不变
- 【全球报资讯】环球论坛|沙特缘何日渐对美说“不”
- 当前速读:梁山好汉打生肖_逼上梁山是什么生肖
- 环球快讯:笔记本无法安装鼠标驱动_win7无法安装IE3.0的鼠标驱动
- 天天快消息!这24人真“刑”!山东省首例“套路租”公开宣判
- 2-0!陈雨菲连场中日大战,不惧日本女单围剿,全力冲赛季首冠!-当前热讯
- 波音737200图片(波音737200)
- 当前热门:12个油耗是什么意思 十二个油耗指的是
- 天宇股份:子公司原料药氯沙坦钾通过CDE审批 今日热搜
- 数字虚拟人 有才又有颜
- 忻州:一女子瘫痪后欲轻生,丈夫这样做……
- 【新视野】6月21日科峰股份将接受创业板审核
- 速讯:江苏泰莱斯仪表科技有限公司_关于江苏泰莱斯仪表科技有限公司简述
- 不给办理停息挂账违法吗?什么情况可以办理停息挂账?-天天热推荐
- 焦点热讯:甘肃2023高考各批次志愿设置情况
- 天天观天下!微软与 OpenAI 的幕后冲突:人工智能领域合作与竞争并存的独特关系
- 天空体育:迈阿密国际表示有意让阿尔巴加盟与梅西再联手
- 中阳交警:进企业送安全 筑牢交安防线
- 国家助学贷款累计发放超4000亿元_环球微动态
- 天天热讯:45岁男子熬夜喝冰镇饮料被送进ICU 吃救心丸仍不见好转
- 胡萝卜和海带能在一起吃吗
- 河北省邯郸市2023-06-09 20:13发布雷电黄色预警
- 苹果x首次使用教程视频_苹果x首次使用教程 每日看点
- 六福珠宝黄金价格今天多少一克(2023年06月14日)
- 亚洲象生存的地理环境_亚洲象生活在什么地方
- 每日时讯!珍爱生命 远离危险 泌阳县公安局立足“早”字做好防溺水宣传
- qq黑名单有什么用处 qq黑名单有什么用
- 快资讯:战国阴阳家代表人物_阴阳家代表人物
- 千亿房企退市,阳光城后谁在危险边缘?
- 天天观焦点:兴业银行:6月13日融券卖出7.85万股,融资融券余额107.93亿元
- 世界新资讯:春季能种植的蔬菜?
广告
广告
- 长治襄垣县增收11517万元 提前15天实现首季“开门红”
- 黑龙江讷河新增1例确诊4例无症状 病例详情公布
- 浙江宁波余姚奉化宁海三地开展核酸检测 结果均为阴性
- 浙江湖州南浔三处棋牌室经营者被行拘
- 那年今日 | 一张漫画涨知识之12月13日
- 在宁波乘火车跨省出行须持48小时内核酸阴性证明
- 浙江温州一地发现核酸弱阳性?复采复检结果均为阴性
- 浙江三门发现一名密接者:二次核酸检测结果均为阴性
- 贱卖的发电机 新买的制茶机——安徽水电供区改革两周年回访见闻
- 浙江杭州新增1例新冠肺炎确诊病例 为集中隔离人员
- 2022年研考在即,学硕缩招,专硕时代真的来了?
- 探访杭州核酸检测点:排队高峰多在夜间 医院24小时运转
- 浙江发挥零售药店“哨点”作用 织就疫情防控监测网
- 哈尔滨市本轮疫情首批1名确诊患者出院
- 宁波镇海第三轮全员核酸检测574181人 结果均为阴性
- 陕西新增本土确诊病例1例、境外输入无症状感染者2例
- 齐齐哈尔讷河一地调整为中风险地区
- 浙江新增新冠肺炎确诊病例75例 其中本土74例
- 内蒙古新增本土确诊病例5例 均在呼伦贝尔满洲里市
- 黑龙江无新增确诊病例 新增本土核酸检测初筛阳性人员5例