这场比较郁闷,C题短路,连续4次WA,导致罚时太多 A - Arithmetic Progression
Problem Statement
Print an arithmetic sequence with first term A A A, last term B B B, and common difference D D D. You are only given inputs for w…
See the original article https://dyingdown.github.io/2019/11/17/AtCoder-5039-AB-Substrings/
AB Substring
Problem Statement
Snuke has NNN strings. The i−thi-thi−th string is sis_isi.
Let us concatenate these strings into one string after arranging t…
See the original article https://dyingdown.github.io/2019/11/17/AtCoder-4871-Lower/
Lower
Problem Statement
There are NNN squares arranged in a row from left to right.
The height of the i−thi-thi−th square from the left is HiH_iHi.
You will land o…
C Typical Stairs 斐波那契的变种,有障碍时填0 D Lamp 对每个点维护四个方向可以延伸的最长值 E - Sum Equals Xor 数位dp f ( p o s , x , c a p ) f(pos, x, cap) f(pos,x,cap) 表示在二进制表示下,当前搜索到pos位 因为当前位只有三种可能 (0,0) (1,…
A. Setting up Camp 题目分析: 有三种人,内向、外向、综合,内向必须独自一个帐篷,外向必须3个人一个帐篷,综合介于1~3人一个帐篷,我们发现非法情况只会存在外向的人凑不成3个人一个帐篷的情况,因外向不够可…
A.A Multiply(贪心)
题意:
给你一个长度为 N N N 、 A ( A 1 , A 2 , … , A N ) A(A_1,A_2,\dots,A_N) A(A1,A2,…,AN) 和整数 C C C 的整数序列。 在进行最多一次以下操作后,求 A A A 中元素的最大可能和ÿ…
A - Counting Passes
Description
Problem Statement N N N people labeled 1 , 2 , … , N 1,2,\dots,N 1,2,…,N took an exam, and person i i i scored A i A_i Ai points. Only those who scored at least L L L points pass this exam. Determine how many peopl…
目录
A. Problemsolving Log
问题分析:
B. Preparing for the Contest
问题分析:
C. Quests 问题分析:
D. Three Activities
题目分析:
E1、E2. Game with Marbles (Hard Version) 题目分析:
F. Programming Competition
待更... A. Problem…
C - Maximal Value 遍历比较一下相邻的值 D - Face Produces Unhappiness 反向思维,考虑不开心的点 字符串可以规约成RR…RLL…LRR…RL…L这样相间的情况 每次操作只有把整段的R或者L反向,才能减少不开心的点 有几种不同的情况 RLRLR LRLR RLRL LRLRL 2.…
目录
A. Rating Increase
题目分析:
B. Swap and Delete
题目分析:
C. Game with Multiset
题目分析: A. Rating Increase 题目分析:
因为首部不为零,故我们从第二个字符开始遍历,如果遇到第一个不为‘0’的字符࿰…
感觉和cf div3差不多。 A - Tomorrow
签到,D和M是一年有D月M天,输入ymd输出ym[d1],如果d1>D了显然要m,模拟即可。
#include <bits/stdc.h>
//#define int long long
#define fr first
#define se second
#define endl …
C 遍历,根据每个线段最左和最右不断“缩小”,最终得到答案 D 在原始牌和新牌中挑出N张最大,重新组成数组 排序后双指针 E x y分开计算 任取一对点 x 1 , x 2 x_1,x_2 x1,x2,记d为两个点的x差值,剩下可以随意取k-2个…
F题提交了无数遍,最后发现是三分求解的写法错了 C - Rectangle Cutting 盲猜都在xy的中心点时可以无限分割,否则不能 D - Enough Array 前缀和二分求位置 E - Common Subsequence 公共子序列求有几种组合 设 d p [ i ] [ j ] dp[i][j] dp[i][j]代表s取到…
目录 A. Rook
问题分析:
B. YetnotherrokenKeoard
问题分析:
C. Removal of Unattractive Pairs
问题分析:
D. Jumping Through Segments
问题分析:
E. Good Triples
问题分析: A. Rook 问题分析:
给一个棋子将其同行同列的位置输出
#include<bits/s…
See the original article https://dyingdown.github.io/2019/11/22/AtCoder-5165-Kleene-Inversion/
Kleene Inversion
Problem Statement
We have a sequence of N integers AA0,A1,⋯,AN−1A~~ A_0,~A_1,~ \cdots,~A_{N−1}A A0, A1, ⋯, AN−1.
Let B be a sequ…
See the original article https://dyingdown.github.io/2019/11/17/AtCoder-4873-ModSum/
ModSum
Problem Statement
For an integer N, we will choose a permutation {P1,P2,⋯,PN}\{P_1,P_2,\cdots,P_N\}{P1,P2,⋯,PN} of {1,2,⋯,N}\{1,2,\cdots,N\}{1,2,⋯,N}. …
A - Leftrightarrow
如果字符串最左边是<,最右边是>,中间都是,那么就输出Yes,否则No
#include <bits/stdc.h>
//#define int long long
#define per(i,j,k) for(int (i)(j);(i)<(k);(i))
#define rep(i,j,k) for…
See the original article https://dyingdown.github.io/2019/11/21/AtCoder-5633-Counting-of-Trees/
Counting of Trees
Problem Statement
Given is an integer sequence D1,D2,⋯,DND_1, D_2, \cdots, D_ND1,D2,⋯,DN of N elements. Find the number, modulo 998…
See the original article https://dyingdown.github.io/2019/11/17/AtCoder-4297-Monsters-Battle-Royale/
Monsters Battle Royale
Problem Statement
There are N monsters, numbered 1,2,…,N.
Initially, the health of Monster iii is AiA_iAi.
Below, a monster …
G - Typical Path Problem
题目大意
给定一张 N N N 个点、 M M M 条边的简单无向图 G G G 和三个整数 A , B , C A,B,C A,B,C。
是否存在一条从顶点 A A A 到 C C C,且经过 B B B 的简单路径?
数据范围: 3 ≤ N ≤ 2 1 0 5 3\le …
A - Arithmetic Progression
给你A,B,D,输出A,AD,A2*D,...到B为止,一个循环就可以解决。
#include <bits/stdc.h>
//#define int long long
#define per(i,j,k) for(int (i)(j);(i)<(k);(i))
#define rep(i…
C 容斥原理 要注意同时能被CD整除的数应该是x%gcd(C,D) 0 D 排序后贪心 这个题的难度比400分要低 E 容易想到将1点放在中心,其他点像星型连接1点,是K的上限 然后要观察到每连接两个点将当前的k值减一,就容易构造 F xy坐标系拆开坐标建图&…
目录
A - Three Threes
B - Pentagon
C - Repunit Trio
D - Erase Leaves
E - Takahashi Quest A - Three Threes
输入一个数n,输出n个n.
B - Pentagon 给定一个正五边形,任意给两对顶点,问这两对顶点之间的距离是否相同…