![](https://img-blog.csdnimg.cn/20190918140037908.png?x-oss-process=image/resize,m_fixed,h_224,w_224)
规律题(思维题)
Accept_1
这个作者很懒,什么都没留下…
展开
-
Gym - 101502F- Building Numbers (规律以及前缀和)
题目链接:http://codeforces.com/gym/101502/problem/F题目: In this problem, you can build a new number starting from 1, by performing the following operations as much as you need:Add 1 to the current num...原创 2018-03-24 11:25:16 · 743 阅读 · 0 评论 -
Cooking Time Gym - 101498F (思维+贪心+优先队列)
题目链接:https://vjudge.net/problem/Gym-101498F题目: While cooking your dinner, you will need n ingredients. Initially, all ingredients are in the refrigerator.You are not allowed to keep more than k i...原创 2018-04-27 21:03:49 · 348 阅读 · 0 评论 -
Super Subarray Gym - 101498G(枚举+思维)
题目链接:https://vjudge.net/problem/Gym-101498G**题目:**In this problem, subarray is defined as non-empty sequence of consecutive elements.We define a subarray as Super Subarray if the summation of all ...原创 2018-04-27 19:00:20 · 323 阅读 · 0 评论 -
H - Palindrome Number Gym - 101498H(思维)
题目: A palindrome number is a number that can be read the same way from left to right and from right to left. For example: 961169, 111, 554455 are palindromes, while 856, 10180, 7226 are not.Find th...原创 2018-04-27 18:07:54 · 413 阅读 · 0 评论 -
UVa1152 - 4 Values whose Sum is 0(hash、二分两种写法)
借鉴了两位大佬的博客: https://blog.csdn.net/a197p/article/details/46575743 https://blog.csdn.net/qq_21057881/article/details/50531784 hash结构体:struct Hash_map{ sta...原创 2018-04-24 10:51:15 · 424 阅读 · 2 评论 -
Max and Alexis Plan to Conquer the World Gym - 101353B(一个数多少次方要有敏感性,两边取对数)
题目链接:https://vjudge.net/problem/Gym-101353B题目: B. Max and Alexis Plan to Conquer the World Score: 100 CPU: 1.25s Memory: 1024MB There is this kitten Alexis....原创 2018-04-06 22:56:01 · 428 阅读 · 0 评论 -
2069: Saruman’s Level Up(思维枚举+质数分解求组合数)
题目链接:http://acm.csu.edu.cn/csuoj/problemset/problem?pid=2069题目: Description Saruman’s army of orcs and other dark minions continuously mine and harvest lumber out of the land surrounding his might...原创 2018-04-16 20:34:54 · 412 阅读 · 2 评论 -
hdu2054 看了许多大佬的想法 就是找小数点 比较两个字符串的函数
#include#includechar a[100017], b[100017];void re(char s[]);int main(){ while(scanf("%s%s",a,b)!=EOF) { re(a); re(b); if(strcmp(a,b)) printf(原创 2017-03-28 17:01:30 · 175 阅读 · 0 评论 -
汉诺塔如何记录每一步,每个塔上的盘子数
题目链接:https://vjudge.net/problem/Gym-101243B题意:也就是汉诺塔,给你n个盘子,和3根柱子,问你移动到第几步的时候是三个柱子上的盘子数量都相等的时候 解析:按照题目给你的那个程序把数据算出来,然后找规律即可(高精度) 按照题意翻译的程序:#include #include #include #include #include #原创 2017-06-30 21:56:18 · 1972 阅读 · 0 评论 -
poj1316 0ms水过
Self NumbersTime Limit: 1000MS Memory Limit: 10000KTotal Submissions: 24211 Accepted: 13552DescriptionIn 1949 the Indian mathematician D.R. Kaprekar discovered a cl原创 2017-07-19 09:23:02 · 150 阅读 · 0 评论 -
计算n的阶乘有多少个尾随0(链接)
转自:http://www.cnblogs.com/borey/p/5626172.html转载 2017-10-14 11:09:38 · 279 阅读 · 0 评论 -
ZOJ-3993(概率转化为面积问题)
**题目:**PUBG is a multiplayer online battle royale video game. In the game, up to one hundred players parachute onto an island and scavenge for weapons and equipment to kill others while avoiding gettin原创 2017-11-13 20:52:33 · 660 阅读 · 0 评论 -
Gym-101522I
题目链接:http://codeforces.com/gym/101522/problem/I题意:就是给你一些数,你可以改变任意一个区间里的每一个数的符号,求改变一次后 ,后一个数减去前一个数的绝对值的和最少。题目分析: 做这个题目要冷静一点,其实你改变任意一个区间的符号,其实对结果有影响的只有首尾两个数。所以只要求使结果减少的 两个最大的变化值作为 这个区间变化的左右端就行了。题...原创 2018-03-16 12:01:44 · 250 阅读 · 0 评论 -
牛客练习赛13-A题
题目链接:https://www.nowcoder.com/acm/contest/70/A分析:很简单的水题,透过题目而言,就是比较4的数目和7的数目谁多代码如下:#include <iostream>#include <stdio.h>#include <math.h>#include <string.h>#include &...原创 2018-03-16 21:04:04 · 86 阅读 · 0 评论 -
牛客练习赛13-B题(另带一份大佬的代码,细节值得学习)
题目链接:https://www.nowcoder.com/acm/contest/70/B题目分析:把所有幸运数按从小到大都求出来,打个表。代码:#include <iostream>#include <stdio.h>#include <math.h>#include <string.h>#include <stri...原创 2018-03-16 21:06:21 · 254 阅读 · 0 评论 -
Gym-101502J(取数博弈+dp)
题目:http://codeforces.com/gym/101502/problem/JJ. Boxes Game time limit per test 3.0 s memory limit per test 256 MB input standard input output standard output Ibraheem and Husam are playing ...原创 2018-03-23 20:13:15 · 884 阅读 · 0 评论 -
求两个圆的交叉区域的面积
转自:http://blog.csdn.net/heshan1992/article/details/77686080问题:给定两个圆的半径以及圆心的位置,求两个圆的相交区域的面积 思路 : 利用圆心距判断 两个圆之间的位置关系 当圆心距小于两圆半径之差时 两圆内含 当圆心距等于两圆半径之差时 两圆内切 当圆心距小于两圆半径之和 大于半径之差时 两圆相交 当圆心距等于两圆...原创 2018-03-20 11:14:43 · 8695 阅读 · 0 评论 -
牛客练习赛13-C题幸运数字III
转自一位大佬:http://blog.csdn.net/wyxeainn/article/details/79588812题目: 链接:https://www.nowcoder.com/acm/contest/70/C 来源:牛客网题目描述 定义一个数字为幸运数字当且仅当它的所有数位都是4或者7。 比如说,47、744、4都是幸运数字而5、17、467都不是。 假设现在有一个数...转载 2018-03-20 20:04:57 · 363 阅读 · 0 评论 -
Restore Points Gym - 101498M dfs暴力搜
转自一位大佬:https://blog.csdn.net/lifelikes/article/details/77620063题目链接:http://codeforces.com/gym/101498/problem/M题意: 有n个点 排列在一条直线上 题目给出任意两个点之间距离。 要你给出一种方案(存在多解),使之满足题目条件。 按坐标升序排列。 题目保证总有一个点在原点,点可...转载 2018-04-27 23:04:16 · 197 阅读 · 0 评论