当前位置:网站首页>Pat class a 1047 student list for course
Pat class a 1047 student list for course
2022-07-26 16:12:00 【IX. is it a non random title】
#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;
}边栏推荐
- Paper: all models are wrong, but many are useful: all models are wrong, but many are useful: understand the importance of variables by studying a whole class of prediction models at the same time
- 基于SSM开发实现校园疫情防控管理系统
- C # set different text watermarks for each page of word
- Operating system migration practice: deploying MySQL database on openeuler
- PAT甲级 1049 Counting Ones
- Bucher gear pump qx81-400r301
- First knowledge of OpenGL (2) compilation shaders
- Specific practice cases of "card note taking method" in Siyuan
- ES6 advanced - query commodity cases
- 2022年最新西藏建筑施工架子工(建筑特种作业)模拟考试试题及答案
猜你喜欢

German EMG e-anji thruster ed301/6 HS

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

基于SSM开发实现校园疫情防控管理系统

Summary of QT plug-in development -- add plug-in menu in the main interface

综合设计一个OPPE主页--明星机型的设计

测试用例千万不能随便,记录由一个测试用例异常引起的思考

Operating system migration practice: deploying MySQL database on openeuler

Google Earth engine - merra-2 m2t1nxlv: 1980 present global pressure, temperature, wind and other data sets

Gcc/g++ and dynamic and static libraries and GDB

Implementation of personalized healthy diet recommendation system based on SSM
随机推荐
A coal mine in Yangquan, Shanxi Province, suffered a safety accident that killed one person and was ordered to stop production for rectification
Gcc/g++ and dynamic and static libraries and GDB
Octree establishes map and realizes path planning and navigation
HaWe screw cartridge check valve RK4
ES6 advanced - query commodity cases
2022年最新西藏建筑施工架子工(建筑特种作业)模拟考试试题及答案
Bugku login2
Summary of QT plug-in development -- add plug-in menu in the main interface
ZABBIX 6.2.0 deployment
泰山OFFICE技术讲座:WORD的缩放比例与显示略有差异
操作系统迁移实战之在openEuler上部署MySQL数据库
Clojure Web 开发-- Ring 使用指南
Musk was exposed to be the founder of Google: he broke up his best friend's second marriage and knelt down to beg for forgiveness
《硅谷之谜》读后感
Implementation of SAP ABAP daemon
共议公共数据开放,“数牍方案”亮相数字中国建设峰会
Parker pump pv140r1k1t1pmmc
一款可视化浏览器历史的 Firefox/Chrome 插件
基于NoCode构建简历编辑器
ROS problems and Solutions - relying on package installation and unable to correct errors
https://github.com/ZouJiu1/PAT