HDU-题解
HDU题目题解
677niubility
这个作者很懒,什么都没留下…
展开
-
HDU-1029题解
题意很简单,给你一堆数字,让你找出这堆数字中相同次数大于 (n+1)/2的 思路: 一开始想的是map,后来发现还有更省时间和空间的做法: long long a;int b; while (scanf("%d", &n) != EOF) { int num,count; count=0; for (int i = 0; i < n; i++) { scanf("%lld", &a);原创 2021-02-27 12:34:20 · 178 阅读 · 0 评论 -
HDU-1176
#include <iostream> #include <cstdio> #include <string.h> #include <cmath> using namespace std; long long dp[100050][15]; int pies[100050][15]; int n; void solve() { // for(int i=n;i>=0;) } /* 1 5 1 4 1 6 1 7 2 7 2 8 3 0 */...原创 2021-02-27 12:23:18 · 122 阅读 · 0 评论