![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
Zoj
文章平均质量分 55
「已注销」
我的目标 离我还有多远我的梦想 有点遥不可及我要用十倍苦心做最突出一个我不能退缩 不管路多艰难 我都要努力我要靠自己的双手去做自己喜欢做的事我要靠自己的努力去我想去的地方旅游我还年轻 我还可以去奋斗
展开
-
Arctic Network
I -Arctic NetworkArctic Network这一题也TM恶心,fa初始化到最大值居然都RE// File Name: i.cpp// Author: rudolf// Created Time: 2013年04月21日 星期日 17时29分55秒#include#include#include#include#include#in原创 2013-04-21 18:10:41 · 948 阅读 · 0 评论 -
zoj1537- Playing with a Calculator
http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemId=537题意:给你一个k值,现在要你求一个最小的N 值,N每一个数位上的数值a均相等且N为k的倍数,求出满足题意a和位数b;根据题意,因为,N = k * x , k * x % k == 0; 所以,N % k == 0 ; 又因为N = a * 10 ^原创 2013-07-17 08:46:50 · 1177 阅读 · 0 评论 -
zoj1503-One Person "The Price is Right"
http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemId=503// 题目大意:每个人允许猜 G 次,有 L 生命线。猜低或猜高了,耗费一次猜得机会,猜高了,还 // 会浪费一生命线。 // dp // 先从搜索考虑。设f(g,l)表示有g次机会,l条生命线时可以猜到的最大价格原创 2013-07-17 00:10:28 · 1853 阅读 · 0 评论 -
hdu1415-Jugs
http://acm.hdu.edu.cn/showproblem.php?pid=1415第一种完全按照hdu要求输出,第二种属于特判;思想参考灌水问题#include#include#include#include#include#includeusing namespace std;int main(){ int ca , cb , cc , x , y ;原创 2013-07-17 10:59:47 · 1605 阅读 · 0 评论 -
hdu1337-The Drunk Jailer
http://acm.hdu.edu.cn/showproblem.php?pid=1337#include#include#include#include#include#includeusing namespace std;int main(){ int Case ; int t ; cin >> Case ; while( Case-- ) { ci原创 2013-07-16 20:59:36 · 961 阅读 · 0 评论 -
hdu1339-A Simple Task
http://acm.hdu.edu.cn/showproblem.php?pid=1339数学+暴力搜索#include#include#include#include#include#includeusing namespace std;int main(){ int i , j , n; int Case ; scanf( "%d" , &Case ) ;原创 2013-07-16 21:26:44 · 937 阅读 · 0 评论 -
zoj1199-Point of Intersection
http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemId=199题意:求两圆切线相交点的坐标当半径相同,两圆平行,所以不可以;当圆形距小于半径差,有一圆在另一圆内,所以也不可以;当圆心相同,和上相同,无切线,所以也不可以。#include#include#include#include#include#inc原创 2013-07-17 16:54:01 · 1103 阅读 · 0 评论 -
hdu1013-Digital Roots
http://acm.hdu.edu.cn/showproblem.php?pid=1013题意:求各个数位的和,如果大于9,继续处理#include#include#include#include#include#include#includeusing namespace std;int main(){ char str[ 1005 ] ; int len ,原创 2013-07-17 17:57:51 · 892 阅读 · 0 评论 -
hdu1012-u Calculate e
http://acm.hdu.edu.cn/showproblem.php?pid=1012如题,求出n属于0 ~ 9 之间所有满足公式的解#include#include#include#include#include#include#include#include using namespace std;int main(){ int n ; double原创 2013-07-17 19:18:53 · 844 阅读 · 0 评论 -
hdu1017-A Mathematical Curiosity
http://acm.hdu.edu.cn/showproblem.php?pid=1017注意格式,在每一组的结束输出一行空行,就是在输入n,m均为0时,#include#include#include#include#include#include#include#include using namespace std;int main(){ int Case原创 2013-07-17 22:29:27 · 974 阅读 · 0 评论 -
zoj1154-Niven Numbers
http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemId=154#include#include#include#include#include#include#include#include using namespace std;int main(){ int sum , ans ; int Case ;原创 2013-07-18 07:59:03 · 946 阅读 · 0 评论 -
hdu1323-Perfection
http://acm.hdu.edu.cn/showproblem.php?pid=1323#include#include#include#include#include#includeusing namespace std;#define MAX 105 int num[ MAX ] ;int judge( int n ){ int sum = 0 ; f原创 2013-07-18 09:07:14 · 1065 阅读 · 0 评论 -
zoj1241-Geometry Made Simple
http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemId=241格式问题#include#include#include#include#include#includeusing namespace std;int main(){ double a , b , c ; int Case = 0 ; whil原创 2013-07-18 09:58:21 · 1026 阅读 · 0 评论 -
hdu1334-Perfect Cubes
http://acm.hdu.edu.cn/showproblem.php?pid=1334题意;求200以内所有满足a^ 3 == b^ 3 + c ^ 3 +d ^ 3 #include#include#include#include#include#include#includeusing namespace std;int main(){ int a , b原创 2013-07-18 14:35:05 · 1195 阅读 · 0 评论 -
hdu1018-Big Number
http://acm.hdu.edu.cn/showproblem.php?pid=1018#include#include#include#include#include#includeusing namespace std;int main(){ int Case ; int n ; cin >> Case ; while( Case-- ) { ci原创 2013-07-17 07:56:17 · 903 阅读 · 0 评论 -
zoj1489-2^x mod n = 1
http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemId=489#include#include#include#include#include#includeusing namespace std;int main(){ int n ; while( cin >> n ) { if( n % 2 ==原创 2013-07-16 22:54:11 · 1307 阅读 · 0 评论 -
hdu1390-Binary Numbers
http://acm.hdu.edu.cn/showproblem.php?pid=1390题意:给定一个数n,求它的二进制数的1所处的位置;#include#include#include#include#include#includeusing namespace std;int main(){ int i , j , n; int Case , num[原创 2013-07-16 22:11:22 · 955 阅读 · 0 评论 -
zoj3657-The Little Girl who Picks Mushrooms
http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemId=4880题目之前没完全理解,感觉很难,后来才发现不一定5座山都要采到,就是说 n 然后分几种情况讨论,就可以了;当 n 当 n == 5 ; 先找到三个和为1024的倍数的情况,然后,取剩下的两个数的和小于1024的部分;当 n == 4 ; 这种是最需要注原创 2013-05-07 21:26:40 · 1097 阅读 · 0 评论 -
zoj1709-Oil Deposits
http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemId=709#include#includeconst int maxn = 1005 ;char mapp[ maxn ][ maxn ] ;int dir[ 8 ][ 2 ] ={ {-1 , -1} , { -1 , 0 } , { -1 , 1 } , { 0 ,原创 2013-05-12 14:21:09 · 940 阅读 · 0 评论 -
zoj2110-Tempter of the Bone
http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemId=1110题目属于dfs的基础题,但是需要剪枝,不过还是卡了很久,这也看出了自己在这方面的漏洞,而且没有注意细节,例如YES我习惯性的写成了Yes了,其次,第一次剪枝时,忘了加continue,找了好久都没找到错误。#include#include const int原创 2013-05-12 13:40:46 · 1058 阅读 · 0 评论 -
zoj1298-Domino Effect
http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemId=298代码长了就容易出现错误// File Name: dijkstra_jilulujin_zoj1298.cpp// Author: bo_jwolf// Created Time: Thursday, May 09, 2013 PM09:25:24 HKT原创 2013-05-13 19:19:37 · 1207 阅读 · 0 评论 -
zoj2412-Farm Irrigation
http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemId=1412第一次知道bfs可以用的这么活,本来打算直接用3*3数组将每一种情况构建新表,但是将表都建好后发现了一个很麻烦的问题,就是单独输出3*3的图是对的,但是构建成多种情况的图的时候,相邻的两个字母的情况无法连接起来(因为图中间有一条边是公用的 #include #i原创 2013-05-13 19:23:25 · 1243 阅读 · 0 评论 -
zoj2750-Idiomatic Phrases Game
http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemId=1750#include#include#define MAXN 1000#define INF 1000000000struct idiom{ char front[ 5 ] ,back [ 5 ] ; int T ;};idiom dic[ MAXN ]原创 2013-05-13 21:00:35 · 934 阅读 · 0 评论 -
zoj1053/poj1122-FDNY to the Rescue!
http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemId=53http://poj.org/problem?id=1122总体来说,仍然是Dijkstra的模版题,但是还是有很大变通,又锻炼了思维,不至于思维现在就固化了;而且需要特判;题意为:输入case组数据(zoj有 , poj没有 ,然后再输入一个N,代表有N条原创 2013-05-14 16:43:53 · 1096 阅读 · 0 评论 -
zoj1665-Transport Goods
http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemId=655代码不是很长,但是却写了很久,将Dijkstra进行活学活用,不能只是简单的套模版,而且需要注意的就是需要使用double型的数据,如果使用float型,可能会WA;题意:先输入有n ,m,表示存在几组数据,然后输入n-1行,代表需要运输的质量,紧接着输入m行 x原创 2013-05-14 21:32:56 · 1019 阅读 · 0 评论 -
zoj1092-Arbitrage
这道题目虽然是理解了书上的代码,然后自己敲出来的,但是仍然收获不少,例如其中处理字符串时保留它的数字,然后来进行判断,条理比较清晰,也初略了解了bellman-ford算法,虽然和Dijkstra的思想完全理解透,还需要努力#include#include#include#includeusing namespace std ;const int maxn = 50 ;cons原创 2013-05-15 19:51:41 · 1163 阅读 · 0 评论 -
hdu1056-HangOver
http://acm.hdu.edu.cn/showproblem.php?pid=1056#include#include#include#include#include#includeusing namespace std;int main(){ double sum , c ; int ans ; while( ~scanf( "%lf" , &c ) ) {原创 2013-07-16 10:25:43 · 931 阅读 · 0 评论 -
hdu1065-I Think I Need a Houseboat
http://acm.hdu.edu.cn/showproblem.php?pid=1065题意,河边位于x轴,现在给你XX的房子的坐标,每年河水会按照半圆的形式上升覆盖50平方公里,问多少年会覆盖XX的房子;#include#include#include#include#include#includeusing namespace std;#define PI 3.14原创 2013-07-16 11:29:39 · 1132 阅读 · 0 评论 -
zoj1028-Flip and Shift
http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemId=28题意:有相互交叉的黑白两种颜色的小球,每一个小球每次可以跳两格;问你是否可以将同种颜色的小球移动到连续的位置上去;分析:A、当球的总数是奇数的时候,无论怎么移动,均能使小球移动到满足的位置;B、当球的总数是偶数的时候,当处于奇数与偶数位置上的某一种颜色的球的差值原创 2013-07-16 13:18:20 · 1112 阅读 · 0 评论 -
zoj1007-Numerical Summation of a Series
http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemId=7题意就是按照题目公式计算f(x) - f(1 )的值,需要控制精度;j的取值范围控制到10000即可;需要#include#include#include#include#include#includeusing namespace std;int mai原创 2013-07-16 10:07:12 · 955 阅读 · 0 评论 -
hdu1205-吃糖果
http://acm.hdu.edu.cn/showproblem.php?pid=1205鸽巢原理将题目糖果看作所需要的隔板,有n个糖果,根据鸽巢定理,就至少需要n-1个隔板;现在求出最大的糖果数,然后把其它剩余的糖果看作一个整体,看它是否大于最大糖果数-1这一个条件#include#include#include#include#include#include#in原创 2013-07-18 17:51:43 · 1154 阅读 · 0 评论