当前位置:网站首页>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;
}
边栏推荐
- Prime Protocol宣布在Moonbeam上的跨链互连应用程序
- Ethernet port &arm & MOS &push-pull open drain &up and down &high and low sides &time domain and frequency domain Fourier
- [adjustable delay network] development of FPGA based adjustable delay network system Verilog
- Python book learning notes - Chapter 09 section 01 create and use classes
- C#(二十九)之C#listBox checkedlistbox imagelist
- TCP/IP协议里面的网关地址和ip地址有什么区别?
- Développement d'un module d'élimination des bavardages à clé basé sur la FPGA
- How does technology have the ability to solve problems perfectly
- 脚本生命周期
- 使用JS完成一个LRU缓存
猜你喜欢
[adjustable delay network] development of FPGA based adjustable delay network system Verilog
Stack and queue
10 exemples les plus courants de gestion du trafic istio, que savez - vous?
MySQL master-slave replication
WPF effect Article 191 box selection listbox
Database, relational database and NoSQL non relational database
In Net 6 CS more concise method
ESP32(基于Arduino)连接EMQX的Mqtt服务器上传信息与命令控制
Yyds dry goods inventory hcie security Day11: preliminary study of firewall dual machine hot standby and vgmp concepts
Error 1045 (28000): access denied for user 'root' @ 'localhost' (using password: no/yes
随机推荐
/usr/bin/gzip: 1: ELF: not found/usr/bin/gzip: 3: : not found/usr/bin/gzip: 4: Syntax error:
记一次excel XXE漏洞
Yyds dry goods inventory hcie security Day11: preliminary study of firewall dual machine hot standby and vgmp concepts
Exchange bottles (graph theory + thinking)
Le compte racine de la base de données MySQL ne peut pas se connecter à distance à la solution
JVM的手术刀式剖析——一文带你窥探JVM的秘密
简易博客系统
Script lifecycle
[adjustable delay network] development of FPGA based adjustable delay network system Verilog
P7735-[noi2021] heavy and heavy edges [tree chain dissection, line segment tree]
Plus d'un milliard d'utilisateurs de grandes entreprises comme Facebook ont été compromis, il est temps de se concentrer sur le did
51nod 1130 n factorial length V2 (Stirling approximation)
[Zhao Yuqiang] deploy kubernetes cluster with binary package
math_极限&微分&导数&微商/对数函数的导函数推导(导数定义极限法)/指数函数求导公式推导(反函数求导法则/对数求导法)
Simple blog system
如何修改表中的字段约束条件(类型,default, null等)
TCP/IP协议里面的网关地址和ip地址有什么区别?
WPF effect Article 191 box selection listbox
MySQL master-slave replication
math_ Derivative function derivation of limit & differential & derivative & derivative / logarithmic function (derivative definition limit method) / derivative formula derivation of exponential functi