Codeforces 903C
来源:互联网 发布:mac系统怎么装win10 编辑:程序博客网 时间:2024/06/11 20:27
每个上升序列最后可以看成一个
所以答案就是每个数的个数的最大值
#include<iostream>#include<algorithm>#include<cstdio>#include<cstdlib>#include<cstring>#include<string>#include<cmath>#include<set>#include<queue>#include<stack>#include<map>#define PI acos(-1.0)#define in freopen("in.txt", "r", stdin)#define out freopen("out.txt", "w", stdout)#define kuaidian ios::sync_with_stdio(0);using namespace std;typedef long long ll;typedef unsigned long long ull;const int maxn = 1e6, maxd = 1000 + 7;const ll mod = 1e9 + 7;const int INF = 0x7f7f7f7f;map<int , int> mp;int main() { kuaidian; int n; cin >> n; int ans = 0; for(int i = 0; i < n; ++i) { int x; cin >> x; mp[x]++; ans = max(ans, mp[x]); } cout << ans << endl; return 0;}
阅读全文
1 0
- Codeforces 903C
- codeforces 903C. Boxes Packing
- Codeforces-340-C(c++)
- Codeforces-507-C(c++)
- CodeForces 731C C
- CodeForces-612C C
- CODEFORCES 265C CODEFORCES, 265C
- codeforces #78 div2 C
- Codeforces 117C Cycle
- CodeForces 209C
- CodeForces 156C Cipher
- codeforces 148 div2 C
- codeforces 242C
- Codeforces-234C Weather
- codeforces 106C Buns
- codeforces 158C
- Codeforces 243C
- CodeForces 13C Sequence
- 移动web(二)viewport视口、像素密度
- 每天一个linux命令(12):more命令
- 在Jupyter notebook里使用conda和pip
- 使用MaxCompute搭建社交好友推荐系统
- [angular]知识碎片
- Codeforces 903C
- 每天一个linux命令(13):less 命令
- CCPC Final 2017(Fair Lottery-单纯形)
- 每天一个linux命令(14):head 命令
- django中ModelForm学习系列一~save方法
- [LeetCode-Algorithms-139] "Word Break" (2017.12.14-WEEK15)
- 如何看待买了Mac,却给Mac安装了Windows这种行为?
- 每天一个linux命令(15):tail 命令
- Codeforces 903B