MDeath-Kid

- M I T & Y
  博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理
上一页 1 2 3 4 5 6 7 8 ··· 10 下一页

2011年11月7日

摘要: 巨复杂的一个模拟题。首先给的坐标系统和正常的二维数组下标不一样,需要你颠倒过来,这一来你的方向标就要颠倒。接着就模拟就行了。POJ 2632MDK2632Accepted212K16MSC++3365B2011-11-07 21:54:51struct roboot { int x,y; char dire;}R[MAXN];struct Ans { int ith; char dire; int rep;}A[MAXN];int a,b;int n,m;int mat[MAXN][MAXN];int go[4][2]={{0,1},{0,-1},{-1,0},{... 阅读全文

posted @ 2011-11-07 21:59 MDeath-Kid 阅读(337) 评论(0) 推荐(0) 编辑

摘要: 模拟题目,先把P转换成 字符串 ,然后在求 Wq By an integer sequence P = p1 p2...pn where pi is the number of left parentheses before the ith right parenthesis in S (P-sequence).q By an integer sequence W = w1 w2...wn where for each right parenthesis, say a in S, we associate an integer which is the number of right pare 阅读全文

posted @ 2011-11-07 19:43 MDeath-Kid 阅读(534) 评论(0) 推荐(0) 编辑

摘要: 看完这个题目后,果断没思路了,看了一下discuss,百度了一下,知道了什么是后缀式,前缀式,然后用后缀式+stack+位枚举水过了。换成C++提交MDK3295Accepted172K0MSC++2636B2011-11-07 16:59:540ms亲~~POJ 3295MDK3295Accepted704K16MSG++2636B2011-11-07 16:55:58stack<bool> st;char ss[MAXN];int len = 0;bool p, q, r, s, t;bool get_bit(int t,int x) { // 在 t 中,取出第 x 位 .. 阅读全文

posted @ 2011-11-07 17:00 MDeath-Kid 阅读(339) 评论(0) 推荐(0) 编辑

摘要: 以前就做过的一道题目,结果程序中打错一个系数,WA了一段时间。。。POJ 2586MDK2586Accepted716K16MSG++1675B2011-11-07 15:52:32int main () { int d,s; while(~SCFD(s,d)) { int sum = 0; if(4 * s < d) { sum = 10 * s - 2 * d; } else if(3 * s < 2 * d) { sum = 8 * s - 4 * d; } else if(2... 阅读全文

posted @ 2011-11-07 15:55 MDeath-Kid 阅读(199) 评论(0) 推荐(0) 编辑

摘要: http://hi.baidu.com/zchening/blog/item/3f13792b185fa8f6e6cd4015.html在学校活动中心墙上看到的一篇学长的经验之谈,说的很到位,以此自勉!!!!慎于言而敏于行,多说无益,从看完这篇文章开始努力吧,三十而立:八年后给自己一个答复!面对如山般压来的困难,我们需用淡定的心情来审视,用无比的毅力来坚持人物档案:赵鹏,辽宁鞍山人,中共党员,我校电子信息学院电子信息工程专业2007届毕业生。在校期间,曾担任班长,先后多次优秀学生奖学金和单项工作奖学金。积极参加各类学科竞赛,2005年获全国国家数学建模竞赛二等奖,2006年首届国际数模一等奖; 阅读全文

posted @ 2011-11-07 09:17 MDeath-Kid 阅读(252) 评论(0) 推荐(0) 编辑

摘要: 你见,或者不见我 我就在那里 不悲不喜 你念,或者不念我 情就在那里 不来不去 你爱,或者不爱我 爱就在那里 不增不减 你跟,或者不跟我 我的手就在你手里 不舍不弃 来我的怀里 或者 让我住进你的心里 默然 相爱 寂静 欢喜 阅读全文

posted @ 2011-11-07 09:02 MDeath-Kid 阅读(134) 评论(0) 推荐(0) 编辑

2011年11月6日

摘要: 二分过的,注意对整数二分的时候,if判断要有=号,找了好长时间,自己都忘了。。POJ 2109MDK2109Accepted736K32MSG++1644B2011-11-06 21:18:20int n;double p;double cal(int x) { return pow(x,n);}int main () { while(~scanf("%d %lf",&n,&p)) { int ans; int L = 1,R = 1000000000; while(L <= R) { int mid = (L + R... 阅读全文

posted @ 2011-11-06 21:20 MDeath-Kid 阅读(279) 评论(0) 推荐(0) 编辑

摘要: 纠结了很长时间,决定还是不写这个题目了,HOJ的过了,POJ一直WA,估计就是精度问题了,这个贪心思维挺会,精度控制就很无脑了,决定放弃这个题目,贴出来HOJ 1052的代码。HOJ 1052 POJ 1328#include <stdio.h>#include <iostream>#include <algorithm>#include <limits.h>#include <map>#include <cmath>#include <set>#define FOPEN freopen("D:\\1 阅读全文

posted @ 2011-11-06 20:47 MDeath-Kid 阅读(281) 评论(0) 推荐(0) 编辑

摘要: WA 11了 居然是没有去掉注释。。。。ORZ自己了,有自己一个响亮的耳光。没什么难度,状态转移,BFS,然后打出答案就行了,记得有个点会被change2次,在变一次就行了POJ 2965/***BFSMDK2965Accepted3620K782MSG++2590B2011-11-06 20:14:26*/struct node { int sta; int step; int prenode; int x,y; node(int a=0,int b=0,int c=0,int d=0,int e=0) :sta(a),step(b),prenode(c)... 阅读全文

posted @ 2011-11-06 20:18 MDeath-Kid 阅读(247) 评论(0) 推荐(0) 编辑

摘要: 可以看的出来,我现在的水平大大的下降了,不知道是不是发烧烧糊涂了。。就当是了。这个题目DFS,BFS都能做,第一反应就是高斯消元,硬着头皮自己写了个BFS,发现什么都不会了,没hash判重,没有转移正确,都。。都恶心死自己了。纠结了2个小时,终于A了。谢天谢地。还有,POJ的hash_map不能用了,有谁知道怎么解决吗?BS下POJ总结BFSBFS 1 // node 2 struct node { 3 int sta; 4 int step; 5 node(int a,int b) { 6 sta = a; 7 step = b; 8 ... 阅读全文

posted @ 2011-11-06 18:11 MDeath-Kid 阅读(230) 评论(0) 推荐(0) 编辑

上一页 1 2 3 4 5 6 7 8 ··· 10 下一页