Online Judge | Problem Set | Authors | Online Contests | User | ||||||
---|---|---|---|---|---|---|---|---|---|---|
Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest |
忘特殊处理周末了,此帖作费In Reply To:按wywcgs的方法写的.还WA,好心人帮我看看吧 Posted by:daringQQ at 2006-08-01 21:31:52 > bool ok() > { > int i, j, day, min, max; > sort(m, m+n); > min = m[0].begin; > max = 0; > for (i = 0; i < n; i++) > if (m[i].end > max) max = m[i].end; > size = 0; > for (day = min, i = 0; day <= max; day++) > { > for (; i < n && m[i].begin == day; i++) > push(m[i].end); > for (j = 0; j < p && size > 0; j++) > { > if (heap[1] < day) return false; > pop(); > } > } > return size == 0; > } Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator