-
Notifications
You must be signed in to change notification settings - Fork 2
/
CF81A.cpp
59 lines (54 loc) · 950 Bytes
/
CF81A.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
52
53
54
55
56
57
58
/*
ID: mfs6174
email: [email protected]
PROG: ti
LANG: C++
*/
#include<iostream>
#include<fstream>
#include<string>
#include<sstream>
#include<cstring>
#include<algorithm>
#include<map>
#include<vector>
#include<queue>
#include<deque>
#include<iomanip>
#include<cmath>
#include<set>
#define sf scanf
#define pf printf
#define llg long long
using namespace std;
//ifstream inf("ti.in");
//ofstream ouf("ti.out");
//freopen("ti.in","r",stdin);
const int maxlongint=2147483647;
int i,j,n,m,t;
double k;
map<string,int> shu;
string ss;
int main()
{
cin>>n>>m>>k;
for (i=1;i<=n;i++)
{
cin>>ss;
cin>>t;
t=(int)(t*k);
if (t>=100)
shu[ss]=t;
}
for (i=1;i<=m;i++)
{
cin>>ss;
map<string,int>::iterator w=shu.find(ss);
if (w==shu.end())
shu[ss]=0;
}
cout<<shu.size()<<endl;
for (map<string,int>::iterator i=shu.begin();i!=shu.end();i++)
cout<<(*i).first<<' '<<(*i).second<<endl;
return 0;
}