点击打开链接摆方格时间限制:1000 ms | 内存限制:65535 KB难度:2描述 给你一个n*n的方格,每个方格里的数必须连续摆放如 1243 ,下图为不连续的,请输出从左上角到右下角的对角线上的最大和 1342 输入输入包含多组测试数据。每一行包括一个数据n,表示n*n的方格(保...
转载 2017-08-01 17:10:00
79阅读
2评论
其实可以用dfs去搜出来的。因为这里的数列是循环的,所以可以把它递归到最早的数列中。#
原创 2023-05-29 18:17:27
219阅读
Friend Time Limit: 1000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 2200    Accepted Submission(s): 1103 Problem
原创 2023-04-20 11:32:52
104阅读
抱歉Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K
原创 2023-04-19 16:59:51
67阅读
题目大意: 我们来递归定义一个友好数: (1)整数1、2是友好数
原创 2015-03-30 11:31:29
41阅读
ChessboardTime Limit: 2000/1000 MS (Java/Others)    Memory Limit: 327
原创 2023-04-19 17:00:19
113阅读
摆方格时间限制:1000 ms  |           内存限制:65535 KB难度:2描述   给你一个n*n的方格,每个方格里的数必须连续摆放如  1243,下图为不连续的,请输出从左上角到右下角的对角线上的最大和    134
原创 2023-04-20 05:47:11
10000+阅读
Triangle 题目连接: http://acm.hdu.edu.cn/showproblem.php?pid=5914 Description Mr. Frog has n sticks, whose lengths are 1,2, 3⋯n respectively. Wallice is a
原创 2021-07-16 11:05:27
120阅读
Buy SticksTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 652Accepted Submission(s): 280Problem DescriptionImyourgod need 3 kinds of sticks which have different sizes: 20cm, 28cm and 32cm. However the shop only sell 75-centimeter-long sticks. So he
转载 2012-08-03 21:42:00
66阅读
2评论
HackerRank <!--Client--> <!--Client--> 1305 Pairwise Sum and Divide 有这样一段程序,fun会对整数数组A进行求值,其中Floor表示向下取整: fun(A) sum = 0 for i = 1 to A.length for j =
转载 2017-09-03 17:37:00
191阅读
2评论
题目连接:10706 - Number Sequence 题目大意:有一个有0 ~ 9组成的序列,1 1 2 1 2 3 1 2 3 4 1 2 3 4 5 。。。。就是第一位为1. 第二为为1 ,第三为为2, 然后10 的部分注意下, 为1 和0 两个, 100 就是1 , 0和0 三位,以此类推, 要求给出tmp, 输出序列中的tmp位为什么数字。 解题思路:数据很大,肯定不能模拟,找规律。这两个是为推出来的用来打表的公式: 1、sum[i] = sum[i - 1] * 2 - sum[i - 2] + w (w为当前i 的位数, sum[i]表示当前数字出现到i的时候占到序列的...
转载 2013-08-25 21:14:00
95阅读
2评论
Rikka with ChessTime Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/65
原创 2023-04-19 16:57:46
50阅读
item/478ce4dd244300ca2
原创 2023-07-17 18:06:11
65阅读
http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=24&page=show_problem&problem=11031. 先看单个数的规律:0^n%10: 01^n%10: 12^n%10: 2,4,8,63^n%10: 3,9,7,14^n%10: 4,6
原创 2023-04-12 06:26:49
175阅读
History repeat itselfTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 460Accepted Submission(s): 223Problem DescriptionTom took the Discrete Mathematics course in the 2011,but his bad attendance angered Professor Lee who is in charge of the course.
转载 2012-08-08 18:22:00
57阅读
2评论
so easyTime Limit: 2000/1000 MS (Java/Others)    Memory Limit:y with
原创 2023-05-15 00:30:31
81阅读
geometryTime Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 59    Accepted Submission(s): 45Problem DescriptionThere is a point P at c
原创 2023-04-19 16:00:49
57阅读
CodeForces - 630DHexagons!Time Limit: 500MS Memory Limit: 65536KB 64b
原创 2023-04-19 17:01:51
60阅读
Perfect SquaresTime Limit: 200
原创 2023-02-20 01:49:55
61阅读
原题链接: ​​ https://leetcode.com/problems/zigzag-conversion/​​一:原题内容The string ​​"PAYPALISHIRING"​​ is written in a zigzag pattern on a given number of rows like this: (you may want to display this patte
原创 2022-12-07 05:29:56
119阅读
  • 1
  • 2
  • 3
  • 4
  • 5