摘要: Colored SticksTime Limit:5000MSMemory Limit:128000KTotal Submissions:28036Accepted:7428DescriptionYou are given a bunch of wooden sticks. Each endpoint of each stick is colored with some color. Is it possible to align the sticks in a straight line such that the colors of the endpoints that touch are 阅读全文
posted @ 2013-09-11 17:22 码代码的猿猿 阅读(236) 评论(0) 推荐(0) 编辑
摘要: Check the difficulty of problemsTime Limit:2000MSMemory Limit:65536KTotal Submissions:4011Accepted:1779DescriptionOrganizing a programming contest is not an easy job. To avoid making the problems too difficult, the organizer usually expect the contest result satisfy the following two terms:1. All of 阅读全文
posted @ 2013-09-11 10:30 码代码的猿猿 阅读(186) 评论(0) 推荐(0) 编辑
摘要: Pro. 1 给定k个有序表,取其中前n小的数字。组成一个新表,求该表? 算法: 由于 a1[1] #include#include#include#includeusingnamespacestd;intt,n,m,A[2222],Q[2222];structnode{intarr,id;booloperatorb.arr;}};intmatrix[2222][2222];voidfuuuuuc(){intcur=0;intnowfrom[2222];memset(nowfrom,0,sizeof(nowfrom));priority_queueq;for(inti=0;i:"&l 阅读全文
posted @ 2013-09-11 10:29 码代码的猿猿 阅读(153) 评论(0) 推荐(0) 编辑
摘要: Hardwood SpeciesTime Limit:10000MSMemory Limit:65536KTotal Submissions:16056Accepted:6418DescriptionHardwoods are the botanical group of trees that have broad leaves, produce a fruit or nut, and generally go dormant in the winter.America's temperate climates produce forests w... 阅读全文
posted @ 2013-09-11 10:28 码代码的猿猿 阅读(186) 评论(0) 推荐(0) 编辑
摘要: 第k大数维护,我推荐Treap。。谁用谁知道。。。。 Black BoxTime Limit:1000MSMemory Limit:10000KTotal Submissions:5999Accepted:2417DescriptionOur Black Box represents a primitive database. It can save an integer array and has a special i variable. At the initial moment Black Box is empty and i e... 阅读全文
posted @ 2013-09-11 10:27 码代码的猿猿 阅读(260) 评论(0) 推荐(0) 编辑