1293: [SCOI2009]生日礼物Time Limit:10 SecMemory Limit:162 MBSubmit:983Solved:526[Submit][Status]Description小西有一条很长的彩带,彩带上挂着各式各样的彩珠。已知彩珠有N个,分为K种。简单的说,可以将彩带... Read More
2326: [HNOI2011]数学作业Time Limit:10 SecMemory Limit:128 MBSubmit:955Solved:535[Submit][Status]Description题解:第一次知道矩阵乘法还能这样用,真是太神了!我想到了递推式:f[i]=(f[i-1]*10... Read More
1179: [Apio2009]AtmTime Limit:15 SecMemory Limit:162 MBSubmit:1427Solved:544[Submit][Status]DescriptionInput第一行包含两个整数N、M。N表示路口的个数,M表示道路条数。接下来M行,每行两个整数... Read More
做树链剖分最头疼的就是LCA的特殊性,有必要自己证明一下,否则用着不踏实,以求x到y的sum为例,z=lca(x,y)procedure solvesum; begin ans:=0; while ch' ' do read(ch); readln(x,y); while top... Read More
1146: [CTSC2008]网络管理NetworkTime Limit:50 SecMemory Limit:162 MBSubmit:1724Solved:524[Submit][Status]DescriptionM公司是一个非常庞大的跨国公司,在许多国家都设有它的下属分支机构或部门。为了让... Read More
1984: 月下“毛景树”Time Limit:20 SecMemory Limit:64 MBSubmit:713Solved:245[Submit][Status]Description毛毛虫经过及时的变形,最终逃过的一劫,离开了菜妈的菜园。 毛毛虫经过千山万水,历尽千辛万苦,最后来到了小小的绍... Read More
题目就不抄了,终于用c++A了这道题有几点需要注意的1.k 2 #include 3 #include 4 #include 5 #include 6 #include 7 #include 8 #include 9 #include 10 #include 11 #define i... Read More
1579: [Usaco2009 Feb]Revamping Trails 道路升级Time Limit:10 SecMemory Limit:64 MBSubmit:1251Solved:337[Submit][Status]Description每天,农夫John需要经过一些道路去检查牛棚N里面... Read More
1674: [Usaco2005]Part AcquisitionTime Limit:5 SecMemory Limit:64 MBSubmit:259Solved:114[Submit][Status]DescriptionThe cows have been sent on a mission... Read More
1631: [Usaco2007 Feb]Cow PartyTime Limit:5 SecMemory Limit:64 MBSubmit:459Solved:338[Submit][Status]Description农场有N(1≤N≤1000)个牛棚,每个牛棚都有1只奶牛要参加在X牛棚举行的奶... Read More