Python
Java
PHP
IOS
Android
Nodejs
JavaScript
Html5
Windows
Ubuntu
Linux
Codeforces#808(Div.2)A-D题解
目录 A Difference Operations B Difference of GCDs C Doremy s IQ D Difference Array A Difference Operations Problem A Codef
补题笔记
Codeforces
c
思维
1600*B. Jumping Jack(数学&&找规律)
解析 一直往右条 直到第一次超过 x 如果当前和目标点 p x为偶数 则 p x 2 的那一步向左跳 这样会少跳 p x 正好补在多跳的这一段 如果为奇数 则不能除2 则继续跳 直到距离为偶数即可 x和x答案一样 include
Codeforces
算法
数据结构
c
图论
1500*B. Coloring(找规律&鸽巢原理)
include
Codeforces
算法
c
开发语言
数据结构
1096C - Polygon for the Angle-几何-性质
思路 根 据 几 何 性 质 正 多 边 形 所 有 三 个 点组成的 角 都 是最小角的倍数 然后根据内角公式 可以求出 正多边形 最小角为 多边形内角 n 2 然后 打表发现 180边形最小角为1 最大角 178 所以 只有 179无法
Codeforces
victor的数学(技巧)专练
Educational Codeforces Round 67 (Rated for Div. 2)
contest链接 A Stickers and Toys time limit per test 2 seconds memory limit per test 256 megabytes input standard input out
贪心
构造
搜索BFSDFS
Codeforces
1400*C. No Prime Differences(找规律&数学)
解析 由于 1 不是质数 所以我们令每一行的数都相差 1 对于行间 分为 n m之中有存在偶数和都为奇数两种情况 如果n m存在偶数 假设m为偶数 如果都为奇数 则 include
Codeforces
c语言
算法
c
数据结构
Codeforces Round #367 (Div. 2)【贪心、差分、DP、字典树、二维链表】
Codeforces Round 367 Div 2 A Beru taxi 就是问 我们知道一个点 从其他点到它的最少花费的时间是多少 include
Codeforces
【前后缀 + 推公式整理】 Codeforces Round #813 (Div. 2) D. Empty Graph
题意 给定 n n n 个点的点权 a i a i ai 这 n
知来者之可追(20220412)
算法
c
思维
Codeforces
Day 21 B. T-primes
Problem We know that prime numbers are positive integers that have exactly two distinct positive divisors Similarly we l
Codeforces
number theory
Codeforces Round#808 div.1+div.2题解
视频讲解 BV1ya411S7KF div 2 A Difference Operations 题目大意 给定长度为 n n n 的数组 a a a 可以进行任意次操作 每次操作选择一个整数
Codeforces
深度优先
图论
算法
Salary Changing【Codeforces 1251 D】【二分答案】
Educational Codeforces Round 75 Rated for Div 2 D 题意 有N名员工和S元钱 然后我们想知道在每一名员工有薪资要求在 li ri 的情况下 我们如何在总共就S元钱的情况下做到员工薪资的中位数最
Codeforces
二分答案
Pineapple Incident【Codeforces 697 A】
Codeforces Round 362 Div 2 A 简单题 include
Codeforces
Catowice City【Codeforces 1248 F】【BFS】
Codeforces Round 594 Div 2 F 一开始是听闻有人说这是一道Tarjan好题 然后就点进来做了 但是想来想去 却想了个另类的法子 我们可以看到 如果N个人都要选择的话 那么每个人都只能是审判者 或者是参赛者 所以 我
Codeforces
搜索BFSDFS
BFS
Codeforces Round #552 (Div. 3)
A Restoring Three Numbers time limit per test 1 second memory limit per test 256 megabytes input standard input output s
Codeforces
Codeforces Round #553 (Div. 2)
A Maxim and Biology time limit per test 1 second memory limit per test 256 megabytes input standard input output standar
Codeforces
Voting【Codeforces 1251 E1 && E2】【贪心】
Educational Codeforces Round 75 Rated for Div 2 E2 Now elections are held in Berland and you want to win them More preci
贪心
Codeforces
1600*C. Binary String Copying
https codeforces com problemset problem 1849 C Binary String Copying 洛谷 解析 对于某个区间x y 他排序之后 最左侧的连续0和最右侧的连续1是不影响排序结果的 假设左侧
Codeforces
c语言
算法
c
数据结构
Daniel and Spring Cleaning【数位DP】【Codeforces 1245 F】
Codeforces Round 597 Div 2 F 这道题化简一下就是让我们求有上下限的2进制数中有几对满足每一位的相 值不为1的对数 那么 首先看到这个1e9就会让人想到数位DP 然后接着就是如何去求的这样一个问题 我们不如将上下限
DP动态规划
Codeforces
数位dp
Codeforces Round #589 (Div. 2)【数学 + 构造】
A题 Distinct Digits 因为数的大小最长也就是5位 所以直接暴力求解即可 复杂度O 5 N include
Codeforces
1500*B. The Walkway(贪心&规律)
解析 把每个区间段分成左闭右开区间 我们可以观察到 每个区间的饼干数量为 r l d 上取整 所以先计算不删除某个点的饼干总和init 然后遍历所有点 将这个点删除 所以删除某个点后剩余数量为 找出最小值并且统计数量 需要注意的是 因为如果
Codeforces
算法
图论
c语言
c
«
1
2
3
4
5
6
7
»