当前位置:网站首页>7-8 likes (need to continue to improve)
7-8 likes (need to continue to improve)
2022-07-06 16:44:00 【HBUcs2020】
The subject is very simple , But I feel the program is too complicated , The complexity of time and space is too high
Take a note of it , Find a better way to modify

#include<iostream>
using namespace std;
int main()
{
int n;
cin>>n;
int a[1001]={0};
while(n--)
{
int k;
cin>>k;
while(k--)
{
int num;
cin>>num;
a[num]++;
}
}
int max=-1,maxnum;
for(int i=1;i<=1000;i++)
{
// printf("%d ",a[2]);
if(a[i]>=max)
{
maxnum=i;
max=a[i];
// printf(" The number of times is %d ",max);
}
}
printf("%d %d",maxnum,max);
return 0;
}边栏推荐
- Spark的RDD(弹性分布式数据集)返回大结果集
- Codeforces Global Round 19
- 第5章 消费者组详解
- Sublime text code formatting operation
- 第7章 __consumer_offsets topic
- Spark's RDD (elastic distributed data set) returns a large result set
- Browser print margin, default / borderless, full 1 page A4
- 腾讯面试算法题
- Audio and video development interview questions
- Chapter 7__ consumer_ offsets topic
猜你喜欢

Install Jupiter notebook under Anaconda

使用jq实现全选 反选 和全不选-冯浩的博客

Advancedinstaller installation package custom action open file

(lightoj - 1369) answering queries (thinking)

Chapter 1 overview of MapReduce

Spark独立集群Worker和Executor的概念

ByteDance new programmer's growth secret: those glittering treasures mentors

Mp4 format details

Simply try the new amp model of deepfacelab (deepfake)

Kubernetes集群部署
随机推荐
(lightoj - 1354) IP checking (Analog)
LeetCode 1984. Minimum difference in student scores
Educational Codeforces Round 122 (Rated for Div. 2)
LeetCode1556. Thousand separated number
Soft music -js find the number of times that character appears in the string - Feng Hao's blog
Gridhome, a static site generator that novices must know
Browser print margin, default / borderless, full 1 page A4
LeetCode 1545. Find the k-th bit in the nth binary string
MariaDB的安装与配置
(lightoj - 1236) pairs forming LCM (prime unique decomposition theorem)
图像处理一百题(11-20)
Chapter 2 shell operation of hfds
LeetCode 1550. There are three consecutive arrays of odd numbers
Cmake error: could not create named generator visual studio 16 2019 solution
Research Report on market supply and demand and strategy of Chinese table lamp industry
Research Report on market supply and demand and strategy of China's four seasons tent industry
Research Report on hearing health care equipment industry - market status analysis and development prospect prediction
Discussion on QWidget code setting style sheet
FLV格式详解
(lightoj - 1323) billiard balls (thinking)