-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathaoj1179.cpp
More file actions
44 lines (43 loc) · 756 Bytes
/
aoj1179.cpp
File metadata and controls
44 lines (43 loc) · 756 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
#include <iostream>
#include <cstdio>
#include <cstdlib>
#include <string>
#include <vector>
#include <deque>
#include <list>
#include <algorithm>
#include <numeric>
#include <functional>
#include <cmath>
#include <cstring>
#include <cctype>
#include <sstream>
#include <set>
#include <map>
#include <queue>
#include <complex>
using namespace std;
int main() {
int n, y, m, d;
int mil=0;
mil += 200 * 333;
mil += 390/2 * 666;
cin >> n;
for(int i=0; i<n; i++) {
cin >> y >> m >> d;
int cnt = 0;
cnt += (y-1)/3 * 200;
cnt += (y-(y-1)/3-1) * 390/2;
for(int j=1; j<=m; j++) {
if(j==m) cnt += d-1;
else if(y%3==0)
cnt += 20;
else {
if(j%2==1) cnt += 20;
else cnt += 19;
}
}
cout << mil - cnt << endl;
}
return 0;
}