当前位置:网站首页>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;
}
边栏推荐
- 【FPGA教程案例11】基于vivado核的除法器设计与实现
- Cf464e the classic problem [shortest path, chairman tree]
- 【可调延时网络】基于FPGA的可调延时网络系统verilog开发
- About some basic DP -- those things about coins (the basic introduction of DP)
- 10 exemples les plus courants de gestion du trafic istio, que savez - vous?
- Scalpel like analysis of JVM -- this article takes you to peek into the secrets of JVM
- /usr/bin/gzip: 1: ELF: not found/usr/bin/gzip: 3: : not found/usr/bin/gzip: 4: Syntax error:
- 查询mysql数据库中各表记录数大小
- 【按鍵消抖】基於FPGA的按鍵消抖模塊開發
- Mathematical modeling regression analysis relationship between variables
猜你喜欢
Network security - Security Service Engineer - detailed summary of skill manual (it is recommended to learn and collect)
10 exemples les plus courants de gestion du trafic istio, que savez - vous?
Maxay paper latex template description
Viewing and verifying backup sets using dmrman
MySql數據庫root賬戶無法遠程登陸解决辦法
记一次excel XXE漏洞
C mouse event and keyboard event of C (XXVIII)
AcWing 243. A simple integer problem 2 (tree array interval modification interval query)
Chinese brand hybrid technology: there is no best technical route, only better products
MySQL master-slave replication
随机推荐
Custom event of C (31)
《2022年中国银行业RPA供应商实力矩阵分析》研究报告正式启动
JVM的手术刀式剖析——一文带你窥探JVM的秘密
Network security - Security Service Engineer - detailed summary of skill manual (it is recommended to learn and collect)
Yyds dry goods inventory hcie security Day11: preliminary study of firewall dual machine hot standby and vgmp concepts
C language -- structs, unions, enumerations, and custom types
Global and Chinese market of rubber wheel wedges 2022-2028: Research Report on technology, participants, trends, market size and share
MySql数据库root账户无法远程登陆解决办法
Mysql数据库慢sql抓取与分析
Interface idempotency
STC8H开发(十二): I2C驱动AT24C08,AT24C32系列EEPROM存储
Use js to complete an LRU cache
2/13 review Backpack + monotonic queue variant
关于进程、线程、协程、同步、异步、阻塞、非阻塞、并发、并行、串行的理解
Comprehensive ability evaluation system
Global and Chinese markets for patent hole oval devices 2022-2028: Research Report on technology, participants, trends, market size and share
[FPGA tutorial case 11] design and implementation of divider based on vivado core
[disassembly] a visual air fryer. By the way, analyze the internal circuit
Mathematical modeling regression analysis relationship between variables
MySQL transaction isolation level