处理技巧
CaprYang
这个作者很懒,什么都没留下…
展开
-
Ignatius and the Princess IV HDU - 1029
题解 题目大意 给你n个数字n为奇数 找到出现次数大于n/2的数字 不知道怎么dp 使用一个k表示当前记录的数字cnt表示出现次数 因为出现次数大于一半出现和k不一样的数字就cnt–一样就++ AC代码 #include <stdio.h> #include <iostream> #include <algorithm> using namespace std;...原创 2018-10-12 22:18:20 · 427 阅读 · 0 评论 -
Codeforces Round #532 (Div. 2) B. Build a Contest
题解 题目大意 给你1到n的数字 当已有数字凑齐1到n则输出1否则0 如3 6 1 2 2 3 1 3输出000101 使用两个数组 a记录每个数值出现的次数 b数组记录a的出现次数的出现次数 当b的值等于n的时候输出1 AC代码 #include <stdio.h> #include <bits/stdc++.h> using namespace std; typedef...原创 2019-01-15 09:55:50 · 577 阅读 · 0 评论