http://acm.zju.edu.cn/onlinejudge/searchProblem.do?contestId=1&titlefrom=0&authorfrom=0&sourcefrom=0&query=provinc 会对每一道做过的题做一个简单的分析,如果有出错或者不理解可以于我交流2104 Let the Balloon Rise Zhejiang Provincial Programming Contest 2004 数据很小,遍历一下,找到就++,没有的话就算新的
2105 Number Sequence Zhejiang Provincial Programming Contest 2004 找循环节,开hash[7][7]来找,hash前一个和后一个
2106 Tick and Tick Zhejiang Provincial Programming Contest 2004 当年应该是金牌题吧,时间是连续的,不能一秒一秒分开来计算
我是根据题目联立三个不等式方程,然后解出交集
2107 Quoit Design Zhejiang Provincial Programming Contest 2004 最近点对,二分的思想,据说数据结构书上就有。。。
2108 Elevator Zhejiang Provincial Programming Contest 2004 简单模拟题,求出上升和下降的层数
2109 FatMouse' Trade Zhejiang Provincial Programming Contest 2004 按性价比排序后贪心
2110 Tempter of the Bone Zhejiang Provincial Programming Contest 2004 深搜,加个奇偶性剪枝
2111 Starship Troopers Zhejiang Provincial Programming Contest 2004 神题,不会。。。据说是树形DP
5.13补充:当时看着是的做也不敢做的神题,前几天学习了熟悉树形DP后练习了几道题目再来做这题发现一点都不难
树形+背包+临街表建图可以轻松A掉此题
2474 World Goes Round Zhejiang Provincial Programming Contest 2005 这题数据量好大,n=10,记得在北师大比赛的时候做过一个3*3的八数码也是这样转动规则,当时是预处理直接秒掉的
这道状态太大,变身为神题了,不会
不是求最优解,所以我猜测应该是构造出一种方法让它转到目标状态
//我想是不是可以降维,拼好最左边和最上边就可以降一维了。。
至于怎么构造没有想出来。。。。
尚未做出 2475 Benny's Compiler Zhejiang Provincial Programming Contest 2005 判断有向图成环,用拓扑排序,错了N遍,我都怀疑是不是我的拓扑写错了。。
后来试了一下原来有恶心数据,Ai == Bi的时候这样的数据不要计算,不然就自己成环了。
2476 Total Amount Zhejiang Provincial Programming Contest 2005 模拟一下,都不用大数加法,直接用long long就够了,输出的时候分段输出
2477 Magic Cube Zhejiang Provincial Programming Contest 2005 题目说不超过5步,可以用迭代加深搜索,其实题目意思很直白,就是这道题目很难模拟。
把魔方的转模拟出来这题目也就做出来了。。
我把每一种转都计算出来写进表里,然后按照这个表转就OK了
2478 Encoding Zhejiang Provincial Programming Contest 2005遍历一遍比较当前字符和前一个字符就好
2479 Cover the Rectangular Ground Zhejiang Provincial Programming Contest 2005 从最左下角的点开始dfs,每次先判断能不能放上,然后找出当前最左下角的点再dfs
这样很暴力。。最坏的情况算不来,大概有20!次。。。我晕,一直TLE
后来我试了下数据,倒是是我的程序真的效率很低,还是只有一些数据都跑不出
经过多次WA和TLE的测试发现只要有解得数据我都能跑出来,无解的就直接搜到死了
于是我定义如果深搜次数超过100000就直接跳出,无解
结果就AC了。。。。效率还很高,由于内存原因拍在第二
唉,比赛的时候如果能这样AC的话就太RP了。。。
。。求正解。。
2480 Simplest Task in Windows Zhejiang Provincial Programming Contest 2005 数据量小,直接水掉,从后往前比较for(i = n- 1; i >= 0 ; i --),找到符合的跳出,最后输出下标
2481 Unique Ascending Array Zhejiang Provincial Programming Contest 2005 排序后输出
2736 Daffodil number Zhejiang Provincial Programming Contest 2006, Preliminary 水题
2737 Occurrence Zhejiang Provincial Programming Contest 2006, Preliminary 题目看清楚后暴力比较久可以
2738 The Kth BST Zhejiang Provincial Programming Contest 2006, Preliminary 啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊
推了一个下午啊。。。。。竟然WA。。。。。极度郁闷。。。。。
吃饭回来终于AC了。。。。再郁闷,原来是我对BST的理解有误,后来纪哥纠正了,就这样陷入了误区N久。。。。不值得啊。。。
2739 Color Quantization Zhejiang Provincial Programming Contest 2006, Preliminary 尚未做出2740 Message System Zhejiang Provincial Programming Contest 2006, Preliminary 用并查集做,判断是树还是森林还是图
2741 Offside Zhejiang Provincial Programming Contest 2006, Preliminary 很脑残的模拟题,我却脑残的错了N编。。。。。
2742 Toy Bricks Zhejiang Provincial Programming Contest 2006 尚未做出2743 Bubble Shooter Zhejiang Provincial Programming Contest 2006 先foldfill一下,把连起来的hash掉,然后从最上边每个点开始foldfill,看还有几个留下
2744 Palindromes Zhejiang Provincial Programming Contest 2006 从回文串的性质上找规律,每个点向左右延长数回文串个数
2745 01-K Code Zhejiang Provincial Programming Contest 2006 恶心的推推题,我的方法一定不是最简单的,我开了四维数组还转移状态
分别存的是:
dp[0和1相差几位,最高到达过,最低到达过,n]
这是很烂的方法,我想了很久才想出来,实在想不出更好的了
2746 Rank the Teams Zhejiang Provincial Programming Contest 2006 尚未做出 2747 Paint the Wall Zhejiang Provincial Programming Contest 2006 离散化+hash即可,有点暴力,正解是线段树
2748 Free Kick Zhejiang Provincial Programming Contest 2006 恶心的集合题,开始没有看到straight "WALL"构造出一种最优解,结果WA了
改了之后也一直WA,错了无数次后修改了下求夹角的方法,本来有atan,改成acos竟然AC了~~
思路:
先求出没有wall时候的夹角,然后减去守门员的范围,再根据剩下的角度来求出人数
2749 Polarium Zhejiang Provincial Programming Contest 2006 很好玩的一道题目,有人竟然能TLE 1000+次,而且连续了半年。。Orz一下
我跑的比较暴力,效率挺低的
思路:
首先枚举最后的答案:即每行的黑白情况
然后根据这个答案重新画出一张地图,每个能走的点(除了边界点)都只能走且只走一次,然后进行DFS
走到终点的时候判断下是否符合条件就AC了(开始的时候我先判断走完点再判断最后一点是否是终点,结果超时了)
2750 Idiomatic Phrases Game Zhejiang Provincial Programming Contest 2006 构造出最短路,每个串的最先4个和最后4个就是起点和终点,2^16个点,1000条路
我用邻接表+堆+bfs加速优化10ms
2849 Attack of Panda Virus Zhejiang Provincial Programming Contest 2007 按level最小和type最小的优先队列BFS一下
2850 Beautiful Meadow Zhejiang Provincial Programming Contest 2007 水题
2851 Code Formatter Zhejiang Provincial Programming Contest 2007 注意出现在后边的'\t'
2852 Deck of Cards Zhejiang Provincial Programming Contest 2007 DP,三维(每组牌的价值)加滚动数组能轻松AC
2853 Evolution Zhejiang Provincial Programming Contest 2007 矩阵题,有点卡时间
我的结构体模板200*200开不下,于是我升级了我的模板,换了一个全局矩阵
题目意思理解对套个矩阵模板就能过了
2854 Fish and Her Bowl Zhejiang Provincial Programming Contest 2007 尚未做出 2855 Google Map Zhejiang Provincial Programming Contest 2007 用所给公式+递归解决
2856 Happy Life Zhejiang Provincial Programming Contest 2007 无论什么状态都一定能构造出可行解的,所以只要while(1)把和小于0的那行变换符号,一直都满足条件
2857 Image Transformation Zhejiang Provincial Programming Contest 2007 水题
2965 Accurately Say "CocaCola"! The 5th Zhejiang Provincial Collegiate Programming Contest 数据小,暴力下就好,数据大的话可以数学归纳或者暴力看下规律
2966 Build The Electric System The 5th Zhejiang Provincial Collegiate Programming Contest 傻傻的最小树
2967 Colorful Rainbows The 5th Zhejiang Provincial Collegiate Programming Contest 正解说是半平面交
我是用一个栈,先按b从大到小排序,如果然后遍历一下,能出现的就放进栈里,能把前面的覆盖掉就把栈里的线段拿出
正半轴,负半轴做两次,再处理一下小细节就好了
2968 Difference Game The 5th Zhejiang Provincial Collegiate Programming Contest 我先把A数组和B数组的数全部保存C数组里,然后排序
再遍历C数组,i = 0 to n*2
i左边的为B,右边的为A,然后算出到达这个状态A到B的个数AB和BA
根据这两个数算出最小的花费,X = Min(AB,BA),Y = |AB - BA|,Ci = X * Y* (Y - 1);
如果比c小的话旧更新一下res
如果最后一次都没更新到得话就是最后的答案一定是负的
所以A和B排序下根据c贪心得到答案
2969 Easy Task The 5th Zhejiang Provincial Collegiate Programming Contest easy task
2970 Faster, Higher, Stronger The 5th Zhejiang Provincial Collegiate Programming Contest sort
2971 Give Me the Number The 5th Zhejiang Provincial Collegiate Programming Contest 模拟下
2972 Hurdles of 110m The 5th Zhejiang Provincial Collegiate Programming Contest 按剩下的能量DP
2973 Intelligent Pouring Robot The 5th Zhejiang Provincial Collegiate Programming Contest
超烦的模拟题
尚未做出
|
2974 |
Just Pour the Water |
The 5th Zhejiang Provincial Collegiate Programming Contest |
暴力加循环节能过,正解是矩阵,
K == 0的时候常常会被忽略,处理一下就好
2975 |
Kinds of Fuwas |
The 5th Zhejiang Provincial Collegiate Programming Contest |
n^3的算法,枚举任意两行C(2,n),遍历列n,找到相同的个数x,res+=(x-1)*x/2;
2976 |
Light Bulbs |
The 5th Zhejiang Provincial Collegiate Programming Contest 枚举平面上每一个点取最大值
|
3202 |
Second-price Auction |
The 6th Zhejiang Provincial Collegiate Programming Contest |
3203 |
Light Bulb |
The 6th Zhejiang Provincial Collegiate Programming Contest |
3204 |
Connect them |
The 6th Zhejiang Provincial Collegiate Programming Contest |
3205 |
Derivative |
The 6th Zhejiang Provincial Collegiate Programming Contest |
3206 |
Disaster Area Reconstruction |
The 6th Zhejiang Provincial Collegiate Programming Contest |
3207 |
80ers' Memory |
The 6th Zhejiang Provincial Collegiate Programming Contest |
3208 |
Reforestation |
The 6th Zhejiang Provincial Collegiate Programming Contest |
3209 |
Treasure Map |
The 6th Zhejiang Provincial Collegiate Programming Contest |
3210 |
A Stack or A Queue? |
The 6th Zhejiang Provincial Collegiate Programming Contest |
3211 |
Dream City |
The 6th Zhejiang Provincial Collegiate Programming Contest |
3212 |
K-Nice |
The 6th Zhejiang Provincial Collegiate Programming Contest |
posted on 2009-05-02 21:10
shǎ崽 阅读(3373)
评论(0) 编辑 收藏 引用