【思维】
Andy--lee
这个作者很懒,什么都没留下…
展开
-
错排问题(一)
不容易系列之一Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 24561 Accepted Submission(s): 10697Problem Description 大家常常感慨,要做好一件事情真的不容易,确实,失败比成功容易多...原创 2018-06-02 15:24:35 · 304 阅读 · 0 评论 -
E - 玩游戏 (思维)
Sample Input145 3 4 5Sample OutputwfyHintwfy先开始,只能拿前 5 颗或后 5 颗石子 。假设他取了前 5 颗,这一行就变成了 [3,4,5] 。如果zxy拿走前 3 颗,那么剩下的是 [4,5],wfy拿走后 5 颗赢得 10 分。如果zxy拿走后 5 颗,那么剩下的是 [3,4],wfy拿走后 4 颗赢得 9 ...原创 2018-08-23 11:25:02 · 217 阅读 · 0 评论 -
HDU - 5477 - A Sweet Journey (思维题)
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=5477题意Mr.D 带着他的女朋友出去旅行,资金缺乏,就骑着自行车出发了!路途中会遇到沼泽地和平坦路。每在沼泽地骑行一米,Mr.D能量值减少a,每在平坦大路上骑行一米就恢复能量值b。为了能成功到达目的地,在出发前至少需补充多少能量。 ...原创 2018-07-29 10:43:57 · 245 阅读 · 0 评论 -
D-Runing Man(思维题)
ZB loves watching RunningMan! There's a game in RunningMan called 100 vs 100.There are two teams, each of many people. There are 3 rounds of fighting, in each round the two teams send some people to...原创 2018-04-23 17:36:43 · 313 阅读 · 0 评论 -
HDU-1173 采矿(采矿)
采矿Time Limit: 10000/5000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 4944 Accepted Submission(s): 2349Special JudgeProblem Description 某天gameboy玩魔兽RPG。有一个任务是在一...原创 2018-05-07 22:29:01 · 282 阅读 · 0 评论 -
HDU-1797(杨辉三角)
循环多少次?Time Limit: 3000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 5864 Accepted Submission(s): 2251Problem Description 我们知道,在编程中,我们时常需要考虑到时间复杂度,特别是对于循环...原创 2018-06-10 20:21:15 · 179 阅读 · 0 评论 -
HDU-1005(数学(规律))
题目链接 又是一道给出了运算公式的数学凡是没有优化的话,超时超内存等等是避免不了的了。这题很显然是一个找规律的题目,也就是该题的求解中是存在周期的。对于公式 f[n] = A * f[n-1] + B * f[n-2]; 后者只有7 * 7 = 49 种可能,为什么这么说,因为对于f[n-1] 或者 f[n-2] 的取值只有 0,1,2,3,4,5,6 这7个数,A,B又是固定的,所以就只有4...原创 2018-04-12 17:22:23 · 434 阅读 · 0 评论 -
HDU-1002(模拟加法运算(超大数))
题目链接#include<stdio.h>#include<string.h>char a[1005]; char b[1005];int x[1005];int y[1005];int sum[1010];int main(){ int T; scanf("%d",&T); for(int I=1;I<=T;I++) ...原创 2018-04-12 13:39:24 · 321 阅读 · 0 评论 -
Codeforce-995B(暴力+思维)
Allen is hosting a formal dinner party. 2n2n people come to the event in nn pairs (couples). After a night of fun, Allen wants to line everyone up for a final picture. The 2n2n people line up, but All...原创 2018-07-12 15:02:44 · 396 阅读 · 0 评论 -
HDU-2803
Giving N integers, V1, V2,,,,Vn, you should find the biggest value of F. Input Each test case contains a single integer N (1<=N<=100). The next line contains N integers, mean...原创 2018-05-10 21:21:20 · 125 阅读 · 0 评论 -
Codeforce - 1040B - Shashlik Cooking(思维)
Input7 2Output21 6Input5 1Output21 4Source::Click here题意给你n串羊肉串,它们的编号依次为1,2,3,,,n。羊肉串初始状态全为正面,你的任务是将所有的羊肉串翻转过来。规则是:当每次选择一个位置pos进行翻转,pos-k和pos+k的位置都会被翻转。求最少多少次能将所有的羊肉串全部翻转过来...原创 2018-09-07 10:09:39 · 464 阅读 · 0 评论