第15届浙江省赛 E LIS】的更多相关文章

LIS Time Limit: 1 Second      Memory Limit: 65536 KB      Special Judge DreamGrid is learning the LIS (Longest Increasing Subsequence) problem and he needs to find the longest increasing subsequence of a given sequence  of length . Recall that A subs…
Sequence Swapping Time Limit: 1 Second      Memory Limit: 65536 KB BaoBao has just found a strange sequence {<, >, <, >, , <, >} of length  in his pocket. As you can see, each element <, > in the sequence is an ordered pair, where…
每年省赛必有的一道模拟题,描述都是非常的长,题目都是蛮好写的... sigh... 比赛的时候没有写出这道题目 :( 题意:首先输入4个数,n,q,p,c代表有n个队伍,q个服务器,每支队伍的初始分数p, 还有c次操作对于每次操作,首先输入一个k,代表k次攻击每次攻击有三个数,a,b,c, 代表a通过c服务器成功的攻击了b对于每次成功的攻击,b会失去n-1分, 这n-1分会平分给通过同一服务器攻击b的几支队伍然后是q行,每行n个数, 分别代表1~n是否成功维护了,1为成功,0为不成功不成功的队伍…
一直想记录一下自己的比赛,却感觉空间说说有点不适,思考了一番还是打算放到自己的博客园 这次比赛总体来说还是不错,签到还是稳的一批,基本前四小时都在rk1 开局切了几道签到题,然后开了一道思维gcd,正好我们比赛写过,达神就直接开码,刚要提交然后题目就消失了,听说是没有数据了.结果过了好久才交上去 其他的题目具体也没太多印象了,郑教和达神一起a了一道字典树,然后郑教开始还把最后一题秒了 对了,中间我写了个矩阵快速幂,结果一直没调出样例,出了小bug,差不多浪费了20min 最后一小时前我们还是8题…
也是一道比赛时候没有写出来的题目,队友想到了解法不过最后匆匆忙忙没有 A 掉 What a pity... 题意:定义Beauty数是一个序列里所有不相同的数的和,求一个序列所有字序列的Beauty和 1 <= N <= 100000 解题思路:由于数据比较大,常规方法求字序列和肯定是行不通的,我们不妨这样想:因为要区别于不同的数 ,可以看成序列里的数是一个一个加进去的,每次加入一个数,统计前面序列里第一次出现新加入的这个数的位置,表达的不好, 举个例子: 1 2 3 定义dp(当前元素前面(…
题目链接:http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemCode=3781 Time Limit: 2 Seconds      Memory Limit: 65536 KB Leo has a grid with N rows and M columns. All cells are painted with either black or white initially. Two cells A and B are calle…
题目链接:http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemCode=3780 Time Limit: 2 Seconds      Memory Limit: 65536 KB Leo has a grid with N × N cells. He wants to paint each cell with a specific color (either black or white). Leo has a magical bru…
题目链接:http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemCode=3777 Time Limit: 2 Seconds      Memory Limit: 65536 KB The 11th Zhejiang Provincial Collegiate Programming Contest is coming! As a problem setter, Edward is going to arrange the order…
Now Loading!!! Time Limit: 1 Second      Memory Limit: 131072 KB DreamGrid has  integers . DreamGrid also has  queries, and each time he would like to know the value of   for a given number , where , . Input There are multiple test cases. The first l…
D - The Lucky Week Edward, the headmaster of the Marjar University, is very busy every day and always forgets the date. There was one day Edward suddenly found that if Monday was the 1st, 11th or 21st day of that month, he could remember the date cle…