gzhu_101majia的博客
gzhu_101majia · 共 85 篇文章
hdu 1533 Going Home(KM算法)
Going Home Time Limit: 10000/5000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 1415 Accepted Submission(s): 698 Problem Description On a grid map there are n little men and n houses. In each unit time, every little man can move one unit step, either horizontally, …
2012-07-12 23:19 · KM · 评论(0)
hdu 2255 奔小康赚大钱(我的第一个KM匹配)
奔小康赚大钱 Time Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 798 Accepted Submission(s): 362 Problem Description 传说在遥远的地方有一个非常富裕的村落,有一天,村长决定进行制度改革:重新分配房子。 这可是一件大事,关系到人民的住房问题啊。村里共有n间房间,刚好有n家老百姓,考虑到每家都要有房住(如果有老百姓没房子住的话,容易引起不安定因素),每家必须分配到一间房子且只能得到一间房子。 另…
2012-07-12 23:04 · KM · 评论(0)
hdu 2444 The Accomodation of Students
The Accomodation of Students Time Limit : 5000/1000ms (Java/Other) Memory Limit : 32768/32768K (Java/Other) Total Submission(s) : 1 Accepted Submission(s) : 1 Problem Description There are a group of students. Some of them may know each other, while others don't. For example, A and B know each othe…
2012-01-22 19:57 · 二分匹配 · 评论(0)
hdu 1507 Uncle Tom's Inherited Land*
Uncle Tom's Inherited Land* Time Limit : 2000/1000ms (Java/Other) Memory Limit : 65536/32768K (Java/Other) Total Submission(s) : 4 Accepted Submission(s) : 2 Special Judge Problem Description Your old uncle Tom inherited a piece of land from his great-great-uncle. Originally, the property had been …
2012-01-22 19:47 · 二分匹配 · 评论(0)
poj 2230 Watchcow (欧拉回路+dfs)
Watchcow Time Limit : 6000/3000ms (Java/Other) Memory Limit : 131072/65536K (Java/Other) Total Submission(s) : 2 Accepted Submission(s) : 2 Special Judge Problem Description 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 …
poj 2337 Catenyms(并查集+dfs+欧拉回路)
Catenyms Time Limit : 2000/1000ms (Java/Other) Memory Limit : 131072/65536K (Java/Other) Total Submission(s) : 6 Accepted Submission(s) : 5 Problem Description A catenym is a pair of words separated by a period such that the last letter of the first word is the same as the last letter of the second…
poj 2513 Colored Sticks (字典树+并查集+欧拉回路)
Colored Sticks Time Limit : 10000/5000ms (Java/Other) Memory Limit : 256000/128000K (Java/Other) Total Submission(s) : 1 Accepted Submission(s) : 1 Problem Description You are given a bunch of wooden sticks. Each endpoint of each stick is colored with some color. Is it possible to align the sticks …
hdu 3018 Ant Trip(欧拉回路)
Ant Trip Time Limit : 2000/1000ms (Java/Other) Memory Limit : 32768/32768K (Java/Other) Total Submission(s) : 14 Accepted Submission(s) : 8 Problem Description Ant Country consist of N towns.There are M roads connecting the towns. Ant Tony,together with his friends,wants to go through every part of…
fzu 2065 数字判别(模拟题)
Problem 2065 数字判别 Accept: 31 Submit: 81 Time Limit: 1000 mSec Memory Limit : 32768 KB Problem Description 现在kk 给你K-number的定义和一些字符串,想请你判断一下他们是否是K-number。 现在我们用digit表示一串连续的数字,中间没有任何符号。E或e表是指数。 那么数字就可以表示成: K-number = digit K-number = .digit K-number = digit. K-number = digit.digit K-number = digit e/E…
2011-12-16 11:28 · 模拟题 · 评论(0)
hdu 2054 A==B?(模拟题)
A == B ? Time Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 32921 Accepted Submission(s): 5033 Problem Description Give you two numbers A and B, if A is equal to B, you should print "YES", or print "NO". Input each test case contains two numbers A …
2011-12-16 11:10 · 模拟题 · 评论(0)
FOJ月赛-2011.12
福州大学月赛总结(2011.12) 福州大学12月的月赛,平常很少去比赛,这次就说说,总结一下吧。 排名刚刚50: 链接: http://acm.fzu.edu.cn/contest/list.php?cid=118 第一题: 水题啊!竟然没看清是按顺序的,还排序了,WA两次,冲动是魔鬼! 代码: #include <iostream> #include <stdio.h> #include <memory.h> #include <algorithm> using namespace std; int a[105]; int main() { int i, n, q, num, sum, …
2011-12-12 21:19 · 比赛 · 评论(0)
hdu 1237 简单计算器
简单计算器 Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 7093 Accepted Submission(s): 2283 Problem Description 读入一个只包含 +, -, *, / 的非负整数计算表达式,计算该表达式的值。 Input 测试输入包含若干测试用例,每个测试用例占一行,每行不超过200个字符,整数和运算符之间用一个空格分隔。没有非法表达式。当一行中只有0时输入结束,相应的结果不要输出。 Output 对…
2011-12-10 22:50 · 模拟题 · 评论(0)
hdu 4041 Eliminate Witches(模拟题)
Eliminate Witches! Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 511 Accepted Submission(s): 216 Problem Description Kaname Madoka is a Magical Girl(Mahou Shoujo/Puella Magi). The duty of a Magical Girl is to eliminate Witches(Majo). Though so…
2011-12-10 22:45 · 模拟题 · 评论(0)
hdu 1429 胜利大逃亡(续)(状态压缩+bfs)
胜利大逃亡(续) Time Limit: 4000/2000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 2297 Accepted Submission(s): 764 Problem Description Ignatius再次被魔王抓走了(搞不懂他咋这么讨魔王喜欢)…… 这次魔王汲取了上次的教训,把Ignatius关在一个n*m的地牢里,并在地牢的某些地方安装了带锁的门,钥匙藏在地牢另外的某些地方。刚开始Ignatius被关在(sx,sy)的位置,离开地牢的门在(ex,e…
2011-12-08 22:55 · bfs · 评论(0)
hdu 2588 GCD
GCD Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 405 Accepted Submission(s): 172 Problem Description The greatest common divisor GCD(a,b) of two positive integers a and b,sometimes written (a,b),is the largest divisor common to a and b,For ex…
2011-12-07 21:20 · 欧拉函数+欧拉定理 · 评论(0)