
模拟
poursoul
这个作者很懒,什么都没留下…
展开
-
【ZOJ】3942 Substring Counting【浙江ACM2016省赛G题】【填坑】
传送门:【ZOJ】3942 Substring Counting赛场上写了两个多小时没有过,回来后过了好久才肯补。结果写了4个多小时,还写了trie来对拍,调到电脑没电还没调好,第二天终于找到最后一个细节错,艰难的AC了。各种漏细节,没救了。(希哥说他这题定义是简单题,mdzz!)总之就分三种情况模拟,两边是00,两边是11,两边是01或10(01或10只要reverse下数组就能用同一种方法计算原创 2016-04-26 11:06:09 · 1530 阅读 · 0 评论 -
【HDU】5736 Call It What You Want【暴力+dp】
题目链接:Call It What You Want暴力枚举经过的顺序,然后起点终点在一个子树的做个dp即可。#include <bits/stdc++.h> using namespace std ;typedef long long LL ;#define clr( a , x ) memset ( a , x , sizeof a )const int MAXN = 100005 ; cons原创 2016-10-08 20:04:14 · 842 阅读 · 0 评论 -
【HDU】5859 Captain is coding【优先队列贪心】
题目链接:Captain is coding二分Z用了多少次,然后枚举deadline小的用了多少Z,再优先队列模拟#include <bits/stdc++.h> using namespace std ;typedef long long LL ;#define clr( a , x ) memset ( a , x , sizeof a )const int MAXN = 1005 ;stru原创 2016-10-08 11:44:57 · 528 阅读 · 0 评论