| ||||||||||
| 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 | |||||||||
Re:竟然在这题上载跟头了,BS一下自己…………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: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator