![](https://img-blog.csdnimg.cn/20201014180756925.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
模拟
不吸血的Vampire
这个作者很懒,什么都没留下…
展开
-
HDU4272 纯模拟题
#include#include#include#include#include#include#include#include #include #include#includeusing namespace std;#define inf 2147483647#define eps 1e-8#define LL __int64#define M 1005int原创 2013-11-17 20:22:43 · 781 阅读 · 0 评论 -
PKU 1451 较为复杂的模拟题
题意:给定字典和每个单词的权值(表示为概率p)m对于每次查询,输出满足条件的概率最大的单词前缀。根据题意,这题应该是用字典树做的,可惜弱菜还不怎么熟悉字典树,所以就满打满敲,模拟也可以出来。。。#include#include#include#include#include#include#include#include #include #include#includ原创 2013-11-20 19:21:08 · 957 阅读 · 0 评论 -
HDU1023&&大数的规律题
这题主要是练习大数的模拟卡塔兰数递推公式:a[n]=a[n-1]*(4*n-2)/(n+1);#includeusing namespace std;int a[101][101]={0};int main(){ int n,i,j,len,r,temp,t; int b[101]; a[1][0] = 1; len = 1;原创 2013-11-22 22:10:20 · 557 阅读 · 0 评论 -
HDU 1396 && ZJU 1629
题意:给你一个三角形的边长,问能形成多少个三角形。。如n=2时,结果为5;思路:找规律,当边为n是,可以形成边为n,n-1,n-2,n-3,……,1的三角形(注意还有倒立的);对于边为n的三角形个数a[n],我们考虑添在a[n-1]的基础上添加一层后的个数,在这一层上我们有新形成边为1,2,3,……,n-1,n的个数;如:a[6]=a[5]+原创 2014-02-24 20:07:23 · 632 阅读 · 0 评论 -
ZJU 3757 模拟坑题
题意:打台球,给定规则,犯规对方的分,否则自己得分。规则:就一个字烦,至今还有点乱啊~~Cue ball do not hit any object ball. Penalty: the number of target ball.Cue ball is not pocketed and hit at least one ball, but do not hit targe原创 2014-03-03 21:49:37 · 533 阅读 · 0 评论 -
CSU 1312
#include#include#include#include#include#include#include #include #include#include#includeusing namespace std;#define inf 100000#define INF -0x3f3f3f3f#define eps 1e-8#define ll long lo原创 2014-03-06 19:48:47 · 544 阅读 · 0 评论