失算啊,水题啊,比赛没AView Code #include<cstdio>#include<cstring>#include<algorithm>using namespace std;int a[100005], b[100005];int main(){ int i, j, n; scanf("%d", &n); for(i = 0; i < n ;i++) scanf("%d", &a[i]), b[i] = a[i]; if(n <= 2) { puts("-1"    Read More
posted @ 2012-12-07 16:17
To be an ACMan
Views(321)
Comments(0)
Diggs(0)
        
            
        
        
        
比赛时我用单调队列A的View Code #include<cstdio>#include<cstring>#include<queue>using namespace std;#define LL __int64int a, n, d;LL ans;queue <int> q;int main() { int i, j; scanf("%d%d", &n, &d); for(i = 0; i < n; i++) { scanf("%d", &a); q.push(a); wh    Read More
posted @ 2012-12-07 15:41
To be an ACMan
Views(358)
Comments(1)
Diggs(0)
        
 
                    
                
 
 浙公网安备 33010602011771号
浙公网安备 33010602011771号