随笔分类 - 比赛--Codeforces
摘要:A题 题意:给定一串数列,t,t+s,t+s+1,t+2s,t+2s+1......问某一个数是否是数列当中的 题意:只需判断(x-t)与(x-t-1)能否整除s即可,注意起始时的判断 1 #include <iostream> 2 #include <cstdio> 3 #include <cst
阅读全文
摘要:A题 题意:给定d个操作,每个操作当中只包含1和0,若存在0,则表示操作者获胜,求最大的连续获胜个数 分析:直接统计之后用一个数组纪录下来即可 1 #include <iostream> 2 #include <cstdio> 3 #include <cstring> 4 #include <str
阅读全文
摘要:大小号刷题,大号,被查重,悲剧,最后小号过了3题 A题: 分析:大于h的+2,小于等于h的+1 1 #include <iostream> 2 #include <cstdio> 3 #include <cstring> 4 #include <string> 5 #include <vector>
阅读全文
摘要:A题 题意:给定一些数,然后求一次交换以后最大的数和最小的数之间的最大距离 分析:找到最大数和最小数的位置,然后判断是把位置大的移到最后还是把位置小的移到开始位置即可 1 #include <iostream> 2 #include <cstdio> 3 #include <cstring> 4 #
阅读全文
摘要:A题: 题意:判断火星上的节假日最多和最少 分析:除以7,然后我们对原数模7的余数进行判断一下即可 1 #include <iostream> 2 #include <cstdio> 3 #include <cstring> 4 #include <string> 5 #include <vecto
阅读全文
摘要:昨天第一次开大小号打cf,发现原来小号提交之后大号在此提交同样的代码会被skipped掉,然后之后提交的代码都不记分,昨天a,b,c都是水题 A 题意:问一个物品最多能被分成多少份,分成的连续两份不能相同 分析:直接1,2这样份,所以除以3乘2,在对3取模 1 #include <iostream>
阅读全文
摘要:A(模拟+数学) 题意:在一个数列当中最少添加多少个数可以使它们两两互质,并打印出添加以后的数列 1 #include <iostream> 2 #include <cstdio> 3 #include <cstring> 4 #include <string> 5 #include <vector
阅读全文
摘要:A题: 链接:http://codeforces.com/contest/580/problem/A dp,最长连续不上升子序列 1 #include<iostream> 2 #include<cstdio> 3 #include<cstring> 4 #include<string> 5 #inc
阅读全文
摘要:这场并没有做,做的赛后的,太晚了时间,中午做了两题,稍微贴一下,剩余的题目本周争取补完 A题: 链接:http://codeforces.com/contest/554/problem/A 1 #include<iostream> 2 #include<cstdio> 3 #include<cstr
阅读全文
摘要:先送上一篇题解(虽然全英文的):http://codeforces.com/blog/entry/18034 A题:http://codeforces.com/problemset/problem/546/A 没什么好说的,SB题 1 #include<iostream> 2 #include<cs
阅读全文

浙公网安备 33010602011771号