当前位置:网站首页>PTA tiantisai l1-078 teacher Ji's return (15 points) detailed explanation
PTA tiantisai l1-078 teacher Ji's return (15 points) detailed explanation
2022-07-06 04:07:00 【Ceylan_】
Mr. Ji, who once killed everyone in the TIANTI competition, decided to return to the TIANTI competition !
To simplify the topic , We might as well assume that each topic of the ladder race can use no more than 500 Of 、 A string containing only printable symbols is described , Such as :Problem A: Print "Hello world!"
.
as everyone knows , Mr. Ji's competition level is very excellent , You can think he can do every problem ( In fact, it is ……). therefore , Mr. Ji will look at the questions in order and do them . But Mr. Ji's level is too high , So he didn't bother to do the check-in question ( A waste of time ), say concretely , If there is... In the title string qiandao
perhaps easy
( Case sensitive ) Words , After reading the topic, Mr. Ji will skip the topic and don't do it .
Now, given how many questions there are in this ladder competition and how many questions Mr. Ji has finished , Please tell us which problem Mr. Ji is doing now , Or Mr. Ji has finished all the problems he intends to do .
remind : There are rules for score promotion in TIANTI competition , If you don't do the check-in question, the total score of the team may not be enough to upgrade , Ordinary contestants please don't learn from Mr. Ji's cool behavior !
Input format :
The first line of input is two positive integers N,M (1≤M≤N≤30), It means that this ladder race has N questions , Mr. Ji has finished now M Avenue .
Next N That's ok , Each line is a string that matches the Title Description , Represents the title content of the ladder race . Mr. Ji will look at the questions in the order given —— The first line is the first question Mr. Ji read , The second line is the second way , And so on .
Output format :
Output the question plane corresponding to the question Mr. Ji is currently working on in one line ( That is done M After a topic , Which question is Mr. Ji doing ). If Mr. Ji has finished all the problems he intends to do , Output one line Wo AK le
.
sample input 1:
5 1
L1-1 is a qiandao problem.
L1-2 is so...easy.
L1-3 is Easy.
L1-4 is qianDao.
Wow, such L1-5, so easy.
sample output 1:
L1-4 is qianDao.
sample input 2:
5 4
L1-1 is a-qiandao problem.
L1-2 is so easy.
L1-3 is Easy.
L1-4 is qianDao.
Wow, such L1-5, so!!easy.
sample output 2:
Wo AK le
Detailed code :
#include<stdio.h>
#include<string.h>
int main()
{
int x,y,r=0;
scanf("%d %d",&x,&y);
getchar();
char a[x][1000];
char b[x][1000];
for(int i=0;i<x;i++)
gets(a[i]);
for(int i=0;i<x;i++)
if(strstr(a[i],"easy")==NULL&&strstr(a[i],"qiandao")==NULL)
strcpy(b[r++],a[i]);
if(y>=r)
printf("Wo AK le");
else
printf("%s",b[y]);
return 0;
}
边栏推荐
- Global and Chinese markets for otolaryngology devices 2022-2028: Research Report on technology, participants, trends, market size and share
- MySql數據庫root賬戶無法遠程登陸解决辦法
- 绑定在游戏对象上的脚本的执行顺序
- Record the pit of NETCORE's memory surge
- 【leetcode】1189. Maximum number of "balloons"
- Database, relational database and NoSQL non relational database
- User datagram protocol UDP
- 1291_Xshell日志中增加时间戳的功能
- About some basic DP -- those things about coins (the basic introduction of DP)
- C (XXIX) C listbox CheckedListBox Imagelist
猜你喜欢
MySql数据库root账户无法远程登陆解决办法
在 .NET 6 中使用 Startup.cs 更简洁的方法
Esp32 (based on Arduino) connects the mqtt server of emqx to upload information and command control
Ks003 mall system based on JSP and Servlet
[introduction to Django] 11 web page associated MySQL single field table (add, modify, delete)
TCP/IP协议里面的网关地址和ip地址有什么区别?
Stc8h development (XII): I2C drive AT24C08, at24c32 series EEPROM storage
Chinese brand hybrid technology: there is no best technical route, only better products
About some basic DP -- those things about coins (the basic introduction of DP)
MySQL master-slave replication
随机推荐
Path of class file generated by idea compiling JSP page
math_ Derivative function derivation of limit & differential & derivative & derivative / logarithmic function (derivative definition limit method) / derivative formula derivation of exponential functi
Scalpel like analysis of JVM -- this article takes you to peek into the secrets of JVM
[FPGA tutorial case 11] design and implementation of divider based on vivado core
10個 Istio 流量管理 最常用的例子,你知道幾個?
Plus d'un milliard d'utilisateurs de grandes entreprises comme Facebook ont été compromis, il est temps de se concentrer sur le did
MySQL about self growth
2/10 parallel search set +bfs+dfs+ shortest path +spfa queue optimization
Global and Chinese markets for MRI safe implants 2022-2028: technology, participants, trends, market size and share Research Report
STC8H开发(十二): I2C驱动AT24C08,AT24C32系列EEPROM存储
The global and Chinese market of negative pressure wound therapy unit (npwtu) 2022-2028: Research Report on technology, participants, trends, market size and share
Hashcode and equals
C#(二十九)之C#listBox checkedlistbox imagelist
Facebook and other large companies have leaked more than one billion user data, and it is time to pay attention to did
C#(二十八)之C#鼠标事件、键盘事件
/usr/bin/gzip: 1: ELF: not found/usr/bin/gzip: 3: : not found/usr/bin/gzip: 4: Syntax error:
In Net 6 CS more concise method
WPF效果第一百九十一篇之框选ListBox
判断当天是当月的第几周
Brief tutorial for soft exam system architecture designer | general catalog