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 |
水题 晒代码#include <iostream> #include <stdio.h> #include <cstring> #include <map> #include <vector> #include <cmath> #include <set> #include <algorithm> using namespace std; int main() { int n,t,i,a,b,k,s,j,c; while(scanf("%d",&t)!=EOF) { while(t--) { s=0; int room[250]={0}; scanf("%d",&n); for(i=0;i<n;i++) { scanf("%d%d",&a,&b); if(a>b) { c=b; b=a; a=c; } for(j=((a+1)/2);j<=((b+1)/2);j++) { room[j]++; if(room[j]>s) { s=room[j]; } } } printf("%d\n",s*10); } } return 0; } Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator