当前位置:网站首页>[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;
}边栏推荐
- 分布式-总结列表
- FileInputStream
- Common methods in transforms
- VIM easy to use tutorial
- 科研狗可能需要的一些工具
- LeetCode_53(最大子数组和)
- All in all, the low code still needs to solve these four problems
- Dual contractual learning: text classification via label aware data augmentation reading notes
- C#读写应用程序配置文件App.exe.config,并在界面上显示
- LeetCode_ 66 (plus one)
猜你喜欢

STM32扩展板 数码管显示

分布式事务-解决方案

分布式-总结列表

C - detailed explanation of operators and summary of use cases

Neural network - nonlinear activation

数据加载及预处理

Use of dataloader

手动实现一个简单的栈

2022 t elevator repair new version test questions and t elevator repair simulation test question bank

2022 G2 power station boiler stoker examination question bank and G2 power station boiler stoker simulation examination question bank
随机推荐
【FTP】FTP连接时出现“227 Entering Passive Mode”的解决方法
RuntimeError: “max_pool2d“ not implemented for ‘Long‘
The design points of voice dialogue system and the importance of multi round dialogue
线程安全问题
FileOutPutStream
[hardware ten treasures catalogue] - reprinted from "hardware 100000 whys" (under continuous update ~ ~)
Difference between cookie and session
[hard ten treasures] - 1 [basic knowledge] classification of power supply
Overview of the construction details of Meizhou veterinary laboratory
【暑期每日一题】洛谷 P5886 Hello, 2020!
How to do the performance pressure test of "Health Code"
This sideline workload is small, 10-15k, free unlimited massage
Shell之一键自动部署Redis任意版本
对象的序列化与反序列化
How to do the performance pressure test of "Health Code"
Construction of Meizhou nursing laboratory: equipment configuration
【暑期每日一题】洛谷 P5740【深基7.例9】最厉害的学生
Shell之分析服务器日志命令集锦
RuntimeError: mean(): input dtype should be either floating point or complex dtypes. Got Long instead
PR 2021 quick start tutorial, learn about the and functions of the timeline panel