题目链接:http://codeforces.com/contest/1311/problem/D 题意:有三个数a,b,c,且a<=b<=c。你每次可以选择一个数加1或减1,但不能变为非正数。要求尽可能少的操作完后,使得b%a=0,c%b=0。输出最少操作数,并输出最后的a,b,c。 思路:枚举第 ...
分类:
其他好文 时间:
2020-02-25 23:12:21
阅读次数:
56
在受污染的二叉树中查找元素 "LeetCode 1261" ...
分类:
其他好文 时间:
2020-02-25 23:04:23
阅读次数:
67
算法和算子的关系: 算法(algorithm)是为了达到某个目标,实施的一系列指令的过程,而指令包含算子(operator)和操作数(operand)。 算子:operator, 简单说来就是进行某种“操作“,动作。与之对应的,就是被操作的对象,称之为操作数,operand 我们看下面这段简单汇编代 ...
分类:
编程语言 时间:
2020-02-25 20:02:51
阅读次数:
548
水题。 1 #include<iostream> 2 #include<algorithm> 3 using namespace std; 4 5 int main() { 6 int n,id,x,y, MIN = 0x3fffffff,MAX = -1,champion,vegetableBir ...
分类:
其他好文 时间:
2020-02-25 19:43:04
阅读次数:
52
这是一道常规体了。 PAT乙级最后一道大题一般是 结构体+排序 +字符串+hash。 1 #include<iostream> 2 #include<unordered_map> 3 #include<algorithm> 4 #include<cmath> 5 using namespace st ...
分类:
其他好文 时间:
2020-02-25 17:37:13
阅读次数:
67
这个题解超时了,mark一下后面再改 1 #include <iostream> 2 #include <algorithm> 3 4 5 using namespace std; 6 7 /*** 8 * 9 * 给定一个包含 n 个整数的数组 nums,判断 nums 中是否存在三个元素 a,b ...
分类:
其他好文 时间:
2020-02-25 13:15:56
阅读次数:
73
考虑到很多公司目前并没有切换到.netcore,所有本文尝试使用.netframework下的webapi 首先使用Nuget 安装 jwt包 安装完成后,创建 jwt的帮助类 public class JwtToken { static IJwtAlgorithm algorithm = new ...
#include<iostream> #include<algorithm> using namespace std; int hashtable[26] = {0};//统计各个小写字母出现次数 int cnt_alpha = 0,cnt_word = 0,MAX = -1; int main() ...
分类:
其他好文 时间:
2020-02-25 12:31:40
阅读次数:
79
注意剪枝一下,不然会t #include<iostream> #include<cstring> #include<cstdio> #include<vector> #include<cmath> #include<algorithm> using namespace std; #define N ...
分类:
其他好文 时间:
2020-02-25 00:27:24
阅读次数:
87
https://www.luogu.com.cn/problem/P1903#submit #include <iostream> #include <cstring> #include <cstdio> #include <algorithm> #include <cmath> #include ...
分类:
其他好文 时间:
2020-02-25 00:11:50
阅读次数:
62