-
Notifications
You must be signed in to change notification settings - Fork 16
Expand file tree
/
Copy pathLazy Jem.cpp
More file actions
47 lines (47 loc) · 1.01 KB
/
Copy pathLazy Jem.cpp
File metadata and controls
47 lines (47 loc) · 1.01 KB
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
#include <bits/stdc++.h>
using namespace std;
int main()
{
long long int i,t;
cin>>t;
for( i=0;i<t;i++)
{
int n,laddu=0;
string nation;
cin>>n>>nation;
for(int j=0;j<n;j++)
{
string s;
cin>>s;
if(s=="CONTEST_WON")
{
int rank,bonus=0;
cin>>rank;
if(rank>20)
bonus=0;
else
bonus=20-rank;
laddu=laddu+300+bonus;
}
else if(s=="TOP_CONTRIBUTOR")
{
laddu=laddu+300;
}
else if(s=="BUG_FOUND")
{
int rank;
cin>>rank;
laddu=laddu+rank;
}
else if(s=="CONTEST_HOSTED")
{
laddu=laddu+50;
}
}
if(nation=="INDIAN")
cout<<laddu/200<<endl;
else
cout<<laddu/400<<endl;
}
return 0;
}