比赛链接:传送门 前期大顺风,2:30金区中游.后期开题乏力,掉到银尾.4:59绝杀I,但罚时太高卡在银首. Problem A - Dogs and Cages 00:09:45 (+) Solved by Dancepted 算了半天发现就是n-1,被队友喷死,差点气哭. Problem E - Evil Forest 00:16:54 (+) Solved by xk xk大喊签到,就过了. 代码: #include <iostream> #include <cmath> #…
比赛链接:传送门 上半场5题,下半场疯狂挂机,然后又是差一题金,万年银首也太难受了. (每次银首都会想起前队友的灵魂拷问:你们队练习的时候进金区的次数多不多啊?) Problem J. Justifying the Conjecture 00:09 (+) Solved by Dancepted 签到.好像见过很多次了,经典水题.然后英语太差了,理解题意用了不少时间. 代码: #include <bits/stdc++.h> #define endl '\n' using namespace…
比赛链接:传送门 跌跌撞撞6题摸银. 封榜后两题,把手上的题做完了还算舒服.就是罚时有点高. 开出了一道奇奇怪怪的题(K),然后ccpcf银应该比区域赛银要难吧,反正很开心qwq. Problem A. Mischievous Problem Setter 00:14 (-2) Solved by Dancepted 良心签到题.WA2吃乳猪. 代码: #include <iostream> #include <cmath> #include <map> #includ…
链接: https://codeforces.com/gym/102394/problem/F 题意: Harbin, whose name was originally a Manchu word meaning "a place for drying fishing nets", grew from a small rural settlement on the Songhua River to become one of the largest cities in Northea…
题解: https://files.cnblogs.com/files/clrs97/HarbinEditorialV2.zip Code: A. Artful Paintings /* let x=f[n] f[i-1]-f[i]<=0 i -> i-1 0 f[i]-f[i-1]<=1 i-1 -> i 1 f[l-1]-f[r]<=-k r -> l-1 -k f[r]-f[l-1]<=-k+x l-1 -> r -k+x f[n]-f[0]<=…
链接: https://codeforces.com/gym/102394/problem/K 题意: DreamGrid is the keeper of n rabbits. Initially, the i-th (1≤i≤n) rabbit has a weight of wi. Every morning, DreamGrid gives the rabbits a carrot of weight 1 and the rabbits fight for the only carrot…
链接: https://codeforces.com/gym/102394/problem/J 题意: The great mathematician DreamGrid proposes a conjecture, which states that: Every positive integer can be expressed as the sum of a prime number and a composite number. DreamGrid can't justify his c…
链接: https://codeforces.com/gym/102394/problem/I 题意: DreamGrid has an interesting permutation of 1,2,-,n denoted by a1,a2,-,an. He generates three sequences f, g and h, all of length n, according to the permutation a in the way described below: For ea…
传送门 D - Decimal 题意: 询问\(\frac{1}{n}\)是否为有限小数. 思路: 拆质因子,看是不是只包含2和5即可,否则除不尽. Code #include <bits/stdc++.h> #define MP make_pair #define fi first #define se second #define sz(x) (int)(x).size() using namespace std; typedef long long ll; typedef pair<…
题目链接:https://codeforces.com/gym/102361/problem/F 题意 有 \(n\) 个点和 \(m\) 条边,每条边属于 \(0\) 或 \(1\) 个环,问去掉一些边使得图变为森林的方案个数. 题解 找出所有环的长度 \(c_i\),每个环可以去掉 \(1,2,\dots,c_i\) 条边,方案各为 \(C_{c_i}^1,C_{c_i}^2, \dots C_{c_i}^{c_i}\),即 \(2^{c_i} - 1\) . 所有环的去边方案共有 \(\p…