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

set

Posted by frkstyc at 2005-06-06 17:11:25
In Reply To:我把源程序贴出来,你们自己比较吧 Posted by:frkstyc at 2005-06-06 17:10:49
#include <fstream>
#include <set>

using namespace std;

int main(void)
{
	set<int> array;
	ifstream fin("data.txt");
	copy(istream_iterator<int>(fin), istream_iterator<int>(), inserter(array, array.begin()));
	fin.close();
	ofstream fout("output.txt");
	copy(array.begin(), array.end(), ostream_iterator<int>(fout, "\n"));
	fout.close();
	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