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…
题目链接: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…
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…
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…
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…
2016 第七届蓝桥杯 c/c++ B组省赛真题及解题报告 勘误1:第6题第4个 if最后一个条件粗心写错了,答案应为1580. 条件应为abs(a[3]-a[7])!=1,宝宝心理苦啊.!感谢zzh童鞋的提醒. 勘误2:第7题在推断连通的时候条件写错了,后两个if条件中是应该是<=12 落了一个等于号.正确答案应为116. 1.煤球数目 有一堆煤球.堆成三角棱锥形.详细: 第一层放1个, 第二层3个(排列成三角形), 第三层6个(排列成三角形), 第四层10个(排列成三角形). -. 假设一共…
1. 2016 CCPC 东北地区重现赛 2.总结:弱渣,只做出01.03.05水题 08   HDU5929 Basic Data Structure    模拟,双端队列 1.题意:模拟一个栈的操作,并在每次询问时,计算栈项到栈底元素nand位运算的值. 2.总结:思路就是看距离栈底最近的0的后面1的个数的奇偶.试了好多种办法,最后还是双端队列简便.总之,贼恶心的题.. #include<iostream> #include<cstring> #include<cmath…
10403: D.山区修路 Time Limit: 2 Sec  Memory Limit: 128 MB Submit: 69  Solved: 23 [Submit][Status][Web Board] Description 某山区的孩子们上学必须经过一条凹凸不平的土路,每当下雨天,孩子们非常艰难.现在村里走出来的Dr. Kong决定募捐资金重新修建着条路.由于资金有限,为了降低成本,对修好后的路面高度只能做到单调上升或单调下降. 为了便于修路,我们将整个土路分成了N段,每段路面的高度分…