摘要:
Problem DescriptionFarmer John has been informed of the location of a fugitive cow and wants to catch her immediately. He starts at a point N (0 ≤ N ≤ 100,000) on a number line and the cow is at a point K (0 ≤ K ≤ 100,000) on the same number line. Farmer John has two modes of transportation: walking 阅读全文
摘要:
Problem DescriptionThere is a strange lift.The lift can stop can at every floor as you want, and there is a number Ki(0 2 #include 3 int map[210]; 4 int bfs(int a,int b); 5 int queue[10000]; 6 int mark[10000]; 7 int step[10000]; 8 int n; 9 int main()10 {11 int a,b;12 while(scanf("%d",& 阅读全文
摘要:
Problem DescriptionA friend of you is doing research on the Traveling Knight Problem (TKP) where you are to find the shortest closed tour of knight moves that visits each square of a given set of n squares on a chessboard exactly once. He thinks that the most difficult part of the problem is determi 阅读全文
摘要:
Problem DescriptionNow an emergent task for you is to open a password lock. The password is consisted of four digits. Each digit is numbered from 1 to 9. Each time, you can add or minus 1 to any digit. When add 1 to '9', the digit will change to be '1' and when minus 1 to '1' 阅读全文
摘要:
Description平时不努力,考试得着急呐。传说中的BT监考老师竟然搬来了信号屏蔽工具,手机不管用啦有木有。不过这难不到大家,cxlove见证了同学们使用传统的作弊方式----传纸条,纸条得从A同学传到B同学处,在一个N*M的教室里,零散着坐着一些同学,监考老师游荡在教室某些位置,能否成功将纸条传到B同学处,且不被老师发现。每一次传纸条不能斜传,只能传给前后左右四个同学,监考老师的监视范围为相邻的八个位置,当纸条传到老师监视范围内就会被逮住了,纸条传到空位置处时传送失败。 帮cxlove计算下最少需要多少时间才能完成传纸条。Input多组测试数据第一行两个整数,N,M(1 #include 阅读全文
摘要:
DescriptionDue to recent rains, water has pooled in various places in Farmer John's field, which is represented by a rectangle of N x M (1 #include int visited[111][111],movex[8]={-1,-1,0,1,1,1,0,-1},movey[8]={0,-1,-1,-1,0,1,1,1},nx[100000],ny[100000]; char map[111][111]; void dfs(int i,int j);. 阅读全文
摘要:
Description500年前,Jesse是我国最卓越的剑客。他英俊潇洒,而且机智过人^_^。突然有一天,Jesse心爱的公主被魔王困在了一个巨大的迷宫中。Jesse听说这个消息已经是两天以后了,他知道公主在迷宫中还能坚持T天,他急忙赶到迷宫,开始到处寻找公主的下落。 时间一点一点的过去,Jesse还是无法找到公主。最后当他找到公主的时候,美丽的公主已经死了。从此Jesse郁郁寡欢,茶饭不思,一年后追随公主而去了。T_T 500年后的今天,Jesse托梦给你,希望你帮他判断一下当年他是否有机会在给定的时间内找到公主。他会为你提供迷宫的地图以及所剩的时间T。请你判断他是否能救出心爱的公主。In 阅读全文
摘要:
高数70你敢信???临考前各种复习做卷子 各种认真 考试的时候感觉题目也都能做 尼玛连上平时分才给我70? 特么我是不信 打电话问问老师 如果没录错果断重修 郁闷 阅读全文