forked from beastxumair/tutorials
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathladdu.cpp
More file actions
79 lines (40 loc) · 987 Bytes
/
Copy pathladdu.cpp
File metadata and controls
79 lines (40 loc) · 987 Bytes
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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
#include <bits/stdc++.h>
using namespace std;
int main() {
int t;
cin >> t;
while(t--){
int n;
cin >> n;
string s;
cin >> s;
int ladoos = 0;
for(int i=0;i<n;i++){
string str;
cin >> str;
if(str == "CONTEST_WON"){
int rank;
cin >> rank;
int bonus = max(0,20-rank);
ladoos += (300 + bonus);
}
else if(str == "TOP_CONTRIBUTOR"){
ladoos += 300;
}
else if(str == "BUG_FOUND"){
int bug;
cin >> bug;
ladoos += bug;
}
else if(str == "CONTEST_HOSTED"){
ladoos += 50;
}
}
if(s == "INDIAN"){
cout << ladoos/200 << endl;
}
else{
cout << ladoos/400 << endl;
}
}
}