Codeforces Round #685 (Div. 2) E 大意 略... 思路 交互题,莫名好玩... 首先,我们需要确定一个位置作为基准,没什么特殊条件,于是假定选择第一位作为基准,记为 \(a_1\) 因为题目保证了数字范围,所以仅有两种情况: 有相同的数 一个排列 先考虑一: 如果有两 ...
分类:
其他好文 时间:
2020-11-26 14:31:14
阅读次数:
5
盒子的六个属性:1·width属性 2.height属性 3.内边距(padding)4.边距(border)5.外边距(margin)6.背景属性(background) 垂直居中的条件:单行文字垂直居中,行高等于高度值 当行高小于高度,文字偏上;当行高大于高度,文字偏下。 盒模型的宽度=左外边距 ...
分类:
其他好文 时间:
2020-11-26 14:08:53
阅读次数:
5
CF div2 #685 C. String Equality 1 6 2 aabbde deeeee 我的想法是直接排序然后模拟加 但是像这一组就炸了 问题在于它加的模拟是从当前最小的起步,这里没有办法保证是不是最小的,本来应该让d加到e,中间两个b一起的,但是这里就成了b单飞了。 WA的代码 # ...
分类:
其他好文 时间:
2020-11-25 12:56:58
阅读次数:
5
#include<bits/stdc++.h> #define ll long long #define N 100015 #define rep(i,a,n) for (int i=a;i<=n;i++) #define per(i,a,n) for (int i=n;i>=a;i--) #def ...
分类:
其他好文 时间:
2020-11-25 12:45:31
阅读次数:
4
呼,熬过一场考试,补下题吧 A. Robot Program 在一个二维无限方格中,初始时你在格子里,每秒你有5种决策:选择移动到上下左右四个格子中的一个或者停留在原地。你不能连续两秒做相同的决策,问最短时间走到格子 \((x,y)\)。 \[ 1 <= t <= 100,0<=x,y<=10^4 ...
分类:
其他好文 时间:
2020-11-25 12:26:46
阅读次数:
5
public class DoubleFormat { double f = 111231.4585; public void m1() { BigDecimal bg = new BigDecimal(f); double f1 = bg.setScale(2, BigDecimal.ROUND_ ...
分类:
其他好文 时间:
2020-11-25 12:18:08
阅读次数:
5
https://codeforces.ml/contest/888/problem/G struct TrieNode { int cnt; int num; int nxt[2]; void Init() { cnt = 0; num = 0; memset(nxt, 0, sizeof(nxt) ...
分类:
其他好文 时间:
2020-11-24 12:58:41
阅读次数:
10
写在前面 最近开始刷CF,今天第一次补完完整的一套CF,总结一下吧,发现做过的题不赶紧总结写题解就容易忘了。 立个flag 争取每天更新一篇CF题解 A. Boring Apartments 模拟题,模拟就完了 #include<bits/stdc++.h> using namespace std; ...
分类:
其他好文 时间:
2020-11-21 12:44:54
阅读次数:
33
比赛链接:https://codeforces.com/contest/1440 A. Buy the String 题解 枚举字符串中 $0$ 或 $1$ 的个数即可。 代码 #include <bits/stdc++.h> using namespace std; int main() { io ...
分类:
其他好文 时间:
2020-11-21 12:41:54
阅读次数:
32
:: %~1 - expands %1 removing any surrounding quotes ("):: %~f1 - expands %1 to a fully qualified path name:: %~d1 - expands %1 to a drive letter only: ...
分类:
其他好文 时间:
2020-11-21 12:05:00
阅读次数:
6