当前位置:网站首页>PAT甲级 1047 Student List for Course
PAT甲级 1047 Student List for Course
2022-07-26 15:55:00 【九是否非随机的称呼】
#include<iostream>
#include<vector>
#include<string>
#include<map>
#include<bits/stdc++.h>
using namespace std;
bool cmp1(string &a, string &b) {
return a < b;
}
int main(void){
int i, j, k, m, n, h, mm, nn;
vector<string> v, v0;
vector<vector<string>> mp;
cin>>m>>n;
mp.resize(n);
string s;
for(i = 0; i < n; i++) mp[i] = v;
for(i = 0; i < m; i++){
cin>>s>>mm;
for(j = 0; j < mm; j++){
cin>>k;
mp[k - 1].push_back(s);
}
}
for(i = 0; i < n; i++){
sort(mp[i].begin(), mp[i].end(), cmp1);
cout<<i+1<<" "<<mp[i].size()<<endl;
for(j = 0; j < mp[i].size(); j++){
cout<<mp[i][j]<<endl;
}
}
return 0;
}边栏推荐
- Google Earth engine - merra-2 m2t1nxaer: aerosol daily data set from 1980 to 2022
- 【工具分享】自动生成文件目录结构工具mddir
- TI C6000 TMS320C6678 DSP+ Zynq-7045的ZYNQ PS + PL异构多核案例开发手册(1)
- 潘多拉 IOT 开发板学习(RT-Thread)—— 实验17 ESP8266 实验(学习笔记)
- Question collection come and ask nllb authors! (Zhiyuan live issue 24)
- 原来卡布奇诺信息安全协会是干这个的呀,一起来看看吧。
- Implementation of personalized healthy diet recommendation system based on SSM
- Clojure 运行原理之字节码生成篇
- 使用 ClojureScript 开发浏览器插件的过程与收获
- How to use job plug-in type to call a kettle job through ETL scheduling tool taskctl?
猜你喜欢

2022你的安全感是什么?沃尔沃年中问道

Implementation of SAP ABAP daemon

大型仿人机器人整机构型研究与应用

认识JS基础与浏览器引擎

一文搞懂│XSS攻击、SQL注入、CSRF攻击、DDOS攻击、DNS劫持

Parker solenoid valve d1vw020dnypz5

A comprehensive review of image enhancement technology in deep learning

parker泵PV140R1K1T1PMMC

Implementation of personalized healthy diet recommendation system based on SSM

教大模型自己跳过“无用”层,推理速度×3性能不变,谷歌MIT这个新方法火了...
随机推荐
Can't you see the withdrawal? Three steps to prevent withdrawal on wechat.
Clojure Web 开发-- Ring 使用指南
Some cutting-edge research work sharing of SAP ABAP NetWeaver containerization
13年资深开发者分享一年学习Rust经历:从必备书目到代码练习一网打尽
Jmeter快速上手之接口测试
The solution to the display disorder of several events files in the tensorboard
Gcc/g++ and dynamic and static libraries and GDB
What is a virtual camera
Specific practice cases of "card note taking method" in Siyuan
大型仿人机器人整机构型研究与应用
Zynq PS + PL heterogeneous multicore Case Development Manual of Ti C6000 tms320c6678 DSP + zynq-7045 (1)
朋友圈如何测试(思维导图)
初识OpenGL (2)编译着色器
御神楽的学习记录之SoC FPGA的第一个工程-Hello World
6种方法帮你搞定SimpleDateFormat类不是线程安全的问题
hawe螺旋插装式单向阀RK4
2021年软件测试工具趋势
tensorboard多个events文件显示紊乱的解决办法
单例模式
Clojure 运行原理之字节码生成篇
https://github.com/ZouJiu1/PAT