☆ACM☆
ACM
Jaihk662
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
2018-5-12 河南省多校联盟
A : 摩斯密码概览问题列表状态排名Progress Bar时间限制:1 Sec 内存限制:128 MiB提交:144 答案正确:70提交题目描述题目描述:摩尔斯电码(又译为摩斯密码,Morse code)是一种时通时断的信号代码,通过不同的排列顺序来表达不同的英文字母、数字和标点符号。为了简单问题,去除所有的标点符号。现在给你一段摩斯密码,请你把它们进行解密。输入含有T(T<=2...原创 2018-05-12 15:07:02 · 405 阅读 · 0 评论 -
2018C/C++蓝桥杯解析
2018C/C++蓝桥杯题目:https://pan.baidu.com/s/1uDugi2StKJtvapbJuzoG8A 密码:6u36题解:http://tieba.baidu.com/p/5627986537原创 2018-04-01 16:35:03 · 9032 阅读 · 0 评论 -
2017上海ACM ECL-final 总结
上海ECL-final:(http://board.acmicpc.cn/)两个舍友就是我的队友,宿舍队完美,本来想玩1天回来不过有考试所以只好比完赛直接回莫名其妙学校不再支持ACM了,可能是嫌我们打的成绩太垃圾,突然只能自费,算了反正我也退役了中间我们3个人模拟了两次往年的我没补过的final+秦皇岛+广西,除了秦皇岛金尾,都是银,感觉这场比赛稳一点应该银没问题,有个舍友还没拿过银正原创 2017-12-18 20:45:59 · 1874 阅读 · 0 评论 -
2017哈尔滨ACM CCPC-final 总结
本来不想写总结了,不过教练要求每场比赛都要写总结,那我就偷个懒把两个总结写一起吧基本上是算退役赛了两场比赛按照惯例都没打好,CCPCfinal铜尾,ICPCfinal铜首这两年打下来,无数个银和铜,感觉越到后面越是无力与疲惫现在终于可以休息了普通赛区打铁是不可能的,再菜也不可能打铁的,金又拿不到,就是不停地刷铜银,才能维持的了ACMer这样子Final冲个银就很原创 2017-12-18 17:04:51 · 1824 阅读 · 0 评论 -
2017CCPC哈尔滨赛区总结
去年CCPC两个银,结果今年成功打铜其实战术和决策上都有严重问题,这点之前也打过广西邀请赛,只不过那时候前期怎么说还是比较顺利的两场队友一样,就简称Y和Q吧其实在比赛前一天晚上,就跟队友说:没有必要担心比赛的事情,稳银冲金,打崩的话最差就是铜嘛打完果然没错,打崩了……热身赛开始,A题签到A了之后,我们采取二一分的策略,Y和Q去看D题,我就去看E了20min后,Q上去写了原创 2017-10-23 10:58:21 · 2058 阅读 · 0 评论 -
福州大学第十四届程序设计竞赛-重现赛(Record)
Problem A Salty FishAccept: 108 Submit: 400Time Limit: 1000 mSec Memory Limit : 32768 KB Problem Description海边躺着一排咸鱼,一些有梦想的咸鱼成功翻身(然而没有什么卵用),一些则是继续当咸鱼。一个善良的渔夫想要帮这些咸鱼翻身,但是渔夫比较懒,所以只原创 2017-07-14 16:55:25 · 1736 阅读 · 0 评论 -
2017杭电ACM集训队单人排位赛 - 1(ALL题解)
A. 看日出水题。。就是问你挪多少次可以挪回原点,答案就是Lcm(n, m)/n#includeint Gcd(int a, int b){ if(a%b==0) return b; return Gcd(b, a%b);}int main(void){ int T, n, m, t; scanf("%d", &T); while(T--) { scanf("原创 2017-07-02 17:47:45 · 3674 阅读 · 0 评论 -
2016ICPC沈阳站总结
2016ccpc沈阳站总结/acmccpc/icpc总结—————————————————————————————————————————————————原创 2016-10-28 20:15:40 · 1748 阅读 · 0 评论 -
2016CCPC合肥赛区总结
时间过得真快,不知不觉一个赛区就打完了,距离刚接触ACM也快一年了,这一年的收获真的非常大,万分感谢我的老师和一起努力的朋友们。————————————————————————————————————————————————先发题解:A.传递/Transitivity:比赛时n³暴力+vector优化过的,但其实BFS一遍就好,只要出现深度>=2的点就GG C.朋...原创 2016-10-18 14:59:44 · 3615 阅读 · 1 评论 -
Codeforces Round #521 (Div. 3): F. Pictures with Kittens(DP+单调队列)
题意:你有n幅画,第i幅画的好看程度为ai,再给你两个数字k,x,表示你要从中选出刚好x幅画,并且相邻两幅画的距离不能≥k,好看程度之和最大能多少,选不出来输出-1,F1数据范围<200,F2数据范围<5000注意相邻两幅画的距离不能≥k指的是中间没有选的画个数不能≥k,而不是绝对值之差≥k 思路:dp[x][y]表示只考虑前y幅画,第y幅必选,且总共选了...原创 2018-11-17 15:26:06 · 414 阅读 · 0 评论 -
Codeforces Round #179 (Div. 2): D. Greg and Graph(Floyd)
题意:给你n个点有向图的邻接矩阵,之后再给你n个数,它一定是1到n的全排列,对于第i个点,求出在删掉这个点以及与这个点相邻的所有边之前,当前剩下所有点两两最短路之和,注意删除操作是持久的,也就是最后整个图一定为空 思路:水题,倒过来按照删点的顺序floyd就行了 #include<stdio.h>#include<string.h>#...原创 2018-11-16 17:11:35 · 254 阅读 · 0 评论 -
2018北京ICPC B. Heshen's Account Book(模拟)
B : Heshen's Account Book时间限制:1000ms 单点时限:1000ms 内存限制:512MB描述Heshen was an official of the Qing dynasty. He made a fortune which could be comparable to a whole country's wealth by corruptio...原创 2018-11-11 22:01:48 · 1099 阅读 · 0 评论 -
Codeforces Round #223 (Div. 2): E. Sereja and Brackets(线段树)
题意:给你一个括号序列和m次询问,每次询问区间[L, R]内匹配的括号个数 思路:这道题线段树只用来维护区间最小值,所以理论上RMQ也可以,主要是要稍微推一下设左括号为1,右括号为-1,s[]为前缀和那么区间[L, R]内不匹配的右括号个数就是min(s[L-1…R])-s[L-1]区间[L, R]内不匹配的左括号个数就是max(S[R]-s[L-1]-(mi...原创 2018-10-30 19:55:36 · 297 阅读 · 0 评论 -
Codeforces Round #223 (Div. 2): C. Sereja and Prefixes(二分+递归)
题意:你有一个序列,一开始为空,之后进行m次操作,操作有两种:1 x:在当前序列后面添加一个数x 2 x, y:将序列的前x个数复制y遍接序列后面(x<10000)之后n次询问,每次询问位置p上面的数字是多少,保证p不超过序列长度 思路:对于每次询问,直接暴力递归当前位置上的数字是哪次操作①添加的就行了,因为复制操作每次只会复制前10000个数字,所以递...原创 2018-10-30 15:17:25 · 261 阅读 · 0 评论 -
Codeforces Round #245 (Div. 2): C. Xor-tree(BFS)
题意:给你一棵树,每个节点都有一个颜色,不是黑就是白,你每次可以选择一个节点,将这个节点的颜色翻转,同时这个点所有孙子的颜色也会全部被翻转,孙子的孙子颜色也会全部被翻转……问至少操作多少次使得所有节点的颜色满足题目要求,输出每次操作的节点 思路:从根开始按照节点的深度遍历,如果这个点的颜色不满足要求,直接翻转就可以了,BFS一遍即可 #include<...原创 2018-10-22 23:47:34 · 267 阅读 · 0 评论 -
hihocoder 1449 : 后缀自动机三·重复旋律6(后缀自动机)
#1449 : 后缀自动机三·重复旋律6时间限制:15000ms单点时限:3000ms内存限制:512MB描述小Hi平时的一大兴趣爱好就是演奏钢琴。我们知道一个音乐旋律被表示为一段数构成的数列。现在小Hi想知道一部作品中所有长度为K的旋律中出现次数最多的旋律的出现次数。但是K不是固定的,小Hi想知道对于所有的K的答案。解题方法提示输入共一行,包含一个由小写...原创 2018-09-24 17:18:50 · 479 阅读 · 0 评论 -
2017乌鲁木齐ICPC: I. A Possible Tree(带权并查集)
I. A Possible TreeAlice knows that Bob has a secret tree (in terms of graph theory) with n nodes with n -1n−1 weighted edges with integer values in [0, 260 - 1][0,260−1]. She knows its structure ...原创 2018-09-12 19:59:09 · 385 阅读 · 0 评论 -
2017乌鲁木齐ICPC: A. Coins(概率DP)
A. CoinsAlice and Bob are playing a simple game. They line up a row of nn identical coins, all with the heads facing down onto the table and the tails upward.For exactly mm times they select an...原创 2018-09-12 18:50:28 · 568 阅读 · 0 评论 -
2017乌鲁木齐ICPC: K. Sum of the Line(容斥)
K. Sum of the LineConsider a triangle of integers, denoted by TT. The value at (r,c)(r,c) is denoted by T_{r,c}Tr,c, where 1 \le r1≤r and 1 \le c \le r1≤c≤r. If the greatest common divisor of rr...原创 2018-09-12 15:04:37 · 620 阅读 · 0 评论 -
2018ACM-ICPC徐州赛区网络赛: B. BE, GE or NE(博弈+记忆化搜索)
B. BE, GE or NEIn a world where ordinary people cannot reach, a boy named "Koutarou" and a girl named "Sena" are playing a video game. The game system of this video game is quite unique: in the p...原创 2018-09-09 19:34:06 · 553 阅读 · 0 评论 -
2018ACM-ICPC南京赛区网络赛: J. Sum(积性函数前缀和)
J. SumA square-free integer is an integer which is indivisible by any square number except 11. For example, 6 = 2 \cdot 36=2⋅3 is square-free, but 12 = 2^2 \cdot 312=22⋅3 is not, because 2^222 is...原创 2018-09-02 17:31:30 · 665 阅读 · 0 评论 -
2018湖南湘潭CCPC邀请赛 && HDU6282: G. String Transformation(思维题)
String TransformationTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 553 Accepted Submission(s): 175Problem DescriptionBobo has a s...原创 2018-08-26 21:03:19 · 606 阅读 · 0 评论 -
2018湖南湘潭CCPC邀请赛 && HDU6278: C. Just h-index(主席树)
Just h-indexTime Limit: 6000/3000 MS (Java/Others) Memory Limit: 132768/132768 K (Java/Others)Total Submission(s): 548 Accepted Submission(s): 256Problem DescriptionThe h-index of an a...原创 2018-08-26 20:38:14 · 475 阅读 · 0 评论 -
2018CCPC网络赛 && HDU 6444: G. Neko's loop(线段树)
Neko's loopTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 0 Accepted Submission(s): 0Problem DescriptionNeko has a loop of size n....原创 2018-08-25 20:05:58 · 753 阅读 · 0 评论 -
2018 Multi-University Training Contest 6: L. Pinball(物理)
PinballTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 262144/262144 K (Java/Others)Total Submission(s): 307 Accepted Submission(s): 126Problem DescriptionThere is a slope on the ...原创 2018-08-08 22:03:24 · 258 阅读 · 0 评论 -
2018 Multi-University Training Contest 6: A. oval-and-rectangle(数论)
oval-and-rectangleTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 0 Accepted Submission(s): 0Problem DescriptionPatrick Star find a...原创 2018-08-08 21:06:23 · 332 阅读 · 0 评论 -
Codeforces Beta Round #89 (Div. 2): D. Caesar's Legions(DP)
D. Caesar's Legionstime limit per test 2 secondsmemory limit per test 256 megabytesinput standard inputoutput standard outputGaius Julius Caesar, a famous general, loved to line up his so...原创 2018-08-07 21:02:48 · 492 阅读 · 0 评论 -
牛客网暑期ACM多校训练营(第五场): A. gpa(01分数规划)
题目描述Kanade selected n courses in the university. The academic credit of the i-th course is s[i] and the score of the i-th course is c[i].At the university where she attended, the final score of he...原创 2018-08-02 18:51:51 · 346 阅读 · 0 评论 -
Codeforces Round #197 (Div. 2): D. Xenia and Bit Operations(线段树)
题意:定义一个长度2^n的序列{a1, a2…an},序列相邻两个元素或运算之后再进行异或运算再进行或运算(两种运算交替进行)直到只剩下一个数字,这个数字即为序列的值,输入第一行两个数n,m表示序列的长度为2^n,m次修改,每次修改a, b表示将位置a上的数修改为b,对于每次修改输出修改后序列的值 看明白了之后你会发现这就是线段树单点更新#include<stdio....原创 2018-07-24 17:54:23 · 333 阅读 · 0 评论 -
Codeforces Round #292 (Div. 2):C. Drazil and Factorial
题意:令F(i)为i的每一位数字阶乘积,例如F(931) = 9!*3!*1!给你一个a,找到最大的x满足F(x) = F(a),并且要求x中不能出现数字1和09! = 7!*3!*3!*2!8! = 7!*2!*2!*2!6! = 5!*3!4! = 3!*2!*2!#include<stdio.h>#include<algorithm>using namespace...原创 2018-07-07 15:52:45 · 305 阅读 · 0 评论 -
Codeforces Round #493 (Div. 2):C. Convert to Ones
题意:给你一个01串,你有两种操作:①翻转某个子串,代价为x;②将某个子串的0和1全部取反,代价为y,求将整个串全部修改成1的最小代价思路:如果全为1,直接输出0,否则假设有p个连"0"带,答案就是min((p-1)*x+y, p*y),为什么这样就可以了,因为无论是翻转还是取反,都一定刚好能使连"0"带数量-1,所以只要选择代价小的那个操作就可以了,不过最后一定要取反一次#include<...原创 2018-07-02 14:24:13 · 499 阅读 · 0 评论 -
Codeforces Round #277.5 (Div. 2):C. Given Length and Sum of Digits...
C. Given Length and Sum of Digits...time limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputYou have a positive integer m and a non-negative integer s. You...原创 2018-07-01 00:37:46 · 371 阅读 · 0 评论 -
Codeforces Round #260 (Div. 1):A. Boredom(DP)
A. Boredomtime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputAlex doesn't like boredom. That's why whenever he gets bored, he comes up with games. One...原创 2018-06-30 18:21:29 · 314 阅读 · 0 评论 -
牛客练习赛21:A. 黑妹的游戏I
链接:https://www.nowcoder.com/acm/contest/130/A来源:牛客网题目描述黑妹最近在玩一个有趣的游戏,游戏规则是这样的: 刚开始黑板上有三个不同的初始数字,然后黑妹每一次可以选择黑板上的两个不同的数字,然后计算出这两个不同数字之差的绝对值,如果黑板上没有这个数字,那么就把这个新数字写在黑板上。 黑妹已经玩腻了这个游戏,现在黑妹想知道她最多能添加多少个数字。输入描...原创 2018-06-29 22:03:37 · 963 阅读 · 4 评论 -
Codeforces Round #491 (Div. 2):C. Candies(二分)
C. Candiestime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputAfter passing a test, Vasya got himself a box of nn candies. He decided to eat an equal a...原创 2018-06-24 15:40:39 · 868 阅读 · 0 评论 -
Codeforces Round #491 (Div. 2):D. Bishwock
D. Bishwocktime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputBishwock is a chess figure that consists of three squares resembling an "L-bar". This fi...原创 2018-06-24 15:34:07 · 450 阅读 · 0 评论 -
Codeforces Round #491 (Div. 2):E. Bus Number(DFS+组合数)
E. Bus Numbertime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputThis night wasn't easy on Vasya. His favorite team lost, and he didn't find himself vi...原创 2018-06-24 15:28:45 · 776 阅读 · 2 评论 -
bzoj 3477: [Usaco2014 Mar]Sabotage(二分)
3477: [Usaco2014 Mar]SabotageTime Limit: 10 Sec Memory Limit: 128 MBSubmit: 264 Solved: 149[Submit][Status][Discuss]DescriptionFarmer John's arch-nemesis, Farmer Paul, has decided to sabotage Farmer...原创 2018-03-20 19:33:23 · 566 阅读 · 0 评论 -
bzoj 3359: [Usaco2004 Jan]矩形(DP)
3359: [Usaco2004 Jan]矩形Time Limit: 10 Sec Memory Limit: 128 MBSubmit: 74 Solved: 37[Submit][Status][Discuss]Description 给出N个矩形(1≤N≤100)和它的长和宽(不超过1000),写一个程序找出最大的K,使得有K个矩形满足层层包含的关系,即里层的矩形被所有外层的矩形包...原创 2018-03-18 21:16:49 · 389 阅读 · 0 评论 -
bzoj 3361: [Usaco2004 Jan]培根距离
3361: [Usaco2004 Jan]培根距离Time Limit: 10 Sec Memory Limit: 128 MBSubmit: 88 Solved: 70[Submit][Status][Discuss]Description 贝茜和其他奶牛联系是通过一连串的中间奶牛传递的,所以当第一头牛和贝茜联系,第二头牛和第一头牛联系,第三头牛和第二头牛联系,…一贝茜就能依次联系到其...原创 2018-03-18 19:52:16 · 315 阅读 · 0 评论
分享