随笔分类 - 刷题笔记: CF
摘要:1443A. Kids Seating 题意: 给你一个整数n,现在你需要从编号 ~ 中选出 个编号使得这些编号之间 ,不能整除。 看了半天,发现只要满足 即可 void solve() { ci
阅读全文
摘要:A - AAA CodeForces - 1047A 题意:给定一个数,分解为三个不为3的倍数且 a + b + c = n 的数 思路:简单贪心,根据情况输出 1,1,n -2 或 1,2,n-3 int main() { // freopen("in.txt","r",stdin); ios::
阅读全文
摘要:1437A. Marketing Scheme 题意:最近猫粮店正在打折销售猫粮罐头,在给定客人能买的罐头数量区间内求合适包装大小 思路:说实话,在比赛刚开始没看懂题,最后放弃读题直接研究给出的样例解释发现,我们可以假设 再进行比较 \(l \% a >= \frac{(
阅读全文
摘要:记录博客的新开始
阅读全文
摘要:div3 人均5题比赛😥
阅读全文
摘要:A - Heist CodeForces - 1041A 昨天 ljm 团队遭到了很严重的盗窃,万恶的小偷将同学们梦寐以求的签到题偷走了。 已知签到题是从 x 按升序编号的。例如,如果 x = 4,并且有 3 个签到题,那么编号就为 4, 5, 6;如果 x = 10,并且有 7 个签到题,那么编号
阅读全文
摘要:1421A. XORwice 题目链接:Click Here // Author : RioTian // Time : 20/10/18 #include <bits/stdc++.h> #define ms(a, b) memset(a, b, sizeof a) using namespace
阅读全文
摘要:1176A. Divide it! 题目链接:http://codeforces.com/problemset/problem/1176/A 题意: 给定一个数字 和三种操作 如果 n 能被 2 整除则 如果 n 能被 3 整除
阅读全文
摘要:【CodeForces】C. Drazil and Factorial 题目链接:Click Here 题意:找一个最大的数,使得每个位的阶乘的乘积与给定数相同。 首先將 2~9 轉成這樣(0,1為空): 2 → 2 (2! = 2不能以其他方式組成) 3 → 3 (3! = 6不能以其他方式組成)
阅读全文
摘要:正式更换编译器为: VS Code 如何配置环境:click here 代码格式化工具:clang-format A. Joysticks 题目连接: http://www.codeforces.com/contest/651/problem/A Description Friends are go
阅读全文
摘要:因为火锅导致错过的上分机会😂,赛后发现人均AC5题 1430A. Number of Apartments 暴力搜索 #include<bits/stdc++.h> using namespace std; typedef long long ll; ll n; void solve() { ci
阅读全文
摘要:Codeforces Global Round 11 1427A. Avoiding Zero 题目链接:click here 待补 1427B. Chess Cheater 题目链接:click here Example input 8 5 2 WLWLL 6 5 LLLWWL 7 1 LWLWL
阅读全文
摘要:A. Floor Number https://codeforces.com/contest/1426/problem/A 题意: 一个楼房房间号由 递增,一楼仅2个房间。给定一位用户的房间号和 楼以上每层的房间数 求出用户所在楼层 思路: 很简单,理解题意即可。 如果 \(n≤
阅读全文
摘要:A - AAA CodeForces - 34B 思路: 典型的贪心,在能搬动的情况下,如果值为负数就带走 #include<bits/stdc++.h> using namespace std; int main() { //freopen("in.txt", "r", stdin); ios:
阅读全文
摘要:330A. Cakeminator https://codeforces.com/problemset/problem/330/A 题意很容易理解:给定一块蛋糕区域,但蛋糕上有几个不能吃的草莓,大胃王一次能吃一整列、行 求在不吃到草莓的情况下能迟到的最多的蛋糕数 //cpp #include<bit
阅读全文
摘要:A - 小d的加法 计蒜客 - T1098 Sample Input 22222222222222222222 33333333333333333333 Sample Output 55555555555555555555 思路: 知道是大数相加的模板题,但发现python真滴简单😂 #大数相加
阅读全文
摘要:Example input 3 1 7 4 1 1 3 5 6 3 2 1 5 6 4 output 7 1 5 1 3 2 4 6 1 3 5 看题的时候发现和sort有关,但一定要逆序排序 证明: ai>=aj 逆序 i<j -i>-j 上式两边同时加上ai,ai-i>ai-j (1) ai>=
阅读全文
摘要:比赛链接:https://codeforces.com/contest/1419 https://codeforces.com/contest/1419/problems A. Digit Game Example input 4 1 2 1 3 3 102 4 2069 output 2 1 1
阅读全文
摘要:A - 小A的矩阵 HDU - 1559 Sample Input 1 4 5 2 2 3 361 649 676 588 992 762 156 993 169 662 34 638 89 543 525 165 254 809 280 Sample Output 2474 思路: 可以使用DP和
阅读全文
摘要:第八场 CodeForces - 1288A. Deadline Example input 3 1 1 4 5 5 11 output YES YES NO Note In the first test case, Adilbek decides not to optimize the progr
阅读全文