当前位置:网站首页>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;
}
边栏推荐
- Fancy features and cheap prices! What is the true strength of Changan's new SUV?
- How to distinguish and define DQL, DML, DDL and DCL in SQL
- [sciter]: use of sciter FS module scanning file API and its details
- 面试步骤的面试技巧
- [no title] the virtual machine vmnet0 cannot be found and an error is reported: there is no un bridged host network adapter
- day30 js笔记 BOM和DOM 2021.09.24
- SoapUI rookie tutorial
- Calculate time using calendar
- day25 js中的预解析、递归函数、事件 2021.09.16
- ThreadLocal的简单理解
猜你喜欢
This Exception was thrown from a job compiled with Burst, which has limited exception support. 报错

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

Packaging and publishing application of jetpack compose desktop version

Day32 JS note event (Part 1) September 27, 2021

无法重新声明块范围变量

Array method in JS 2021.09.18

day32 js笔记 事件(上)2021.09.27

Day33 JS note event (Part 2) September 28, 2021

Jetpack Compose Desktop 桌面版本的打包和发布应用

day34 js笔记 正则表达式 2021.09.29
随机推荐
What method is required for word, PDF and txt files to realize full-text content retrieval?
100 important knowledge points that SQL must master: retrieving data
Oracle date format exception: invalid number
Practice and Thinking on the architecture of a set of 100000 TPS im integrated message system
Making and using of dynamic library (shared library)
day33 js笔记 事件(下)2021.09.28
Remote login sshd service
Day37 JS note motion function 2021.10.11
Get current system date
Download and install mysql5.7 for windows 10
The default point of this in JS and how to modify it to 2021.11.09
Day34 JS notes regular expression 2021.09.29
Making and using of static library
东方财富手机股票开户哪个券商更安全更方便?
Mysql使用max函数查询不到最大值
Day29 JS notes 2021.09.23
Day39 prototype chain and page Fireworks Effect 2021.10.13
Day28 strict mode, string JS 2021.09.22
Packaging and publishing application of jetpack compose desktop version
QML control type: tabbar