12 2015 档案
摘要:还有3个多小时就是新的一年了,昨天第一次做cf,真是惭愧,出题太慢,思维太局限了,今天想了一节课的第二题求只有一个0的数的个数,结果老是出现bug,气炸了!更气人的是看了一下别人写的so easy。弱爆了!12月,定的计划是网络流和KMP还有动态规划,网络流只是熟悉了一下模板基本知道是怎么一回事,还...
阅读全文
摘要:http://acm.hust.edu.cn/vjudge/contest/view.action?cid=103223#problem/B这道题用经典的dijsktra算法,大概思路就是用dist[x]存储x到已经确定集合的最短路,n次循环到这个这个最小值,然后更新其他点到新集合的最短路即对应的d...
阅读全文
摘要:http://acm.hust.edu.cn/vjudge/problem/viewProblem.action?id=35913Secret agent Maria was sent to Algorithms City to carry out an especially dangerous m...
阅读全文
摘要:http://lx.lanqiao.org/problem.page?gpid=T303 最正统的最高效的做法应该是递推
阅读全文
摘要:http://lx.lanqiao.org/problem.page?gpid=T291 学霸的迷宫 时间限制:1.0s 内存限制:256.0MB 时间限制:1.0s 内存限制:256.0MB 问题描述 学霸抢走了大家的作业,班长为了帮同学们找回作业,决定去找学霸决斗。但学霸为了不要别人打扰,住在一
阅读全文
摘要:http://hihocoder.com/problemset/problem/1015 时隔多天再次温习了一下KMP 1 #include <iostream> 2 #include <cstdio> 3 #include <cstring> 4 #include <algorithm> 5 us
阅读全文
摘要:http://acm.fzu.edu.cn/problem.php?pid=2214Accept: 4Submit: 6Time Limit: 3000 mSecMemory Limit : 32768 KBProblem DescriptionGiven a set of n items, eac...
阅读全文
摘要:How many ways??Time Limit: 2000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 2185Accepted Submission(s): 820Prob...
阅读全文
摘要:http://poj.org/problem?id=3233Matrix Power SeriesTime Limit: 3000MSMemory Limit: 131072KTotal Submissions: 18658Accepted: 7895DescriptionGiven a n × n...
阅读全文
摘要:https://vijos.org/p/1067守望者-warden,长期在暗夜精灵的的首都艾萨琳内担任视察监狱的任务,监狱是成长条行的,守望者warden拥有一个技能名叫“闪烁”,这个技能可以把她传送到后面的监狱内查看,她比较懒,一般不查看完所有的监狱,只是从入口进入,然后再从出口出来就算完成任务...
阅读全文
摘要:https://vijos.org/p/1049P1049送给圣诞夜的礼品Accepted标签:组合数学送给圣诞夜的礼物[显示标签]返回代码界面 | 关闭PascalPascalCC++Python 2.xJava取消 | 清空代码描述当小精灵们把贺卡都书写好了之后。礼品准备部的小精灵们已经把所有的...
阅读全文
摘要:点的变换时间限制:2000ms | 内存限制:65535KB难度:5描述平面上有不超过10000个点,坐标都是已知的,现在可能对所有的点做以下几种操作:平移一定距离(M),相对X轴上下翻转(X),相对Y轴左右翻转(Y),坐标缩小或放大一定的倍数(S),所有点对坐标原点逆时针旋转一定角度(R)。操作的...
阅读全文
摘要:经典题目1 给定n个点,m个操作,构造O(m+n)的算法输出m个操作后各点的位置。操作有平移、缩放、翻转和旋转这里的操作是对所有点同时进行的。其中翻转是以坐标轴为对称轴进行翻转(两种情况),旋转则以原点为中心。如果对每个点分别进行模拟,那么m个操作总共耗时O(mn)。利用矩阵乘法可以在O(m)的时间...
阅读全文
摘要:FibonacciTime Limit: 1000MSMemory Limit: 65536KTotal Submissions: 11587Accepted: 8229DescriptionIn the Fibonacci integer sequence, F0 = 0, F1 = 1, and...
阅读全文
摘要:Average ScoreTime Limit:2 Seconds Memory Limit:65536 KBBob is a freshman in Marjar University. He is clever and diligent. However, he is not good at m...
阅读全文
摘要:A -ATime Limit:0MSMemory Limit:0KB64bit IO Format:%lld & %lluSubmitStatusPracticeSCU 4424Description Time Limit: 1000msDescription Given N distinct el...
阅读全文
摘要:Blocks Time Limit: 5000MS Memory Limit: 65536K Total Submissions: 4744 Accepted: 1930 Description Some of you may have played a game called 'Blocks'.
阅读全文
摘要:http://poj.org/problem?id=1037题意:输入木棒的个数n,其中每个木棒长度等于对应的编号,把木棒按照波浪形排序,然后输出第c个;分析:总数为i跟木棒中第k短的木棒 就等于总数为i-1中比这一根短的方案数 + 和比这一根长的方案数;最后用一个三维数组表示成c[i][k][up...
阅读全文
摘要:http://poj.org/problem?id=1995题意:求(A1^B1 + A2^B2 + .....Ah^Bh)%M直接快速幂,以前对快速幂了解不深刻,今天重新学了一遍so easy以a^b为例:如果b是偶数那么一定可以写成 (a^2 * a^2 ....)一共是b/2个,那么其实就可以...
阅读全文
摘要:滑雪Time Limit: 1000MSMemory Limit: 65536KTotal Submissions: 86411Accepted: 32318DescriptionMichael喜欢滑雪百这并不奇怪, 因为滑雪的确很刺激。可是为了获得速度,滑的区域必须向下倾斜,而且当你滑到坡底,你不...
阅读全文
摘要:http://acm.tju.edu.cn/toj/showp3540.html3540.ConsumerTime Limit:2.0 Seconds Memory Limit:65536KTotal Runs:136 Accepted Runs:67FJ is going to do some s...
阅读全文
摘要:A Mini LocomotiveTime Limit: 1000MSMemory Limit: 30000KTotal Submissions: 2485Accepted: 1388DescriptionA train has a locomotive that pulls the train w...
阅读全文
摘要:DivisibilityTime Limit: 1000MSMemory Limit: 10000KTotal Submissions: 11151Accepted: 3993DescriptionConsider an arbitrary sequence of integers. One can...
阅读全文
摘要:I love sneakers! Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 4765 Accepted Submission(s): 195
阅读全文
摘要:Charlie's ChangeTime Limit:1000MSMemory Limit:30000KTotal Submissions:3720Accepted:1125DescriptionCharlie is a driver of Advanced Cargo Movement, Ltd....
阅读全文
摘要:Space ElevatorTime Limit:1000MSMemory Limit:65536KTotal Submissions:9970Accepted:4738DescriptionThe cows are going to space! They plan to achieve orbi...
阅读全文
摘要:题目描述 金明今天很开心,家里购置的新房就要领钥匙了,新房里有一间金明自己专用的很宽敞的房间。更让他高兴的是,妈妈昨天对他说:“你的房间需要购买哪些物品,怎么布置,你说了算,只要不超过N元钱就行”。今天一早,金明就开始做预算了,他把想买的物品分为两类:主件与附件,附件是从属于某个主件的,下表就是一...
阅读全文
摘要:ACboy needs your helpTime Limit: 1000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 5589Accepted Submission(s): 3...
阅读全文
摘要:Coins Time Limit: 3000MS Memory Limit: 30000K Total Submissions: 32309 Accepted: 10986 Description People in Silverland use coins.They have coins of v
阅读全文
摘要:题目:http://acm.hdu.edu.cn/showproblem.php?pid=2191 1 #include 2 #include 3 #include 4 #include 5 6 using namespace std; 7 const int MAX = 100 + 10...
阅读全文
摘要:背包之前了解的太肤浅了,最近又重新看了一遍,记录一下理解的心得:参考:http://www.cppblog.com/tanky-woo/archive/2010/07/31/121803.htmlhttp://blog.csdn.net/wumuzi520/article/details/70212...
阅读全文
摘要:吃糖果Time Limit: 6000/3000 MS (Java/Others)Memory Limit: 65535/32768 K (Java/Others)Total Submission(s): 30589Accepted Submission(s): 8661Problem Descri...
阅读全文
摘要:Bookshelf 2Time Limit:1000MSMemory Limit:65536KTotal Submissions:8745Accepted:3974DescriptionFarmer John recently bought another bookshelf for the cow...
阅读全文
摘要:Bridging signalsTime Limit:1000MSMemory Limit:10000KTotal Submissions:12251Accepted:6687Description'Oh no, they've done it again', cries the chief des...
阅读全文
摘要:转载请注明来源,并包含相关链接。http://www.cnblogs.com/yjiyjige/p/3263858.html 网上有很多讲解KMP算法的博客,我就不浪费时间再写一份了。直接推荐一个当初我入门时看的博客吧:http://www.cnblogs.com/yjiyjige/p/326385
阅读全文
摘要:ctr +C 强制终止当前的命令ctr +L清屏ctr +U删除或剪切光标之前的命令ctr +Y 粘贴剪切的内容ctr +D 退出终端ctr +R在历史命令中搜索输出重定向(能输出的)命令 > 文件会覆盖 换成>>就不会覆盖命令 2> 文件 把错误信息写入;;连接多个命令命令1 && 命令2 表示命...
阅读全文
摘要:Going HomeTime Limit: 10000/5000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 3666Accepted Submission(s): 1884Problem...
阅读全文
摘要:SudokuTime Limit:2000MSMemory Limit:65536KTotal Submissions:16444Accepted:8035Special JudgeDescriptionSudoku is a very simple task. A square table wit...
阅读全文
摘要:详解:http://www.ahalei.com/thread-5028-1-2.html 1 //删除堆顶之后把最后一个移到堆顶在调整,慢 2 3 #include 4 #include 5 #include 6 #include 7 using namespace std; 8 9 ...
阅读全文
摘要:Sliding WindowTime Limit:12000MSMemory Limit:65536KTotal Submissions:49919Accepted:14391Case Time Limit:5000MSDescriptionAn array of sizen≤ 106is give...
阅读全文
摘要:Power NetworkTime Limit:2000MSMemory Limit:32768KTotal Submissions:25832Accepted:13481DescriptionA power network consists of nodes (power stations, co...
阅读全文
摘要:Drainage DitchesTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 13273Accepted Submission(s): 6288P...
阅读全文
摘要:Parity gameTime Limit:1000MSMemory Limit:65536KTotal Submissions:7288Accepted:2833DescriptionNow and then you play the following game with your friend...
阅读全文
摘要:The Accomodation of StudentsTime Limit: 5000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 4091Accepted Submissio...
阅读全文
摘要:通俗易懂http://m.blog.csdn.net/blog/qiankun1993/6782838牛http://nano9th.wordpress.com.cn/2009/02/17/%e7%bd%91%e7%bb%9c%e6%b5%81%e5%9f%ba%e7%a1%80%e7%af%87-...
阅读全文
摘要:Find them, Catch themTime Limit:1000MSMemory Limit:10000KTotal Submissions:37722Accepted:11632DescriptionThe police office in Tadu City decides to say...
阅读全文
摘要:奔小康赚大钱Time Limit: 1000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 5910Accepted Submission(s): 2618Problem Desc...
阅读全文