-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathd60_q0_zipcode.cpp
51 lines (45 loc) · 1.16 KB
/
d60_q0_zipcode.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
47
48
49
50
51
#include <iostream>
#include <string>
#include <algorithm>
#include <vector>
#include <map>
using namespace std;
class Letter{
public:
string name;
string address;
string province;
string district;
int zip;
bool operator < (const Letter& other) const {
//**Begin Insert**
//**End Insert**
}
};
class ZipInfo{
public:
int zip;
string province; string district;
};
void correctZipAndSortLetters(vector<ZipInfo>& zipinfo, vector<Letter>& letters) {
//**Begin Insert**
//**End Insert**
}
int main() {
int nzip;
cin>>nzip;
vector<ZipInfo> zipinfo;
for (int i = 0; i < nzip; i++) {
ZipInfo z; cin>>z.zip>>z.district>>z.province; zipinfo.push_back(z);
}
int n;
cin>>n;
vector<Letter> letters;
for (int i = 0; i < n; i++) {
Letter l; cin>>l.name>>l.address>>l.district>>l.province>>l.zip; letters.push_back(l);
}
correctZipAndSortLetters(zipinfo, letters);
for (auto& l:letters) {
cout<<l.name<<" "<<l.address<<" "<<l.district<<" "<<l.province<<" "<<l.zip<<endl;
}
}