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

请用G++

Posted by MONDAY41 at 2011-08-25 18:54:42 on Problem 3916
In Reply To:为什么compile error了...... Posted by:fiona7 at 2011-08-25 17:46:20
> #include <iostream>
> #include <vector>
> 
> using namespace std;
> 
> int main()
> {
> 	int nNumber;
> 	cin>>nNumber;
> 	while(nNumber != 0)
> 	{
> 		vector<int> vNumber(nNumber, 0);
> 		for (int i = 0; i < nNumber; i++)
> 		{
> 			cin>>vNumber[i];
> 		}
> 		for (int i = 0; i < nNumber; i++)
> 		{
> 			if (i == 0)
> 			{
> 				cout<<vNumber[i]<<" ";
> 			}
> 			else
> 			{
> 				if (vNumber[i] != vNumber[i - 1])
> 				{
> 					cout<<vNumber[i]<<" ";
> 				}
> 			}
> 		}
> 		cout<<"$"<<endl;
> 		cin>>nNumber;
> 	}
> 	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