摘要:
太水了,背包DP。(转载请注明出处:http://www.cnblogs.com/Kalenda/) 1 const maxn=100000000; 2 var n,f,i,j,ans,t,tt:longint; 3 q:array[0..3000] of longint; 4 a:array[0.... 阅读全文
摘要:
很明显是一道RMQ问题,倍增法,维护一下区域的最大/小值就行了。 1 var n,i,j,q,f,t,times:longint; 2 hmin,hmax:array[0..100,0..50000] of longint; 3 function min(a,b:longint):longint; ... 阅读全文