ACM
ipqhjjybj
学生
展开
-
CF 327D - Block Tower 数学题 DFS 初看很难,想通了就感觉很简单
D. Block Towertime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputAfter too much playing on paper, Iahub has swi原创 2013-07-06 16:12:15 · 1654 阅读 · 0 评论 -
CF E. Axis Walking DP 唉。。看了别的神牛的代码忽然发现差距好大
E. Axis Walkingtime limit per test3 secondsmemory limit per test512 megabytesinputstandard inputoutputstandard outputIahub wants to meet his girlfriend Iahubina原创 2013-07-07 01:13:15 · 2832 阅读 · 1 评论 -
HDU 2444 The Accomodation of Students 判断二分图 + 最大匹配
Problem DescriptionThere are a group of students. Some of them may know each other, while others don't. For example, A and B know each other, B and C know each other. But this may not imply that A a原创 2013-06-23 22:34:37 · 1226 阅读 · 0 评论 -
cf 323A A. Black-and-White Cube 立体构造 不知道为什么当k为奇数时构造不出来 挺有趣的题目吧
A. Black-and-White Cubetime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputYou are given a cube of size k × k × k, which原创 2013-07-09 12:40:30 · 1668 阅读 · 0 评论 -
POJ 2942 Knights of the Round Table 点全连通分量 + DFS染色 做的好辛苦
题目描述:Being a knight is a very attractive career: searching for the Holy Grail, saving damsels in distress, and drinking with the other knights are fun things to do. Therefore, it is not very surpr原创 2013-06-24 21:29:45 · 1390 阅读 · 0 评论 -
HDU 2767 Proving Equivalences Tanjan+缩点 直接当缩点的模板吧
#include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std;#define inf 0x3f原创 2013-06-25 00:24:01 · 1500 阅读 · 0 评论 -
HDU 3549 Flow Problem 最大流 最小增广路 EK算法 传说中的入门算法
题目描述Network flow is a well-known difficult problem for ACMers. Given a graph, your task is to find out the maximum flow for the weighted directed graph.Input:The first line of input contains a原创 2013-06-25 16:39:26 · 1594 阅读 · 0 评论 -
CF:322D - Ciel and Duel 贪心 或者 DP 我用的贪心 。。难道sort跟qsort是不一样的么?
D. Ciel and Dueltime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputFox Ciel is playing a card game with her f原创 2013-07-12 10:48:37 · 1836 阅读 · 0 评论 -
CF 322B Ciel and Flowers 贪心水题
B. Ciel and Flowerstime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputFox Ciel has some flowers: r red flowers原创 2013-07-11 22:26:05 · 2659 阅读 · 0 评论 -
HDU 1542 Atlantis 线段树矩形并 看别人的题解看了好多遍啊。 还是用了好久时间排错。
http://www.cnblogs.com/ka200812/archive/2011/11/13/2247064.html用的是此博文所说的方法。。也参考了他的代码。。真的是排错排的好辛苦啊。。。。下次把周长并的也做掉好了。。 /* *以前一直云里雾理的Atantic,今天终于要自己动手写啦!! *@author ipqhjjybj *@data 2013062原创 2013-06-26 16:34:52 · 1300 阅读 · 0 评论 -
HDU 1878 欧拉回路 Tarjan+欧拉判定
题目描述:欧拉回路是指不令笔离开纸面,可画过图中每条边仅一次,且可以回到起点的一条回路。现给定一个图,问是否存在欧拉回路?Input:测试输入包含若干测试用例。每个测试用例的第1行给出两个正整数,分别是节点数N ( 1 束。/** * 欧拉回路 无向图判定条件 * 1、度数为奇数的点的个数为0 * 2、图是连通的 * * 有向图判定条件:原创 2013-06-27 00:05:15 · 1247 阅读 · 0 评论 -
CF 322C - Ciel and Robot 计算周期
C. Ciel and Robottime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputFox Ciel has a robot on a 2D plane. Initia原创 2013-07-12 08:24:04 · 2248 阅读 · 0 评论 -
CF 322A Ciel and Dancing 好简单的题。。最喜欢水题了
A. Ciel and Dancingtime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputFox Ciel and her friends are in a dancin原创 2013-07-11 21:57:52 · 1486 阅读 · 0 评论 -
POJ 2230 Watchcow 欧拉路径 DFS
题目描述:Bessie's been appointed the new watch-cow for the farm. Every night, it's her job to walk across the farm and make sure that no evildoers are doing any evil. She begins at the barn, makes her原创 2013-06-27 12:50:18 · 1418 阅读 · 0 评论 -
NEU 1008 Friends number 数论 打表
题目描述:Paula and Tai are couple. There are many stories between them. The day Paula left by airplane, Tai send one message to telephone 2200284, then, everything is changing… (The story in “the sn原创 2013-06-30 00:26:16 · 1964 阅读 · 0 评论 -
NEU 1013 bits 动态规划
题目描述:Rory Consider an ordered set S of strings of N (1 This set of strings is interesting because it is ordered and contains all possible strings of length N that have L (1 Your task is to rea原创 2013-06-30 16:25:10 · 1768 阅读 · 1 评论 -
NEU 1009: Happiness Hotel 数论 佩尔方程
//此是标准程序#include #include using namespace std;int can[1005]={0};int a[10005][605]={0};int x[6005],y[6005],t[6005];int h1,h2;int bb,ee,xx,yx,c,n;void gui(int ji,int many,int ma,int kk);int ma原创 2013-06-30 09:44:01 · 1733 阅读 · 0 评论 -
NEU 1010: NEW RDSP MODE I 数论 每次将交换把偶数位的拖到前面,奇数位的拖到最后面
题目描述:Little A has became fascinated with the game Dota recently, but he is not a good player. In all the modes, the rdsp Mode is popular on online, in this mode, little A always loses games if h原创 2013-06-30 10:38:21 · 2056 阅读 · 1 评论 -
NEU 1173: 这是物理学的奇迹!! 分解质数
1173: 这是物理学的奇迹!!题目描述 goagain在做物理电学实验时需要一个2Ω的电阻,但是他发现他的实验台上只剩下了3Ω,4Ω,5Ω,6Ω的电阻若干,于是goagain把两个4Ω的电阻并联起来,发现效果也不错,于是他惊呼,这是物理学的奇迹!!实验结束之后goagain思考了一下,其实用1个3Ω的电阻和一个6Ω的电阻并联一下也是不错的,但是似乎没有其他的方法可原创 2013-07-01 18:45:50 · 2140 阅读 · 0 评论 -
HDU 3062 Party 2-SAT 入门题
Problem Description有n对夫妻被邀请参加一个聚会,因为场地的问题,每对夫妻中只有1人可以列席。在2n 个人中,某些人之间有着很大的矛盾(当然夫妻之间是没有矛盾的),有矛盾的2个人是不会同时出现在聚会上的。有没有可能会有n 个人同时列席? Inputn: 表示有n对夫妻被邀请 (nm: 表示有m 对矛盾关系 ( m 在接下来的m行中,原创 2013-07-02 06:35:48 · 1564 阅读 · 0 评论 -
HDU 1004 字符串处理 大水题啊
Problem DescriptionContest time again! How excited it is to see balloons floating around. But to tell you a secret, the judges' favorite time is guessing the most popular problem. When the contest原创 2013-07-04 00:15:18 · 2080 阅读 · 1 评论 -
HDU 1880 字符串hash 入门题
Problem Description哈利波特在魔法学校的必修课之一就是学习魔咒。据说魔法世界有100000种不同的魔咒,哈利很难全部记住,但是为了对抗强敌,他必须在危急时刻能够调用任何一个需要的魔咒,所以他需要你的帮助。给你一部魔咒词典。当哈利听到一个魔咒时,你的程序必须告诉他那个魔咒的功能;当哈利需要某个功能但不知道该用什么魔咒时,你的程序要替他找到相应的魔咒。如果他要的魔咒不原创 2013-07-03 23:23:10 · 2469 阅读 · 0 评论 -
CF 237A Flipping Game 简单的统计就过了。。
A. Flipping Gametime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputIahub got bored, so he invented a game to b原创 2013-07-04 23:47:37 · 1688 阅读 · 0 评论 -
CF325 A. Square and Rectangles 面积累加
A. Square and Rectanglestime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputYou are given n rectangles. The cor原创 2013-07-20 21:04:29 · 1702 阅读 · 2 评论 -
CF 330B Road Construction 构造路径 水题
B. Road Constructiontime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputA country has n cities. Initially, the原创 2013-07-21 00:09:48 · 2390 阅读 · 0 评论 -
CF 327B Hungry Sequence 这真的是个小学数学问题。。好水的感觉
B. Hungry Sequencetime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputIahub and Iahubina went to a date at a lu原创 2013-07-04 23:53:03 · 1987 阅读 · 0 评论 -
CF 327C 数学题 等比公式
C. Magic Fivetime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputThere is a long plate s containing n digits. Iahub wan原创 2013-07-05 17:29:19 · 2129 阅读 · 4 评论 -
CF330 A. Cakeminator 大水题
A. Cakeminatortime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputYou are given a rectangular cake, represented原创 2013-07-21 00:02:12 · 2229 阅读 · 0 评论 -
CF330 C. Purification 认真想后就成水题了
C. Purificationtime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputYou are an adventurer currently journeying i原创 2013-07-21 12:10:36 · 2478 阅读 · 0 评论 -
CF330 DBiridian Forest BFS宽度搜索
B. Biridian Foresttime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputYou're a mikemon breeder currently in th原创 2013-07-22 09:02:03 · 1306 阅读 · 0 评论 -
HDU 1573 X问题 同余方程 竟然wa在条件 答案是正整数上。。无语
X问题Time Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 2400 Accepted Submission(s): 731Problem Description求在小于等于N的正整数中有多少个X满足:X m原创 2013-07-22 19:08:39 · 1499 阅读 · 0 评论 -
多校联合练习赛1 Problem1008 Park Visit 树状图最长直径
Park VisitTime Limit: 6000/3000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 0 Accepted Submission(s): 0Problem DescriptionClaire and her little原创 2013-07-23 20:23:35 · 1579 阅读 · 0 评论 -
HDU 1257 导弹拦截系统 LIS? 水题
最少拦截系统Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 12474 Accepted Submission(s): 4944Problem Description某国为了防御敌国的导弹袭击,发展出一原创 2013-07-24 10:11:32 · 1571 阅读 · 0 评论 -
多校联合练习赛1 problem1009 I-number 信心题啊。。。
I-numberTime Limit: 10000/5000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 0 Accepted Submission(s): 0Problem DescriptionThe I-number of x is d原创 2013-07-23 20:04:40 · 1446 阅读 · 0 评论 -
多校联合练习赛1 Problem1005 Deque LIS+LDS 再加一系列优化
DequeTime Limit: 4000/2000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 731 Accepted Submission(s): 236Problem DescriptionToday, the teacher gav原创 2013-07-24 13:31:49 · 1848 阅读 · 2 评论 -
HDU 3127 WHUgirls dp背包问题
WHUgirlsTime Limit: 3000/2000 MS (Java/Others) Memory Limit: 131072/131072 K (Java/Others)Total Submission(s): 1565 Accepted Submission(s): 601Problem DescriptionThere are many p原创 2013-07-25 09:54:36 · 1347 阅读 · 0 评论 -
多校联合练习赛1 Problem 1003 Partition 排列组合问题
PartitionTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 1077 Accepted Submission(s): 439Problem DescriptionDefine f(n) as th原创 2013-07-25 10:35:42 · 1624 阅读 · 1 评论 -
CF 332A Down the Hatch! 超级水题。。不过题目太长了
A. Down the Hatch!time limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputEverybody knows that the Berland citizens原创 2013-07-25 22:58:00 · 1739 阅读 · 0 评论 -
HDU 多校联合练习赛2 Warm up 2 二分图匹配
Warm up 2Time Limit: 3000/1000 MS (Java/Others) Memory Limit: 65535/32768 K (Java/Others)Total Submission(s): 656 Accepted Submission(s): 329Problem Description Some 1×2 dominoe原创 2013-07-26 23:57:31 · 1446 阅读 · 0 评论 -
多校练习赛2 Problem 1008 Palindrome Sub-Array 搜索+矩阵翻转
A palindrome sequence is a sequence which is as same as its reversed order. For example, 1 2 3 2 1 is a palindrome sequence, but 1 2 3 2 2 is not. Given a 2-D array of N rows and M columns, your task is to find a maximum sub-array of P rows and P columns,原创 2013-07-28 09:05:51 · 1124 阅读 · 0 评论