随笔分类 - 题目
最小树形图(朱刘算法)(poj 3164)
摘要:题目链接 ommand NetworkTime Limit: 1000MS Memory L...
阅读全文
CodeForces 1011B
摘要:CodeForces 1011B Time Limit:1000MS Memory Limit:262...
阅读全文
CodeForces 877C (Slava and tanks )
摘要:题目链接 CodeForces 877C Time Limit:2000MS Memory Limit:262144KB 64bit IO Format:%I...
阅读全文
CodeForces 1015D
摘要:题目链接 CodeForces 1015D There are n houses in a row. They are numbered from 1 to n in order from left to right. Initially you are...
阅读全文
数位dp讲解(转)
摘要:转载自:传送门数位DP其实是很灵活的,所以一定不要奢求一篇文章就会遍所有数位DP的题,这一篇只能是讲清楚一种情况,其他情况遇到再总结,在不断总结中慢慢体会这个思想,以后说不定就能达到一看到题目就能灵活运用的水平。(其实DP都是这样……)这一篇要说的数位DP是一道最简单...
阅读全文
跳跃游戏(2015蓝桥杯)
摘要:跳跃游戏 Time Limit: 1 Sec Memory Limit: 128 MB ...
阅读全文
POJ1330-LCA最近公共祖先(Tarjan算法模板代码)
摘要:转自:https://blog.csdn.net/Akatsuki__Itachi/article/details/81279173题目链接 poj1330关于LCA的Tarjan算法详解可看https://blog.csdn.net/Septembre_/ar...
阅读全文
CodeForces - 899B
摘要:Everybody in Russia uses Gregorian calendar. In this calendar there are 31 days in January, 28 or 29 days in February (depending on wh...
阅读全文
Color the ball (树状数组,改段求点)
摘要:N个气球排成一排,从左到右依次编号为1,2,3....N.每次给定2个整数a b(a #include#includeusing namespace std;int c[100100];int a[100100];int n;int lowbit(int x){ ...
阅读全文
A Simple Problem with Integers(树状数组,改段求段)
摘要:A Simple Problem with IntegersYou have N integers, A1, A2, ... , AN. You need to deal with two kinds of...
阅读全文
CodeForces - 1005C (map)
摘要:题目链接 CodeForces - 1005CA sequence a1,a2,…,an is called good if, for each element ai, there exists...
阅读全文
CodeForces - 1003B
摘要:You are given three integers a, b and x. Your task is to construct a binary string s of length n=a+b such that there are exactly a zer...
阅读全文
卡特兰数(Train Problem II )
摘要:Train Problem IIAs we all know the Train Problem I, the boss of the Ignatius Train Statio...
阅读全文
N的阶乘的长度 V2(斯特林近似)
摘要:输入N求N的阶乘的10进制表示的长度。例如6! = 720,长度为3。Input第1行:一个数T,表示后面用作输入测试的数的数量。(1 #include #include #include #include #include #define PI acos(-1)#d...
阅读全文
最大子序列和(Max Sum ,Super Jumping! Jumping! Jumping! )
摘要:连续的子序列: Max SumGiven a sequence a[1],a[2]...
阅读全文
最少拦截系统
摘要:某国为了防御敌国的导弹袭击,发展出一种导弹拦截系统.但是这种导弹拦截系统有一个缺陷:虽然它的第一发炮弹能够到达任意的高度,但是以后每一发炮弹都不能超过前一发的高度.某天,雷达捕捉到敌国的导弹来袭.由于该系统还在试用阶段,所以只有一套系统,因此有可能不能拦截所有的导弹....
阅读全文
随机生成一个0到100的数,让用户猜,允许猜5次,每次猜大了或猜小了,都要给出提示,最后给出正确答案
摘要:#include #include #include int main(){ int n,i,k; srand(time(NULL)); n=rand()%101; for(i=1;in) ...
阅读全文
浙公网安备 33010602011771号