Loading

上一页 1 ··· 67 68 69 70 71 72 73 74 75 ··· 84 下一页
摘要: kuangbin带你飞:点击进入新世界 文章目录 1.Max Sum Plus Plus 原题链接:传送门 2.Ignatius and the Princess IV 原题链接:传送门 思路:hash存储(感觉和dp没啥关系啊。。) #include<bits/stdc++.h> using na 阅读全文
posted @ 2020-07-23 10:32 RioTian 阅读(1251) 评论(0) 推荐(1)
摘要: 之前在师哥在讲动态规划的时候就推荐我们阅读一下这个在知乎下的一个回答,当时并不放在心上,现在做了一些动态规划的题目,经常产生一些疑惑与迷茫,现在拜读了这篇文章,觉得自己获益匪浅,于是做一下分享。 知乎关于这篇文章的链接https://www.zhihu.com/question/23995189/a 阅读全文
posted @ 2020-07-22 20:05 RioTian 阅读(466) 评论(0) 推荐(1)
摘要: A new e-mail service "Berlandesk" is going to be opened in Berland in the near future. The site administration wants to launch their project as soon a 阅读全文
posted @ 2020-07-22 15:13 RioTian 阅读(203) 评论(2) 推荐(1)
摘要: Xenia lives in a city that has n houses built along the main ringroad. The ringroad houses are numbered 1 through n in the clockwise order. The ringro 阅读全文
posted @ 2020-07-22 14:44 RioTian 阅读(239) 评论(0) 推荐(0)
摘要: 题目链接 Polycarpus has a ribbon, its length is n. He wants to cut the ribbon in a way that fulfils the following two conditions: After the cutting each r 阅读全文
posted @ 2020-07-21 15:16 RioTian 阅读(256) 评论(0) 推荐(1)
摘要: 算年龄 英国数学家德摩根出生于19世纪初叶(即18xx年)。 他年少时便很有才华。一次有人问他的年龄,他回答说: “到了x的平方那年,我刚好是x岁”。 请你计算一下,德摩根到底出生在哪一年。 题中的年龄指的是周岁。 请填写表示他出生年份的四位数字,不要填写任何多余内容。 1806 //手写下 0 - 阅读全文
posted @ 2020-07-21 11:24 RioTian 阅读(188) 评论(0) 推荐(0)
摘要: 事实上只是因为有人直接 #define int long long 了。。。然后int main改成signed main就行了 #define int long long ... signed main() { ... return 0; } 阅读全文
posted @ 2020-07-20 19:43 RioTian 阅读(1020) 评论(1) 推荐(1)
摘要: Codeforces Round #656 (Div. 3)题解 A.Three Pairwise Maximums 解题思路: 依照题意和样例,三个整数x,y,z必须有两个相同且都比第三个数大。 如果x==y则说明a为最大值,此时需要满足a>=z,如果不满足该条件,则无解,因为z=max(b,c) 阅读全文
posted @ 2020-07-20 16:25 RioTian 阅读(177) 评论(0) 推荐(0)
摘要: VS以及C++开发使用注意事项 在vs2013版本开始出现安全检查 最好提前禁用错误4996 制表符问题:Visual Studio中设置Tab键对应空格数的方如下:依次选择:工具-〉选项 -〉文本编辑器->所有语言->制表符 改 插入空格 或 制表符大小为4(作用保证在不同人不同编译器有正确的缩进 阅读全文
posted @ 2020-07-19 13:34 RioTian 阅读(202) 评论(0) 推荐(1)
摘要: 在VS2017中创建C++的代码块模板 有任何问题,请留言!!! 在VS2017中有工具–>代码片段管理器,方便我们使用固有的代码块模板,同时我们也可以自定义模板。 在VS2017中代码片段的模板是xml文件,后缀为snippet格式,不知道怎么写,但是它已有一些现成的代码块,可以仿照它来写。 首先 阅读全文
posted @ 2020-07-18 22:46 RioTian 阅读(602) 评论(0) 推荐(2)
摘要: 题意:有三个好朋友的家都住在x轴的不同坐标,问新年的时候三个朋友之间问候走的最短距离 max{(a,b,c)} - min{(a,b,c)} 即可 编译器由 VS2017 切换到VScode使用,纪念下 Examples input 7 1 4 output 6 #include<bits/stdc 阅读全文
posted @ 2020-07-18 19:39 RioTian 阅读(150) 评论(0) 推荐(0)
摘要: https://codeforces.com/problemset/problem/489/C C. Given Length and Sum of Digits... You have a positive integer m and a non-negative integer s. Your 阅读全文
posted @ 2020-07-17 20:16 RioTian 阅读(221) 评论(0) 推荐(0)
摘要: 题意:数组中有一个数字出现的次数超过了数组长度的一半,找出这个数字。 分析与解法 一个数组中有很多数,现在我们要找出其中那个出现次数超过总数一半的数字,怎么找呢?大凡当我们碰到某一个杂乱无序的东西时,我们人的内心本质期望是希望把它梳理成有序的。所以,我们得分两种情况来讨论,无序和有序。 解法一 如果 阅读全文
posted @ 2020-07-16 10:49 RioTian 阅读(1004) 评论(1) 推荐(2)
摘要: 试题 A: 平方和 本题总分:5 分 【问题描述】 小明对数位中含有 2、0、1、9 的数字很感兴趣,在 1 到 40 中这样的数包括 1、2、9、10 至 32、39 和 40,共 28 个,他们的和是 574,平方和是 14362。注意,平方和是指将每个数分别平方后求和。 请问,在 1 到 20 阅读全文
posted @ 2020-07-16 09:40 RioTian 阅读(858) 评论(2) 推荐(2)
摘要: 介绍下概念:简单来说,启发式搜索就是对取和不取都做分析,从中选取更优解(或删去无效解) 例题:P1048 采药 所有的启发式搜索都会有一个估价函数。下面是这一题的估价函数。 const int N = 105; struct Node { int a, b; // a代表时间,b代表价值 doubl 阅读全文
posted @ 2020-07-15 10:26 RioTian 阅读(295) 评论(0) 推荐(1)
上一页 1 ··· 67 68 69 70 71 72 73 74 75 ··· 84 下一页