
训练
文章平均质量分 88
Aloof__
笔记是记忆的缓冲
展开
-
codeforces数论专题总结
文章目录codeforces数论专题总结(1300~1800)1444A Division (1500)1462D Add to Neighbour and Remove(1400)1423K Lonely Numbers(1600)1407B Big Vova(1300)1409C Yet Another Array Restoration(1200)codeforces数论专题总结(1300~1800)1444A Division (1500)题意:输入两个数p,q. 求最大的数x,满足以下条件:原创 2020-12-20 19:59:23 · 873 阅读 · 0 评论 -
2020第十一届蓝桥杯——C/C++程序设计B组(省赛)
今天蓝桥杯打的不尽人意......;因为还没有拿到题面,就按照回忆写一下关键题的题解吧;填空:C:跑步训练:答案:8879#include <bits/stdc++.h>using namespace std;#define sf(a) scanf("%d",&a)#define sff(a,b) scanf("%d %d",&a,&b)#define sfff(a,b,c) scanf("%d %d %d",&a,&b,&a原创 2020-10-17 22:06:38 · 2702 阅读 · 5 评论 -
第十七届中国计量大学程序设计竞赛题解
BBroken PadCCook SteakFFlag Scramble CompetitionHHappy Time is Always ShortIIsolated PointsetKKnown-Well Palindrome Date-Easy Version原创 2020-09-27 08:50:21 · 429 阅读 · 0 评论 -
Codeforces Round #618 (Div. 2)
c题看了半天 觉得规律是:每次找的第一个数的二进制最高位在所有数中只有它是1;明天起来补吧;原创 2020-02-10 00:11:00 · 1421 阅读 · 0 评论 -
2020牛客寒假算法基础集训营1
整体难度codeforces div3水平(但我感觉挺难的)A:honoka和格点三角形这道题有点卡模吧,容斥定理的思想:首先先算一条边平行于轴的情况:底边可以是1或2,(n-2)*(m-1)*m * 2 + (m-2) *m * (n-1) *2再算一条边平行于y轴的情况:底边同样有两种情况:(n-1) *(m-2)*n * 2 + (n-2) *n * (m-1) *2再减去...原创 2020-02-04 19:53:16 · 231 阅读 · 0 评论 -
记2019ICPC上海站打铁(铁到底)经历
昨晚在回来的火车上本来想写来着,但心情实在是太差了,就睡了。。。。打铁,铁底,很差,非常差!虽然是第一次参加比赛,但是这成绩也太不尽人意了,太丢人了;签到题做了四个小时,什么概念,人家肉都吃完了,你还顺着香味在那飘;最主要的原因就是,B题签到太长了,像一个阅读理解一样,我们三个人英语都属于极差那种,虽然近乎把所有单词都查出来了,但是单词连起来就不知道什么意思了;真的是菜,菜到极致;;;;最后...原创 2019-11-25 14:41:33 · 1520 阅读 · 0 评论 -
河南理工大学图灵杯———解题报告
一直没想起来写,今晚想到很多事情,不知道该振奋还是该失落,不知道是把他当成动力还是怎样…原创 2019-08-23 21:47:49 · 236 阅读 · 0 评论 -
暑假培训第二天晚上 HPU STL 栈和队列
题目总连接:HPU STL 栈和队列B题源:Train Problem I 题目:As the new term comes, the Ignatius Train Station is very busy nowadays. A lot of student want to get back to school by train(because the trains in the Ign...原创 2019-07-22 12:57:06 · 227 阅读 · 0 评论 -
暑假培训第二天 GCD&&素筛&&快速幂
A.题源:A - Pseudoprime numbers题目:Fermat’s theorem states that for any prime number p and for any integer a > 1, ap = a (mod p). That is, if we raise a to the pth power and divide by p, the remaind...原创 2019-07-22 10:15:35 · 178 阅读 · 0 评论 -
暑假培训第一天 :sort+结构体+简单数学+暴力
A:题源:前m大的数题目:还记得Gardon给小希布置的那个作业么?(上次比赛的1005)其实小希已经找回了原来的那张数表,现在她想确认一下她的答案是否正确,但是整个的答案是很庞大的表,小希只想让你把答案中最大的M个数告诉她就可以了。给定一个包含N(N<=3000)个正整数的序列,每个数不超过5000,对它们两两相加得到的N*(N-1)/2个和,求出其中前M大的数(M<=100...原创 2019-07-21 18:47:27 · 376 阅读 · 0 评论 -
河南理工大学18级算法协会招新赛(第二场)
1.斐波那契数列单点时限: 2.0 sec内存限制: 512 MB请输出斐波那契的第n项输入格式单组输入每组输入一个数n。0≤n≤10输出格式输出斐波那契数列的第n项样例input0output0input1output1很简单的一道题了,知道什么事斐波那契数列即可;#include<iostream>using namespace std;...原创 2019-06-17 11:20:06 · 573 阅读 · 0 评论 -
2020 十一届蓝桥杯省内模拟赛C++组(非标程)
整理的算法模板:ACM算法模板总结(分类详细版)-------------------------------------------------------------------------------------------------------------------------------------------------------------------------...原创 2020-04-18 16:15:45 · 433 阅读 · 0 评论 -
Acwing 95. 费解的开关(位运算+递推)
你玩过“拉灯”游戏吗?25盏灯排成一个5x5的方形。每一个灯都有一个开关,游戏者可以改变它的状态。每一步,游戏者可以改变某一个灯的状态。游戏者改变一个灯的状态会产生连锁反应:和这个灯上下左右相邻的灯也要相应地改变其状态。我们用数字“1”表示一盏开着的灯,用数字“0”表示关着的灯。下面这种状态1011101101101111000011011在改变了最左上角的灯的状态后将变成...原创 2020-04-06 22:50:23 · 293 阅读 · 0 评论 -
2020 第十一届蓝桥杯校内模拟赛非标程题解
约数:1200000有多少个约数(只计算正约数);暴力枚举即可 一共96个;内存:在计算机存储中,15.125GB是多少MB?15.125*1024=15488;1~2019:在1至2019中,有多少个数的数位中包含数字9?对于每一个数枚举每一位是否含有9;一共:544个;2019个结点的树:一棵包含有2019个结点的树,最多包含多少个叶结点?2...原创 2020-03-14 16:31:28 · 4343 阅读 · 1 评论 -
AtCoder Beginner Contest 158 D - String Formation(字符串拼接)
题目链接:https://atcoder.jp/contests/abc158/tasks/abc158_dTime Limit: 2 sec / Memory Limit: 1024 MBScore : 400pointsProblem StatementTakahashi has a stringSconsisting of lowercase English lette...原创 2020-03-07 22:08:19 · 1401 阅读 · 1 评论 -
AB Substrings AtCoder - 5039
Problem StatementSnuke has N strings. The i-th string is si.Let us concatenate these strings into one string after arranging them in some order. Find the maximum possible number of occurrences of AB...原创 2019-11-21 21:28:58 · 191 阅读 · 0 评论 -
AtCoder Beginner Contest 139
Engines AtCoder - 4900题意:很简单的题意,注意是坐标相加,不是从一个坐标直接跳到另一个坐标;思路:首先把这些点都看成和原点相连的向量,然后理解平行四边形定则;当两个向量的夹角(极角)越小时,两个向量相加所得的向量的绝对值最大;所以把这些点的极角按从小到大排列;然后从最小的两两枚举,求出最大值;#include <bits/stdc++.h> using...原创 2019-11-21 20:32:21 · 328 阅读 · 0 评论 -
HPU 训练(CCPC哈尔滨重现)
F - Fixing Banners Gym - 102394F题意:六个字符串,每个字符串挑选一个字母,总共六个字母看能否组成harbin这个字符串;思路:首先把用二维数组把字符串进行压缩,如果字符出现过,就将它在二维数组中对应位置进行标记;然后dfs跑二维数组,看能否组成harbin#include <bits/stdc++.h>using namespace std;...原创 2019-11-15 17:13:55 · 271 阅读 · 2 评论 -
CodeForces #575 div3
题目传送门:CodeForces #575 div3A题目很长,意思很简单,给你三个数,求和除以儿就可以了;B题意:给你n个数,把它划分成k个区间(字串),要求每个字串之间不能有重叠部分,并且每个子串的元素和为奇数,如果能划分成k个符合要求的区间,就输出每个区间的右端点的位置;否则输出no思路;首先一个字串的元素和要是奇数,那么和其中的偶数元素没有关系,只需要考虑奇数的个数以及位置就...原创 2019-11-15 16:28:02 · 205 阅读 · 0 评论 -
HPU 18级个人训练( 2019CCPC-江西省赛(重现赛))
只写我能补的几道题把,能力有限,实在是太菜了;;;;呜呜呜呜哭哭题目链接:2019CCPC-江西省赛(重现赛)D:HDU 6570 WaveF: String HDU - 6572G: Traffic HDU - 6573H: Rng HDU - 6574I : Budget HDU - 6575J: Worker HDU - 6576...原创 2019-11-14 23:57:48 · 239 阅读 · 0 评论 -
Worker HDU - 6576
Avin meets a rich customer today. He will earn 1 million dollars if he can solve a hard problem. There are n warehouses and m workers. Any worker in the i-th warehouse can handle ai orders per day. Th...原创 2019-11-14 23:46:57 · 205 阅读 · 0 评论 -
Budget HDU - 6575
Avin’s company has many ongoing projects with different budgets. His company records the budgets using numbers rounded to 3 digits after the decimal place. However, the company is updating the system ...原创 2019-11-14 23:39:23 · 323 阅读 · 0 评论 -
Rng HDU - 6574
Avin is studying how to synthesize data. Given an integer n, he constructs an interval using the following method: he first generates a integer r between 1 and n (both inclusive) uniform-randomly, and...原创 2019-11-14 23:35:01 · 215 阅读 · 0 评论 -
Wave HDU - 6570
Avin is studying series. A series is called “wave” if the following conditions are satisfied:It contains at least two elements;All elements at odd positions are the same;All elements at even posit...原创 2019-11-14 23:05:10 · 202 阅读 · 0 评论 -
K-Dominant Character CodeForces - 888C
You are given a string s consisting of lowercase Latin letters. Character c is called k-dominant iff each substring of s with length at least k contains this character c.You have to find minimum k su...原创 2019-09-22 22:34:35 · 219 阅读 · 0 评论