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

请问我这个哪里错了

Posted by zdy123 at 2017-05-26 20:52:35 on Problem 2665
#include<iostream>
using namespace std;
int main()
{
	unsigned long int i, road, num, n, m;
		bool tree[2000000001];

	for (i = 0; i <= 2000000001; i++)
		tree[i] = true;
	cin >> road >> num;
	while (num--)
	{
		cin >> n >> m;
		for (i = n; i <= m; i++)
			tree[i] = false;
	}
	int count = 0;
	for (i = 0; i <= road; i++)
		if (tree[i]) count++;
	cout << count << endl;
	return 0;
}

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