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

app商城需要手机网站吗wordpress导入媒体失败

app商城需要手机网站吗,wordpress导入媒体失败,软件外包公司账务处理,展览策划CF1692C Wheres the Bishop? 题解题目链接字面描述题面翻译题目描述题目描述输入格式输出格式样例 #1样例输入 #1样例输出 #1提示代码实现题目 链接 https://www.luogu.com.cn/problem/CF1692C 字面描述 题面翻译 题目描述 有一个888\times888的棋盘,列编号从…

CF1692C Where's 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: #̲标明了主教的攻击范围。请你找出主教的位置坐标,并输出其行、列编号。

保证:主教的行、列编号均在222777之间。

你需要回答ttt组测试数据。 (1≤t≤36)(1\le t \le 36)(1t36)

题目描述

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.

代码实现

遍历每一个点看他的四个角和本身是不是"#"即可

#include<bits/stdc++.h>
using namespace std;const int maxn=20;
int t;
char a[maxn][maxn];
inline bool inbound(int x,int y){return x>=1&&x<=8&&y>=1&&y<=8;}
int main(){scanf("%d",&t);while(t--){for(int i=1;i<=8;i++){for(int j=1;j<=8;j++)scanf(" %c",&a[i][j]);}bool flag=false;for(int i=1;i<=8;i++){for(int j=1;j<=8;j++){if(a[i][j]=='#'&&a[i-1][j+1]=='#'&&a[i-1][j-1]=='#'&&a[i+1][j-1]=='#'&&a[i+1][j+1]=='#'){printf("%d %d\n",i,j);break;}}if(flag)break;}}return 0;
}
http://www.yayakq.cn/news/336499/

相关文章:

  • 搜索引擎培训班哈尔滨网站关键字优化
  • 哈尔滨网站建设步骤网站背景跟着鼠标动的图怎么做
  • 网站开发挣不挣钱做智能网站系统下载软件
  • 用dw做网站背景吕梁市城乡建设局网站
  • c#网站开发网易云课堂百度云下载网站购买域名吗
  • 昆明哪有做网站的深圳东门有什么好玩的
  • 源码时代网站首页优化
  • 南京 百度 网站建设加油站网站建设
  • 网站开发界面设计工具找做金融的网站有哪些方面
  • iframe 网站前台模板网站怎么做第三方登录
  • 网站开发技术题目wordpress最底部
  • python做公司网站三亚门户网站
  • dede怎么做商城网站深圳前500强企业名单
  • 网站模块是指什么地方注册网站域名要多少钱
  • 展示网站模版源码上海营销型网站建设方案
  • 专业制作网站的公司网站查询域名解析ip
  • 征二级网站建设意见 通知宁波信誉好品牌网站设计地址
  • 公司建设网站的费用吗怎么给制作网站谷歌地图
  • wordpress播放网易云wordpress安装说明seo工具好用
  • 淄博哪个网站做房屋出赁好wordpress 标签搜索引擎
  • 山东省建设业协会网站免费虚拟房屋设计软件
  • 网站源码是用什么做的廊坊文安建设局网站
  • 怎么做二级网站域名小程序开发平台哪家可信赖
  • 网站建设三站合一商城建站模板
  • 涿州网站建设涿州dw建设网站
  • 温州平阳县企业网站搭建推荐上海外贸网站建设公司
  • 杭州市建设信用网网站商业网站建设
  • 计算机专业论文网站开发电商分销平台
  • 西安哪些做网站的公司好营销策划公司名称
  • 泰安做网站建设的腾博会的网站是什么