![](https://img-blog.csdnimg.cn/20201014180756919.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
Codeforces
文章平均质量分 78
TimeVshow
个人博客http://allmight.xyz,欢迎关注~
展开
-
【Codeforces div3-498】题解
Codeforces div3-498题解A. Adjacent Replacements对于这道题目就比较简单了,如果该数N为奇数,那么经过变换之后不变,如果该数为偶数则变为N - 1#include <stdio.h>const int maxn=1005;int a[maxn];int n; void work(){ scanf("%d",&n); for(int i=1;i<=n;i++) { scanf("%d",&a[i]);原创 2022-01-09 20:24:18 · 444 阅读 · 0 评论 -
Codeforce Round#544 div3题解
Problem A1.题目描述 Problem A,给出开始时间以及截至时间求出中间的时间2.题目思路 将开始时间以及结束时间都转化为分钟表示,相加除以2即为所得#include <stdio.h>int main() { int h1, h2, m1, m2; int m3, h3; scanf("%d:%d", &h1, &m1); sca...原创 2019-06-07 14:48:51 · 220 阅读 · 0 评论 -
Codeforce Round #547 div3
A.Game 231.题目 A2.思路 直接考虑dfs即可,记录最小值,最后输出即可#include <stdio.h>const int maxn=1e9+7;int n,m;int min=maxn;void dfs(int n,int tar,int step){ if(n>tar) { return; } if(n==tar) { ...原创 2019-06-07 15:00:07 · 140 阅读 · 0 评论 -
Codeforce Round #550 div3题解
B.Parity Alternated Deletions1.题目B2.解答 在n个数中是有偶数也有奇数的,在读取的时候我们要首先记录下偶数的个数n,奇数的个数m,如果|m-n|<=1,那么此时的数组剩下的元素为0.这一点不再说明,那么我们只需要考虑两者之差大于1的情况,这时剩下的数一定属于个数多的那一个数组。并且剩下的元素的个数为|m-n|-1,所以我们只需要将个数多的数组按照从...原创 2019-06-07 15:21:11 · 197 阅读 · 0 评论