当前位置:网站首页>Problem a: face recognition
Problem a: face recognition
2022-04-23 03:21:00 【Tang Encheng_ hhhc】
Problem A: Face recognition
Time Limit: 1 Sec Memory Limit: 128 MB
Submit: 3853 Solved: 2258
Description
Google The company launched artificial intelligence , Baidu is not willing to fall behind , On the strongest brain show , Baidu's robot Xiaodu had a face recognition competition with Wang Feng , The result is small to 3:2 Beat Wang Feng .
Now you need to print out a face . Now the face shape is very simple , It consists of two squares , A small square was dug in the middle of a large square .
Input
Multiple sets of test data , Input for each group 2 It's an integer , Are the side lengths of the big square and the small square respectively
Output
Output the corresponding face shape
Sample Input
6 2
Sample Output

#include <stdio.h>
int main()
{
int m,n;
while (scanf("%d%d",&m,&n) != EOF)
{
// Print in several parts
int i,j;
for (i = 0;i < (m-n)/2;i++)// Print the number of lines in front of the small square
{
for (j = 0;j < m-1;j++)
{
printf("*");
}
printf("*\n");
}
for (i = 0;i < n;i++)
{
for (j = 0;j<(m-n)/2;j++)// Print... To the left of the small square *
{
printf("*");
}
for (j = 0;j < n;j++)// Print small squares
{
printf(" ");
}
for (j = 0;j<(m-n)/2;j++)// Print... To the right of the small square *
{
printf("*");
}
printf("\n");
}
for (i = 0;i < (m-n)/2;i++)// Print the number of lines behind the small square
{
for (j = 0;j < m-1;j++)
{
printf("*");
}
printf("*\n");
}
}
return 0;
}
This question , It's usually a cycle , But with 2 Dimension group is also feasible , Please refer to this article
https://blog.csdn.net/zstuyyyyccccbbbb/article/details/103827996
版权声明
本文为[Tang Encheng_ hhhc]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/04/202204220621319986.html
边栏推荐
- Mysql database, inconsistent index character set, slow SQL query, interface timeout
- How to achieve centralized management, flexible and efficient CI / CD online seminar highlights sharing
- WinForm allows the form form to switch between the front and active states
- MySql分组查询规则
- Scenario Title: how does system a use the page of system B
- A set of combination boxing to create an idea eye protection scheme
- 超好用的【通用Excel导入功能】
- 批量下载文件----压缩后再下载
- Student achievement management
- Aspnetcore configuration multi environment log4net configuration file
猜你喜欢

C language to achieve address book - (static version)

Utgard connection opcserver reported an error caused by: org jinterop. dcom. common. JIRuntimeException: Access is denied. [0x800

C语言实现通讯录----(静态版本)

移植tslib时ts_setup: No such file or directory、ts_open: No such file or director

2022 P cylinder filling training test questions and simulation test

. net 5 Web custom middleware implementation returns the default picture
![Use of ADB command [1]](/img/e6/fb8fd6956c226f75b831f8eb46277f.png)
Use of ADB command [1]

2022山东省安全员C证上岗证题库及在线模拟考试

How to achieve centralized management, flexible and efficient CI / CD online seminar highlights sharing
![[mock data] fastmock dynamically returns the mock content according to the incoming parameters](/img/1e/c4aad49d16fb21a19865ba75128e43.png)
[mock data] fastmock dynamically returns the mock content according to the incoming parameters
随机推荐
be based on. NETCORE development blog project starblog - (2) environment preparation and creation project
EasyUI's combobox implements three-level query
Idempotency practice operation, explaining idempotency based on business
Docker pulls MySQL and connects
[MySQL] left function | right function
. NETCORE sets the API post mode, which can accept parameters directly in parentheses
Detailed explanation of socket programming send() and recv() functions
2022t elevator repair test simulation 100 questions and online simulation test
How to achieve centralized management, flexible and efficient CI / CD online seminar highlights sharing
[Mysql] LEFT函數 | RIGHT函數
JS inheritance
Detailed description of MySQL index [B + tree index, hash index, full-text index, overlay index]
幂等性实践操作,基于业务讲解幂等性
Flink customizes the application of sink side sinkfunction
Top 9 task management system in 2022
After the mobile phone is connected to the computer, how can QT's QDIR read the mobile phone file path
It can receive multiple data type parameters - variable parameters
C language to achieve address book - (static version)
“如何实现集中管理、灵活高效的CI/CD”在线研讨会精彩内容分享
There is no index in the database table. When inserting data, SQL statements are used to prevent repeated addition (Reprint)