http://poj.org/problem?id=2253题意:The frog distance (humans also call it minimax distance) between two stones therefore is defined as the minimum neces... Read More
posted @ 2015-07-22 13:28 西瓜不懂柠檬的酸 Views(312) Comments(0) Diggs(0)
http://acm.hdu.edu.cn/showproblem.php?pid=2544 Dijkstra邻接链表(适用于边少,顶点多): 1 #include<iostream> 2 #include<stdio.h> 3 #include<string.h> 4 #include<algor Read More
posted @ 2015-07-21 08:29 西瓜不懂柠檬的酸 Views(161) Comments(0) Diggs(0)
第一次用eaxyx相关知识,也是第一次写游戏,记录下。。。研究了好久才弄出来的+_+ 1 #include 2 #include 3 #include 4 #include 5 #pragma comment(lib,"Winmm.lib") 6 7 void First(); 8... Read More
posted @ 2015-06-07 23:40 西瓜不懂柠檬的酸 Views(291) Comments(0) Diggs(0)
求某年某月某日是周几; 蔡勒(Zeller)公式: w=y+[y/4]+[c/4]-2c+[26(m+1)/10]+d-1 ;y是年的后两位;c是世纪数-1(年的前两位);m是月份,大于等于3,小于等于14,某年的1、2月要看作上一年的13、14月来计算,例如2000年1月1日要按1999年13月1 Read More
posted @ 2015-05-28 14:50 西瓜不懂柠檬的酸 Views(599) Comments(0) Diggs(0)
问题描述 任何一个正整数都可以用2进制表示,例如:137的2进制表示为10001001。 将这种2进制表示写成2的次幂的和的形式,令次幂高的排在前面,可得到如下表达式:137=2^7+2^3+2^0 现在约定幂次用括号来表示,即a^b表示为a(b) 此时,137可表示为:2(7)+2(3)+... Read More
posted @ 2015-05-26 19:43 西瓜不懂柠檬的酸 Views(313) Comments(0) Diggs(0)
http://acm.fzu.edu.cn/problem.php?pid=2150http://acm.hust.edu.cn/vjudge/contest/view.action?cid=65959#problem/I题意: 从两个任意点点着草地 火会向上下左右四个方向蔓延 相邻的草地就会被点着... Read More
posted @ 2015-05-26 18:59 西瓜不懂柠檬的酸 Views(171) Comments(0) Diggs(0)
http://poj.org/problem?id=3414题意:给你两个容量为a,b的杯子;有3个操作:1:FILL(i);把第i个杯子从水库中装满;2:DROP(i);把第i个杯子清空;3:POUR(i,j);把第i个杯子的水移入到j中,直到第i个杯子空了或者第j个杯子满了为止;分析:本题和上篇... Read More
posted @ 2015-05-24 16:33 西瓜不懂柠檬的酸 Views(305) Comments(0) Diggs(0)
http://acm.hdu.edu.cn/showproblem.php?pid=1495题意:有3个杯子a b c;a=b+c;然后刚开始时只有a是满的,其它为空的,然后a b c三个之间互相倒,假如说a倒入b中,只有当b满或a空时,才算倒一次;a=4,b=1;c=3;因为刚开始只有a中有;先让... Read More
posted @ 2015-05-19 21:16 西瓜不懂柠檬的酸 Views(198) Comments(0) Diggs(0)
DescriptionThe ministers of the cabinet were quite upset by the message from the Chief of Security stating that they would all have to change the four... Read More
posted @ 2015-05-18 17:55 西瓜不懂柠檬的酸 Views(178) Comments(0) Diggs(0)
DescriptionOne day , Wang and Dong in the Dubai desert expedition, discovered an ancient castle. Fortunately, they found a map of the castle.The map m... Read More
posted @ 2015-05-16 21:41 西瓜不懂柠檬的酸 Views(195) Comments(0) Diggs(0)
levels of contents