Codeforces
Zeolim
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
[Codeforces] Round #595 (Div. 3) A B1 B2 C1 C2 D1 D2 E
A: 将数分为k组使得每组不包含数值差为1的数 解:正整数可直接分为两组 奇数 偶数 符合题意, 所以给定数列有相邻就是2否则就是1 B1 / B2: 给定一每个点出度为1的图问每个点走到自己需要多少步 明显走到自己是个环, 并且环上答案都一样,递归求解即可 #include <bits/stdc++.h> using namespace std; const int MAX...原创 2019-10-23 16:04:39 · 374 阅读 · 0 评论 -
Codeforces Round #498 (Div. 3) A. Adjacent Replacements
A. Adjacent Replacements time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Mishka got an integer array aa of length nn as a birthday...原创 2018-07-17 10:45:57 · 232 阅读 · 0 评论 -
Codeforces Round #498 (Div. 3) B. Polycarp's Practice
B. Polycarp's Practice time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output Polycarp is practicing his problem solving skill. He has a...原创 2018-07-17 10:49:54 · 513 阅读 · 0 评论 -
Codeforces Round #498 (Div. 3) C. Three Parts of the Array
C. Three Parts of the Array time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output You are given an array d1,d2,…,dnd1,d2,…,dn consisting...原创 2018-07-17 10:55:16 · 436 阅读 · 0 评论 -
Codeforces Round #516 Div. 2 A. B. Equations of Mathematical Magic C. Oh Those Pali D. Labyrinth
A. Make a triangle! Masha has three sticks of length aa, bb and cc centimeters respectively. In one minute Masha can pick one arbitrary stick and increase its length by one centimeter. She is not all...原创 2018-10-14 22:23:08 · 784 阅读 · 0 评论 -
Educational Codeforces Round 54 (Rated for Div. 2) A. Minimizing the String
贪心 因字典序位越靠前权越大 从初始位置枚举此位后一位向后与原串比较字典序 若小则为最优 输出结束 /* Zeolim - An AC a day keeps the bug away */ //pragma GCC optimize(2) #include <cstdio> #include <iostream> #include <cs...原创 2018-11-13 11:22:29 · 485 阅读 · 0 评论 -
Educational Codeforces Round 54 (Rated for Div. 2) B. Divisor Subtraction
观察易得 1.质数无1和自身外的因子 且只有本身既质又因 按题意直接一步减自身至零 2.若N是偶数则一直减2直到0 所有质数都是奇数 奇数减奇数易得偶数 再回到条件2 一步到位 所以操作次数不会太多 线筛打表 结合1 2 暴力模拟即可 /* Zeolim - An AC a day keeps the bug away */ //pragma GCC optimi...原创 2018-11-13 11:29:19 · 320 阅读 · 0 评论 -
Educational Codeforces Round 54 (Rated for Div. 2) C. Meme Problem
二分搜索 推下方程把前半部分去掉 /* Zeolim - An AC a day keeps the bug away */ //pragma GCC optimize(2) #include <cstdio> #include <iostream> #include <cstdlib> #include <cmath> #inc...原创 2018-11-13 11:32:19 · 452 阅读 · 0 评论 -
[构造]D. N Problems During K Days
Polycarp has to solve exactlynnproblems to improve his programming skill before an important programming competition. But this competition will be held very soon, most precisely, it will start ink...原创 2019-05-08 20:23:11 · 426 阅读 · 0 评论 -
CCPC-Wannafly Summer Camp 2019 Day1
A - Jzzhu and Cities 题目大意:给个图,m条普通边,k条特殊边,保证1到N的最短路上最多可以删掉几条特殊边使得最短路不变。 解法1:跑最短路后松弛一遍所有边,如果松弛时既有普通和特殊则可去掉特殊铁路。 解法2:直接重载搜索顺序使得迪杰斯特拉优先跑普通铁路,再记录总特殊条数-跑的条数即为答案。 /* Zeolim - An AC a day keeps the...原创 2019-07-30 13:55:51 · 316 阅读 · 0 评论
分享