当前位置:网站首页>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
边栏推荐
- JS, bind the event for a label with input, and then bind the stand-alone event in the parent element. The event is executed twice and solved
- Establishing and traversing binary tree
- [Mysql] LEFT函數 | RIGHT函數
- Experiment 5 components and event handling
- MySQL keyword group_ Concat, combined connection query
- When migrating tslib_ setup: No such file or directory、ts_ open: No such file or director
- Quartz. Www. 18fu Used in net core
- 幂等性实践操作,基于业务讲解幂等性
- Xamarin effect Chapter 22 recording effect
- Advanced sorting - fast sorting
猜你喜欢
Course design of Database Principle -- material distribution management system
Peut recevoir plusieurs paramètres de type de données - paramètres variables
Supersocket is Use in net5 - startup
可以接收多种数据类型参数——可变参数
Build websocket server in. Net5 webapi
Using swagger in. Net5
A set of combination boxing to create an idea eye protection scheme
软件测试相关知识~
. net webapi access authorization mechanism and process design (header token + redis)
Idea view history [file history and project history]
随机推荐
ThreadLocal 测试多线程变量实例
The website JS in. Net core cefsharp chromium WebBrowser calls the C method in winfrom program
MySQL port is occupied when building xampp
Ide-idea-problem
Optimization of especially slow startup in idea debugging mode
Blazor University (12) - component lifecycle
Experiment 5 components and event handling
Idempotency practice operation, explaining idempotency based on business
After the mobile phone is connected to the computer, how can QT's QDIR read the mobile phone file path
Mise en service PID du moteur de codage (anneau de vitesse | anneau de position | suivant)
通过 zxing 生成二维码
Yes Redis using distributed cache in NE6 webapi
Super easy to use [general excel import function]
Use of ADB command [1]
类似Jira的十大项目管理软件
2022t elevator repair test simulation 100 questions and online simulation test
Batch download of files ---- compressed and then downloaded
A comprehensive understanding of static code analysis
Peut recevoir plusieurs paramètres de type de données - paramètres variables
Configure automatic implementation of curd projects