给定一个数组,每次操作可以把任意一个元素 +1 或者 -1。求使得递增的最小操作次数。 n<=3000 ...
分类:
其他好文 时间:
2021-02-16 11:54:21
阅读次数:
0
地址 https://pintia.cn/problem-sets/994805342720868352/problems/994805502658068480 主要是模拟 题意比较绕。 题目大意是 接受各个学生的三门成绩 C M E, 然后四舍五入计算出平均成绩A 在 接受询问的学生的id后 打印 ...
分类:
其他好文 时间:
2021-02-16 11:53:57
阅读次数:
0
119. 杨辉三角 II 给定一个非负索引 k,其中 k ≤ 33,返回杨辉三角的第 k 行。 在杨辉三角中,每个数是它左上方和右上方的数的和。 示例: 输入: 3 输出: [1,3,3,1] class Solution { public List<Integer> getRow(int rowI ...
分类:
其他好文 时间:
2021-02-16 11:50:12
阅读次数:
0
勤奋能够弥补聪明的不足,但聪明无法弥补懒惰的缺陷。你好,我是梦阳辰!期待与你相遇! 概述 JUC就是java.util .concurrent工具包的简称,俗称java并发包。这是一个处理线程的工具包,JDK 1.5开始出现的. 01.Java多线程复习 Interface Lock Lock实现提 ...
分类:
其他好文 时间:
2021-02-16 11:41:02
阅读次数:
0
CF1480A Yet Another String Game Problem 给出一个字符串,两人轮流操作,每次操作可以将一个字符改为另外一个字符,当不可以不改动,先手目标是让最终字符串字典序最小,后手目标相反,求最终字符串。 Sol 贪心地模拟即可。 #define in read() int ...
分类:
其他好文 时间:
2021-02-15 12:23:09
阅读次数:
0
https://codeforces.com/contest/1473/problem/E vector存图: 1 #define bug(x) cout<<#x<<" is "<<x<<endl 2 #define IO std::ios::sync_with_stdio(0),cin.tie(0 ...
分类:
其他好文 时间:
2021-02-15 12:17:20
阅读次数:
0
题目链接:https://acm.ecnu.edu.cn/contest/354/problem/A/ 原做法:树上倍增+lca,可能生成树的时候复杂度太高,用的是类似并查集的合并方式。 oj上的大佬:https://acm.ecnu.edu.cn/contest/354/submission/22 ...
分类:
其他好文 时间:
2021-02-15 12:10:05
阅读次数:
0
正题 题目链接:https://www.luogu.com.cn/problem/AT3949 题目大意 长度为$L$的坐标轴上,给出$n$个点,每个点$x_i$需要购物$t_i$的时间,一辆车在$0\sim L$折返跑,求从$0$出发购物完回到$0$的最短时间。 \(n\in[1,3\times ...
分类:
其他好文 时间:
2021-02-15 11:59:49
阅读次数:
0
AT1981 [AGC001C] Shorten Diameter \(solved\) AT1982 [AGC001D] Arrays and Palindrome AT1983 [AGC001E] BBQ Hard \(solved\) AT1984 [AGC001F] Wide Swap AT ...
分类:
其他好文 时间:
2021-02-15 11:56:59
阅读次数:
0
https://www.acwing.com/problem/content/1139/ #include <bits/stdc++.h> using namespace std; #define IO ios::sync_with_stdio(false);cin.tie(0); cout.tie ...
分类:
其他好文 时间:
2021-02-15 11:53:52
阅读次数:
0