写在前面 最近开始刷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
@(C++内联函数) #include <iostream> using namespace std; inline int Max(int a, int b) { if (a > b) return a; else return b; } int main() { cout << Max(23, ...
分类:
编程语言 时间:
2020-11-21 12:39:21
阅读次数:
17
##题面 You are given a sequence of n integers a1 , a2 , ... , an in non-decreasing order. In addition to that, you are given several queries consisting ...
分类:
其他好文 时间:
2020-11-21 12:28:36
阅读次数:
7
题解 [USACO14DEC]Piggy Back S Description 给出一个无向图,Bessie从1号仓库走到n号(每次花费B), Elsie从2号仓库走到n号(每次花费E),如果两个人走同一条路花费P,求总花费最小。 输入B,E,P,n,m和m条边的联通情况。 输出最少花费。 Simp ...
分类:
其他好文 时间:
2020-11-21 12:23:37
阅读次数:
6
###P3899 [湖南集训]谈笑风生 二维数点问题,主席树模板(两种写法 #include<bits/stdc++.h> #define IL inline #define LL long long #define pb push_back using namespace std; const i ...
分类:
其他好文 时间:
2020-11-21 12:15:18
阅读次数:
7
2.5 处理类型 类型别名(type alias) typedef double wages ; typedef wages base, *p ; 或者是using!!别名声明! using SI = Sales_item; 2.5.2 auto 类型说明符 auto itme = val1 + v ...
分类:
编程语言 时间:
2020-11-21 11:55:38
阅读次数:
5
题意描述 Bale Figures 给定多个立体方块的排布方式,求其组成的立体图形的表面积。 算法分析 根据 CSP-2020 可以看出,签到题的模式可能由数学题变为大模拟。 那么这种情况下多做思维难度不高,又需要代码能力的模拟题变的尤为重要。 这便是一道签到好题(确信 首先介绍一个很好想但是错误的 ...
分类:
其他好文 时间:
2020-11-21 11:53:07
阅读次数:
3
cf gym 链接 A. Kick Start 简单签到题。 code: #include<bits/stdc++.h> #define pi pair<int,int> #define f first #define s second using namespace std; const stri ...
分类:
其他好文 时间:
2020-11-21 11:48:03
阅读次数:
4
#include<iostream> using namespace std; class Composition{ public: //同时有类内初始值和初始化列表时候,最终值为初始化列表中的 Composition():im(this),m(20){cout<<"Composition ctor ...
分类:
其他好文 时间:
2020-11-20 12:02:36
阅读次数:
10