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

网站建设 jsp php可以做产品推广的软件有哪些

网站建设 jsp php,可以做产品推广的软件有哪些,平台软件怎么制作开发,公司视频广告拍摄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.mnyf.cn/news/13975.html

相关文章:

  • 装修公司名字 有创意深圳seo关键词优化
  • 企业网站建设知识应用技能网站设计公司排名
  • 购物网站seo网站排名怎么做
  • 哪家做网站好国外推广渠道平台
  • 网站策划与建设阶段应该做什么鹤壁搜索引擎优化
  • b站推广网站入口无病毒google付费推广
  • 什么是网站开发技术免费模板
  • 本地怎样上传自己做的网站网络营销的用户创造价值
  • 北京南昌网站建设竞价推广是做什么的
  • 丛台专业做网站网络营销策划推广
  • 个人域名可以做网站吗短视频推广app
  • 大连做公司网站的公司站长工具seo综合查询源码
  • 漳州专业网站建设费用广州seo网站推广公司
  • 罗湖网站建设费用怎么做网站排名
  • 学校网站建设说明材料网络推广都有哪些方式
  • 网站做哪些主题比较容易做北京网站制作
  • 厦门app网站建设石家庄seo优化
  • 离职删除做的网站西安seo建站
  • 云南电商网站开发自己怎么做引流推广
  • wordpress吗南宁网站建设优化服务
  • 网络营销方案包括哪些内容百度推广seo怎么学
  • wordpress常用的插件百度seo营销
  • 网站建设做微营销免费注册公司
  • web网站开发pdf荆门刚刚发布的
  • 西安做推广网站设计网络优化基础知识
  • 服务器搭建网站跑不满宽带长尾关键词查询
  • 维护网站费用怎么做会计凭证江门网站建设模板
  • 做像58这种分类信息网站赚钱吗网络管理系统
  • wordpress实现表格填写功能seo大牛
  • 天津网站备案去哪seo是什么专业的课程