MDeath-Kid

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

2011年11月14日

摘要: by MDK!2011/11/14 21:34 Crafting Winning Solutions A good way to get a competitive edge is to write down a game plan for what you're going to do in a contest round. This will help you script out your... 阅读全文

posted @ 2011-11-14 21:38 MDeath-Kid 阅读(597) 评论(0) 推荐(1) 编辑

摘要: PROB Milking Cows [ANALYSIS] 对于区间的问题的求法//最长连续区间。/* 考虑: 区间两端点相等的情况。 * 区间如何排序 * 每次区间要求的值改变的情况都去吃max * 每次都要考虑区间最初和最后 */struct cmp{ bool operator () (PII a,PII b) { if(a.first == b.first) return a.s... 阅读全文

posted @ 2011-11-14 09:04 MDeath-Kid 阅读(209) 评论(0) 推荐(0) 编辑

2011年11月13日

摘要: ~ | & ^ << >>这些都是按位运算,什么意思?就是一位一位的进行运算。所以 ! 和 ~ 是不同的。基本的操作:and ----- &or ----- |取反 ----- ~异或 ----- ^同或 ----- ~(^) // 异或后求反<<(左移) >>(右移)(真值表很容易在网上搜到,就不列了)这5个基本的运算可以求出很多意想不到的东西。下面是一些自己总结的:一般位运算分为:取位操作、改位操作、功能性的操作。取出某个数的某一位:get_bitbool get_bit(int t,int x) { // 在 t 中,取出第 阅读全文

posted @ 2011-11-13 21:58 MDeath-Kid 阅读(1358) 评论(0) 推荐(0) 编辑

摘要: 突然间有种感觉,就是,这么花时间的搞ACM到底值不值? 以前从没有想过这个问题,随着感觉走,一开始就是为了AC的快感,每个题目被解决后的兴奋,记得自己在没有看过任何搜索或者回溯的算法书的情况下想到了回溯枚举,纯粹的思考,后来后来,不知道什么时候,自己是为了AC而AC,为了能多做出来一个题目,为了ranklist上一名,为了能拿到好名次……于是自己很恶心度这么长的英文,很恶心WA,恶心实现巨复杂的模... 阅读全文

posted @ 2011-11-13 20:51 MDeath-Kid 阅读(161) 评论(0) 推荐(0) 编辑

2011年11月11日

摘要: Complete Search The Idea(思想:) Solving a problem using complete search is based on the ``Keep It Simple, Stupid'' principle. The goal of solving contest problems is to write programs that work in th... 阅读全文

posted @ 2011-11-11 10:24 MDeath-Kid 阅读(228) 评论(0) 推荐(0) 编辑

2011年11月10日

摘要: 这个链接就不多说了吧。自己的总结,从2011.11.9日开始做的。看看什么时候结束。不得不说,这里的英文感觉还是很棒的,锻炼下自己的英语阅读,而且TEXT里面的东西对我都是新的东西。USACO做起来每个题目都很透明,能准确的知道得失,对思维的锻炼还是很棒的。PROB Your Ride Is Here [ANALYSIS] ---从这个题目开始,慢慢的开始把英语当场一种语言。TEXT Contest Problem Types ---把题目分成了16类,ad hoc 的意思我猜是杂题。PROB Greedy Gift Givers [ANALYSIS] ---前面的题目对我来说多不算难,但是看 阅读全文

posted @ 2011-11-10 20:56 MDeath-Kid 阅读(190) 评论(0) 推荐(0) 编辑

2011年11月9日

摘要: 图论的题目,求一个人通过虫洞或者普通路径进行行走,能不能在出发前回到原地,抽象成最短路回到原地权值为负。 我数组开505,RE了,结果改大了就A了。 MDK 3259 Accepted 860K 813MS G++ 2604B 2011-11-09 20:54:46#define MAXN 5050struct edge { int v; int dis; edge(int a=0,int ... 阅读全文

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

摘要: 第K短路。A*经典问题:要求两点间的K短路,则图中一个点最多如队列K次(这些都是结论),POJ 2449#define MAXN 10005constint INTMAX =0x7f7f7f7f;int minl[MAXN],vis[MAXN];int n, m, stx, sty, k, mark;struct node { int x; int dis;}u,s,v,t;struct edge { int v; int dis;}p;vector<edge> mat[10005];vector<edge> matT[10005];priority_queue< 阅读全文

posted @ 2011-11-09 20:38 MDeath-Kid 阅读(259) 评论(0) 推荐(0) 编辑

摘要: /*ACMer:MDK2011-04-19 18:20:35 Accepted 1558 C++ 0 196 MDK */#include<stdio.h>#include<iostream>#include<limits.h>#include<string.h>#include<math.h>#define MAXN 2005usingnamespace std;int num[14]={0},opt[MAXN]= {0};int fun(int n){ if(n==0) return0; if(opt[n]) return opt 阅读全文

posted @ 2011-11-09 20:37 MDeath-Kid 阅读(259) 评论(0) 推荐(0) 编辑

2011年11月8日

摘要: 模拟题目,没什么难度。 //MDK 1573 Accepted 216K 0MS C++ 2460B 2011-11-08 19:31:29int n,m,ini;char mat[MAXN][MAXN];int vis[MAXN][MAXN];int go[4][2]={{-1,0},{1,0},{0,-1},{0,1}};int getgo(char c) { if(c == 'N') ret... 阅读全文

posted @ 2011-11-08 19:38 MDeath-Kid 阅读(209) 评论(0) 推荐(0) 编辑

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