#include "stdafx.h"
#include <iostream>
#include <fstream>
#include <string>
#include <iterator>
#include <algorithm>
#include <vector>
using namespace std;
int _tmain(int argc, _TCHAR* argv[])
{
string from,to;
cin>>from>>to;
ifstream is(from.c_str());
istream_iterator<string> ii (is);
istream_iterator<string> eos;
vector<string> b(ii,eos);// 有问题
sort(b.begin(),b.end());
ofstream os(to.c_str());
ostream_iterator<string> oo(os,"\n");
unique_copy(b.begin(),b.end(),oo);
return !is.eof() && !os;
}
/*istream_iterator<string> in_iter(cin),eof;
ostream_iterator<string>out_iter(cout,"\n");
while(in_iter!=eof)
{
*out_iter =*in_iter;
out_iter++;
in_iter++;
}*/