Online JudgeProblem SetAuthorsOnline ContestsUser
Web Board
Home Page
F.A.Qs
Statistical Charts
Problems
Submit Problem
Online Status
Prob.ID:
Register
Update your info
Authors ranklist
Current Contest
Past Contests
Scheduled Contests
Award Contest
User ID:
Password:
  Register

谁能帮我看看为什么总是re

Posted by baicaited at 2009-03-05 21:39:02 on Problem 1083
#include <iostream>
using namespace std;
int n,r,Max=0;
const int maxn=210;
int used[maxn];

void input()
{    
     int a,b;
     cin>>r;
     for (int i=0;i<r;i++)
     {
         cin>>a>>b;
         for (int j=a;j<=b;j++)
         {
             used[j]++;
         }

     }
 } 

int main()
{
    cin>>n;
    for (int i=0;i<n;i++)
    {
        for (int j=0;j<maxn;j++)
        used[j]=0;
        input();
        for (int k=0;k<maxn;k++)
        if (used[k]>Max) Max=used[k];
        cout<<Max*10<<endl;
    }
     return 0;    
}

Followed by:

Post your reply here:
User ID:
Password:
Title:

Content:

Home Page   Go Back  To top


All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator