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 |
为什么测试数据全部正确,但是会Runtime Error呢?百思不得其解#include <stdio.h> void main(){ int room[201]; int h,i,j,k,l; int low,high,testcase,s,t,max; scanf("%d",&testcase); for(h=1;h<=testcase;h++){ for(i=1;i<=200;i++)room[i]=0; scanf("%d",&j); for(i=1;i<=j;i++){ scanf("%d %d",&s,&t); low=(s<t)?s:t; high=(s>t)?s:t; for(k=low;k<=high;k++){ room[k]++; } if(low%2==0)room[low-1]++; if(high%2==1&&high!=200)room[high+1]++; } max=room[1]; for(l=1;l<=200;l++){ max=(room[l]>max)?room[l]:max; } printf("%d\n",10*max); } } Followed by:
Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator