当前位置:网站首页>3. seat number
3. seat number
2022-06-28 11:46:00 【HBUcs2020】
1.
#include<iostream>
using namespace std;
#include<string>
#include<cstring>
int main()
{
int n;
cin>>n;
//1. Store... In an array
string s[1001][2];
//2. Store... In structures
while(n--)
{
// Ticket number Test seat number Test seat number
string a,c;
int b; // Note integer
cin>>a>>b>>c;
s[b][0]=a;
s[b][1]=c;
}
cin>>n;
while(n--)
{
int x;
cin>>x;
cout<<s[x][0]<<" "<<s[x][1]<<endl;
}
return 0;
}
2.
#include<stdio.h>
int main()
{
int N,M;
scanf("%d",&N);
struct info{
long long num;
int shiji;
int kaoshi;
}a[1000];
for(int i = 0;i<N;i++){
scanf("%lld%d%d",&a[i].num,&a[i].shiji,&a[i].kaoshi);
}
scanf("%d",&M);
int b[1000];
for(int i=0;i<M;i++){
scanf("%d",&b[i]);
}
for(int i=0;i<M;i++){
for(int j=0;j<N;j++){
if(b[i]==a[j].shiji){
printf("%lld %d\n",a[j].num,a[j].kaoshi);
}
}
}
return 0;
}
边栏推荐
- Apache2 configuration denies access to the directory, but can access the settings of the files inside
- day30 js笔记 BOM和DOM 2021.09.24
- day33 js笔记 事件(下)2021.09.28
- Graduation season, some suggestions for you who are new to the society
- 近况
- How to distinguish and define DQL, DML, DDL and DCL in SQL
- Simulation of the Saier lottery to seek expectation
- 毕业了
- Unity屏幕截图功能
- Day23 JS notes 2021.09.14
猜你喜欢

Web page tips this site is unsafe solution

2022中国信通院首届业务与应用安全发展论坛成功召开!

Day34 JS notes regular expression 2021.09.29

Practice and Thinking on the architecture of a set of 100000 TPS im integrated message system

Class pattern and syntax in JS 2021.11.10

Day37 JS note motion function 2021.10.11

智联招聘基于 Nebula Graph 的推荐实践分享

一套十万级TPS的IM综合消息系统的架构实践与思考

Making and using of dynamic library (shared library)

Scientific research - web of science retrieval skills
随机推荐
Oracle date format exception: invalid number
Xshell and xftp tutorial
Graduated
SoapUI rookie tutorial
MySQL installation configuration and solving the problem of forgetting root password when reinstalling MySQL
Solutions to connection failures and errors when accessing mysql8 using the SSM project
Using soapUI to obtain freemaker's FTL file template
When an entity is converted to JSON, the field with null value is lost
Lihongyi, machine learning 7 Conclusion
ProCAST finite element casting process simulation software
Array method in JS 2021.09.18
来吧元宇宙,果然这热度一时半会儿过不去了
Web page tips this site is unsafe solution
On the output representation of bidirectional LSTM in pytoch
无法重新声明块范围变量
Timestamp and date conversion "suggested collection"
Intranet penetration in the working group environment: some basic methods
Introduction to GDB
mysql-.sql文件钓鱼上线
JS foundation 8