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> int main() { unsigned long int road; int section; while(true) { scanf("%ld %d",&road,§ion); if(road==0 && section==0)break; road++; for(int i=0;i<section;i++) { unsigned long int start,end; scanf("%ld %ld",&start,&end); unsigned long int distance=end-start; distance++; road-=distance; } printf("%ld\n",road); } return 0; } Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator