- 博客(449)
- 资源 (3)
- 收藏
- 关注
原创 UVA - 10167 - Birthday Cake (简单枚举)
思路:简单枚举AC代码:#include #include #include #include #include using namespace std;int x[105], y[105];int main() { int A, B, N; while(scanf("%d", &N), N) { for(int i = 0; i < 2 * N; i++
2015-03-19 21:02:24 757
原创 SGU - 196 - Matrix Multiplication (矩阵乘法)
196. Matrix Multiplicationtime limit per test: 0.25 sec.memory limit per test: 65536 KBinput: standardoutput: standardLet us consider an undirected graph G = which has N verti
2015-03-19 19:52:51 805
原创 POJ Challenge Round 5 -- A:magic (物理)
A:magic总时间限制: 1000ms 内存限制: 131072kB描述魔法师Silly Hook正在表演一个神奇的魔术,他变出了他自己的N个分身,并成正N边形分布,他本身处于这个正N边形的中心,正N边形的边长为A。然后,每个分身都会朝顺时针方向下一个分身以一个相同的固定的速度V移动,移动方向会随着下一个分身的位置变化而变化,最终所有分身都将到达正
2015-03-19 18:42:42 931
原创 SGU - 519 - 3D City Model (模拟)
519. 3D City ModelTime limit per test: 0.25 second(s)Memory limit: 262144 kilobytesinput: standardoutput: standardA city is built on the top of a rectangular n x m grid where all t
2015-03-18 22:43:11 686
原创 蓝桥杯 - 带分数 (DFS)
历届试题 带分数 时间限制:1.0s 内存限制:256.0MB 问题描述100 可以表示为带分数的形式:100 = 3 + 69258 / 714。还可以表示为:100 = 82 + 3546 / 197。注意特征:带分数中,数字1~9分别出现且只出现一次(不包含0)。类似这样的带分数,100 有 11 种表示法。
2015-03-18 21:55:43 894
原创 HDU - 1754 - I Hate It (线段树 - 区间最值)
I Hate ItTime Limit: 9000/3000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 43296 Accepted Submission(s): 17071Problem Description很多学校流行一种比较的习惯。
2015-03-18 20:05:41 783
原创 Codeforces Round #296 (Div. 2)
A. Playing with Papertime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputOne day Vasya was sitting on a not so
2015-03-18 11:08:56 953
原创 SGU - 404 - Fortune-telling with camomile
404. Fortune-telling with camomileTime limit per test: 0.25 second(s)Memory limit: 65536 kilobytesinput: standardoutput: standardMasha loves Petya. The following question gives h
2015-03-17 17:35:12 673
原创 SGU - 403 - Scientific Problem (水)
403. Scientific ProblemTime limit per test: 0.25 second(s)Memory limit: 65536 kilobytesinput: standardoutput: standardOnce upon a time Professor Idioticideasinventor was travelling b
2015-03-17 17:12:04 944
原创 SGU - 316 - Code Tanks (简单模拟)
316. Code TanksTime limit per test: 0.25 second(s)Memory limit: 65536 kilobytesinput: standardoutput: standardHopefully yesterday you participated in the fascinating Code Game Ch
2015-03-17 16:47:17 794
原创 SGU - 355 - Numbers Painting (贪心)
355. Numbers PaintingTime limit per test: 0.25 second(s)Memory limit: 65536 kilobytesinput: standardoutput: standardDr. Vasechkin wants to paint all numbers from 1 to N in such a way
2015-03-17 15:09:35 796
原创 SGU - 358 - Median of Medians (寻找中位数中的中位数)
358. Median of MediansTime limit per test: 0.25 second(s)Memory limit: 65536 kilobytesinput: standardoutput: standardVasya learned definition of median of three numbers. He says, "Me
2015-03-17 14:39:26 1725
原创 SGU - 222 - Little Rooks (组合数)
222. Little Rookstime limit per test: 0.25 sec.memory limit per test: 65536 KBinput: standardoutput: standardInspired by a "Little Bishops" problem, Petya now wants to solve pr
2015-03-16 23:29:31 738
原创 SGU - 276 - Andrew's Troubles
276. Andrew's Troublestime limit per test: 0.25 sec.memory limit per test: 65536 KBinput: standardoutput: standardFamous Berland ACM-ICPC team Anisovka consists of three progra
2015-03-16 22:54:21 630
原创 SGU - 104 - Little shop of flowers (动态规划)
104. Little shop of flowerstime limit per test: 0.25 sec. memory limit per test: 4096 KBPROBLEMYou want to arrange the window of your flower shop in a most pleasant way. You have F b
2015-03-16 10:58:37 897 1
原创 HDU - 1248 - 寒冰王座 (完全背包 or 贪心)
寒冰王座Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 12267 Accepted Submission(s): 6221Problem Description不死族的巫妖王发工资拉,死亡骑士拿到一张
2015-03-15 22:50:50 814
原创 UVA - 111 - History Grading (LCS)
UVA - 111History GradingTime Limit: 3000MS Memory Limit: Unknown 64bit IO Format: %lld & %lluSubmit StatusDescriptionBackgroundMany problems in Comput
2015-03-15 20:36:59 696
原创 UVA - 10405 - Longest Common Subsequence (DP - 最长公共子串)
UVA - 10405Longest Common SubsequenceTime Limit: 3000MS Memory Limit: Unknown 64bit IO Format: %lld & %lluSubmit StatusDescriptionProblem C: Longest Commo
2015-03-15 20:10:04 799
原创 UVA - 357 - Let Me Count The Ways (动态规划)
UVA - 357Let Me Count The WaysTime Limit: 3000MS Memory Limit: Unknown 64bit IO Format: %lld & %lluSubmit StatusDescriptionAfter making a purchase at a
2015-03-15 17:44:12 630
原创 UVA - 147 - Dollars (动态规划)
UVA - 147DollarsTime Limit: 3000MS Memory Limit: Unknown 64bit IO Format: %lld & %lluSubmit StatusDescriptionNew Zealand currency consists of $100, $50,
2015-03-15 17:04:07 873
原创 SGU - 302 - BHTML 1.0 (栈的应用)
302. BHTML 1.0Time limit per test: 0.25 second(s)Memory limit: 65536 kilobytesinput: standardoutput: standardThe hypertext markup language BHTML 1.0 has only two paired tags. They ar
2015-03-15 11:35:41 846
原创 SGU - 186 - The Chain (贪心)
186. The Chaintime limit per test: 0.25 sec.memory limit per test: 4096 KBinput: standard inputoutput: standard outputSmith has N chains. Each chain is the sequence of successi
2015-03-15 10:11:52 874
原创 HDU - 5187 - zhx's contest (快速幂+快速乘)
zhx's contestTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 448 Accepted Submission(s): 147Problem DescriptionAs one of the
2015-03-15 01:00:23 1760
原创 HDU - 5186 - zhx's submissions (大数高精度)
zhx's submissionsTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 540 Accepted Submission(s): 146Problem DescriptionAs one of
2015-03-15 00:06:22 1036
原创 HDU - 1098 - Ignatius's puzzle (数论 - 费马小定理)
Ignatius's puzzleTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 7012 Accepted Submission(s): 4847Problem DescriptionIgnatius
2015-03-13 23:21:44 797
原创 HDU - 1097 - A hard puzzle (快速幂取模)
A hard puzzleTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 32633 Accepted Submission(s): 11672Problem Descriptionlcy gives
2015-03-13 22:44:32 671
原创 HDU - 1047 - Integer Inquiry (大数高精度)
Integer InquiryTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 13969 Accepted Submission(s): 3523Problem DescriptionOne of th
2015-03-12 23:16:06 699
原创 SGU - 154 - Factorial (数论)
154. Factorialtime limit per test: 0.25 sec.memory limit per test: 4096 KBinput: standard inputoutput: standard outputYou task is to find minimal natural number N, so that N! c
2015-03-12 19:58:54 799
原创 蓝桥杯 - 蚂蚁感冒
历届试题 蚂蚁感冒 时间限制:1.0s 内存限制:256.0MB 问题描述 长100厘米的细长直杆子上有n只蚂蚁。它们的头有的朝左,有的朝右。 每只蚂蚁都只能沿着杆子向前爬,速度是1厘米/秒。 当两只蚂蚁碰面时,它们会同时掉头往相反的方向爬行。 这些蚂蚁中,有1只蚂蚁感冒了。并且在和其它蚂蚁碰面时,会把感冒传染给碰
2015-03-12 12:32:20 976
原创 SGU - 112 - ab-ba (大数高精度)
112. ab-batime limit per test: 0.25 sec. memory limit per test: 4096 KBYou are given natural numbers a and b. Find ab-ba.InputInput contains numbers a and b (1≤a,b≤100).Out
2015-03-12 11:09:20 1054
原创 SGU - 113 - Nearly prime numbers (素数)
113. Nearly prime numberstime limit per test: 0.25 sec. memory limit per test: 4096 KBNearly prime number is an integer positive number for which it is possible to find such primes P1 and P2
2015-03-12 10:17:18 965
原创 SGU - 184 - Patties
184. Pattiestime limit per test: 0.25 sec.memory limit per test: 4096 KBinput: standard inputoutput: standard outputPetya is well-known with his famous cabbage patties. Petya's
2015-03-12 09:19:05 1124 2
原创 蓝桥杯 - 兰顿蚂蚁 (模拟)
历届试题 兰顿蚂蚁 时间限制:1.0s 内存限制:256.0MB 问题描述 兰顿蚂蚁,是于1986年,由克里斯·兰顿提出来的,属于细胞自动机的一种。 平面上的正方形格子被填上黑色或白色。在其中一格正方形内有一只“蚂蚁”。 蚂蚁的头部朝向为:上下左右其中一方。 蚂蚁的移动规则十分简单: 若蚂蚁在黑格,右转9
2015-03-11 09:36:12 1522
原创 蓝桥杯 - 分糖果 (模拟~)
历届试题 分糖果 时间限制:1.0s 内存限制:256.0MB 问题描述 有n个小朋友围坐成一圈。老师给每个小朋友随机发偶数个糖果,然后进行下面的游戏: 每个小朋友都把自己的糖果分一半给左手边的孩子。 一轮分糖后,拥有奇数颗糖的孩子由老师补给1个糖果,从而变成偶数。 反复进行这个游戏,直到所有小朋友的糖果数都相同为
2015-03-10 23:56:16 922
原创 蓝桥杯 - 剪格子 (简单DFS)
历届试题 剪格子 时间限制:1.0s 内存限制:256.0MB 问题描述如下图所示,3 x 3 的格子中填写了一些整数。+--*--+--+|10* 1|52|+--****--+|20|30* 1|*******--+| 1| 2| 3|+--+--+--+我们沿着图中的星号线剪开,得到两个部分,
2015-03-10 23:18:26 830
原创 hihoCoder - 1068 - RMQ-ST算法 (RMQ)
#1068 : RMQ-ST算法时间限制:10000ms单点时限:1000ms内存限制:256MB描述小Hi和小Ho在美国旅行了相当长的一段时间之后,终于准备要回国啦!而在回国之前,他们准备去超市采购一些当地特产——比如汉堡(大雾)之类的回国。但等到了超市之后,小Hi和小Ho发现者超市拥有的商品种类实在太多了——他们实在看不过来了!于
2015-03-10 17:00:13 1084
原创 UVA - 11235 - Frequent values (RMQ)
UVA - 11235Frequent valuesTime Limit: 3000MS Memory Limit: Unknown 64bit IO Format: %lld & %lluSubmit StatusDescription2007/2008 ACM International Colle
2015-03-09 22:42:35 614
原创 Codeforces Round #295 (Div. 2) -- B. Two Buttons (模拟)
B. Two Buttonstime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputVasya has found a strange device. On the fro
2015-03-03 18:25:14 794
原创 Codeforces Round #295 (Div. 2) -- A. Pangram
A. Pangramtime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputA word or a sentence in some language is called
2015-03-03 18:21:59 892
原创 HDU - 5178 - pairs
pairsTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 349 Accepted Submission(s): 151Problem DescriptionJohn has n points on
2015-03-01 19:21:48 844
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人