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:竟然在这题上载跟头了,BS一下自己…………

Posted by liuweni at 2007-08-12 13:04:36 on Problem 2665
In Reply To:Re:竟然在这题上载跟头了,BS一下自己………… Posted by:1588760 at 2006-08-28 20:51:10
#include <iostream>
using namespace std;

int main()
{
	long long int tmpa,tmpb,len,left;
	int n;
	cin>>len>>n;
	while(len && n){
		left = len+1;
		for(int i = 0 ; i  < n ; i++){
			cin>>tmpa>>tmpb;
			left -=(tmpb-tmpa+1);
		}
		cout<<left<<endl;
		cin>>len>>n;
	}
	return 0;
}


不 B4自己不行阿,double和long long int都没分清楚,用double过不了,要用long long int还要去多看下语法了

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