-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathTSETPcheatOpreate.cpp
46 lines (42 loc) · 988 Bytes
/
TSETPcheatOpreate.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
#include <algorithm>
#include <cmath>
#include <fstream>
#include <functional>
#include <iomanip>
#include <iostream>
#include <queue>
#include <map>
#include <string>
#include <vector>
using namespace std;
int main()
{
ifstream fin("TSETP.out");
ofstream write("TSETPcheat.cpp");
write << "int main()" << '\n';
write << "{" << '\n';
write << "\tmultimap<int,string> result" << '\n';
write << "\t{" << '\n';
for (int i = 1; i <= 354; ++i)
{
string temp1, temp2 = "";
getline(fin, temp1);
int j = 0;
while(true)
{
if (temp1[j] == ' ')
{
break;
}
else if (temp1[j] != '.')
{
temp2 += temp1[j];
}
++j;
}
write << "\t\t{" << temp2 << ",\"" << temp1 << "\"},\n";
}
write << "\t};" << '\n';
write << "}" << '\n';
return 0;
}