当前位置:网站首页>[summer daily question] Luogu p5886 Hello, 2020!
[summer daily question] Luogu p5886 Hello, 2020!
2022-07-01 04:48:00 【AC_ Dragon】
Topic link :P5886 Hello, 2020! - Luogu | New ecology of computer science education (luogu.com.cn)
Background
The hour hand coincides with the minute hand 「 zero 」 At that moment , The ticking sound announced the arrival of the new year .
In the past year , Impermanence, . In front of the screen, you may have heard it not long ago 「OI」, It may also temporarily end the competition career ; May be at the top of the list , May also bear the loneliness of losing the game alone .
in any case , The past is still the past , The future is still the future .
Start with this topic , Meet you 2020 Well !
Title Description

Input format

Output format

Examples #1
The sample input #1
4 3 2
2 2 3
1 1
3 1 2 3
2 1 3Sample output #1
1
2Tips

AC code:
#include<iostream>
#include<algorithm>
#include<vector>
using namespace std;
const int N = 1e6+10;
int a[N];
int main()
{
int n,m,p;
cin>>n>>m>>p;
while(n--)
{
int t;
cin>>t;
while(t--)
{
int x;
cin>>x;
a[x]++;
}
}
vector<int> res;
for(int i=1;i<=m;i++) // Note that the range must be 1~m , Otherwise, the test point cannot pass !!!
if(a[i]==p)
res.push_back(i);
// sort(res.begin(),res.end()); // Put in res The container has been placed from small to large according to the serial number , So there is no need to sort .
cout<<res.size()<<endl;
for(int i:res)
cout<<i<<" "; // Note the output format !!!
return 0;
}边栏推荐
- [hardware ten treasures catalogue] - reprinted from "hardware 100000 whys" (under continuous update ~ ~)
- Matters behind the construction of paint testing laboratory
- Pytorch(二) —— 激活函数、损失函数及其梯度
- Kodori tree board
- Thoughts on the construction of Meizhou cell room
- Cmake selecting compilers and setting compiler options
- How do I sort a list of strings in dart- How can I sort a list of strings in Dart?
- 【FTP】FTP常用命令,持续更新中……
- 【暑期每日一题】洛谷 P2637 第一次,第二次,成交!
- Neural network - nonlinear activation
猜你喜欢

常用的Transforms中的方法

Dede collection plug-in does not need to write rules

RuntimeError: mean(): input dtype should be either floating point or complex dtypes.Got Long instead

Extension fragment

Shell之一键自动部署Redis任意版本

分布式架构系统拆分原则、需求、微服务拆分步骤

LM小型可编程控制器软件(基于CoDeSys)笔记二十:plc通过驱动器控制步进电机

C read / write application configuration file app exe. Config and display it on the interface

无器械健身

扩展-Fragment
随机推荐
2022.2.7-2.13 AI industry weekly (issue 84): family responsibilities
Common interview questions ①
[difficult] sqlserver2008r2, can you recover only some files when recovering the database?
RuntimeError: “max_pool2d“ not implemented for ‘Long‘
Neural networks - use sequential to build neural networks
扩展-Fragment
Codeworks round 449 (Div. 1) C. Kodori tree template
JVM栈和堆简介
字符输入流与字符输出流
STM32扩展板 温度传感器和温湿度传感器的使用
LeetCode_ 28 (implement strstr())
1076 Forwards on Weibo
FileInputStream
LeetCode_66(加一)
Research on medical knowledge atlas question answering system (I)
[hardware ten treasures catalogue] - reprinted from "hardware 100000 whys" (under continuous update ~ ~)
Pytorch neural network construction template
分布式-总结列表
对象的序列化与反序列化
I also gave you the MySQL interview questions of Boda factory. If you need to come in and take your own