Submission #19488338
Source Code Expand
Copy
#include <bits/stdc++.h>
// #include <atcoder/all>
using namespace std;
// using namespace atcoder;
template <class T, class U>
ostream &operator<<(ostream &os, const pair<T, U> &p) {
os << "(" << p.first << "," << p.second << ")";
return os;
}
#ifdef __LOCAL
#define debug(x) cerr << __LINE__ << ": " << #x << " = " << (x) << '\n'
#define debugArray(x, n) \
cerr << __LINE__ << ": " << #x << " = {"; \
for (long long hoge = 0; (hoge) < (long long)(n); ++(hoge)) \
cerr << ((hoge) ? "," : "") << x[hoge]; \
cerr << "}" << '\n'
#define debugMatrix(x, h, w) \
cerr << __LINE__ << ": " << #x << " =\n"; \
for (long long hoge = 0; (hoge) < (long long)(h); ++(hoge)) { \
cerr << ((hoge ? " {" : "{{")); \
for (long long fuga = 0; (fuga) < (long long)(w); ++(fuga)) \
cerr << ((fuga ? ", " : "")) << x[hoge][fuga]; \
cerr << "}" << (hoge + 1 == (long long)(h) ? "}" : ",") << '\n'; \
}
#else
#define debug(x) (void(0))
#define debugArray(x, n) (void(0))
#define debugMatrix(x, h, w) (void(0))
#endif
signed main() {
cin.tie(0);
ios::sync_with_stdio(0);
int days[13] = {0, 31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};
for (int i = 1; i <= 12; i++) days[i] += days[i - 1];
int Ma, Da, Mb, Db;
cin >> Ma >> Da >> Mb >> Db;
cout << (days[Mb - 1] + Db) - (days[Ma - 1] + Da) << '\n';
return 0;
}
Submission Info
Submission Time |
|
Task |
A - 招待状 |
User |
hashiryo |
Language |
C++ (GCC 9.2.1) |
Score |
100 |
Code Size |
1579 Byte |
Status |
AC |
Exec Time |
8 ms |
Memory |
3672 KB |
Judge Result
Set Name |
All |
Score / Max Score |
100 / 100 |
Status |
|
Set Name |
Test Cases |
All |
input_0.txt, input_1.txt, input_10.txt, input_11.txt, input_12.txt, input_13.txt, input_14.txt, input_15.txt, input_16.txt, input_17.txt, input_18.txt, input_19.txt, input_2.txt, input_20.txt, input_21.txt, input_22.txt, input_23.txt, input_24.txt, input_25.txt, input_26.txt, input_27.txt, input_28.txt, input_29.txt, input_3.txt, input_30.txt, input_31.txt, input_32.txt, input_4.txt, input_5.txt, input_6.txt, input_7.txt, input_8.txt, input_9.txt |
Case Name |
Status |
Exec Time |
Memory |
input_0.txt |
AC |
8 ms |
3464 KB |
input_1.txt |
AC |
2 ms |
3576 KB |
input_10.txt |
AC |
2 ms |
3564 KB |
input_11.txt |
AC |
2 ms |
3536 KB |
input_12.txt |
AC |
3 ms |
3504 KB |
input_13.txt |
AC |
2 ms |
3508 KB |
input_14.txt |
AC |
2 ms |
3620 KB |
input_15.txt |
AC |
2 ms |
3512 KB |
input_16.txt |
AC |
3 ms |
3568 KB |
input_17.txt |
AC |
3 ms |
3508 KB |
input_18.txt |
AC |
2 ms |
3504 KB |
input_19.txt |
AC |
2 ms |
3536 KB |
input_2.txt |
AC |
2 ms |
3508 KB |
input_20.txt |
AC |
2 ms |
3568 KB |
input_21.txt |
AC |
2 ms |
3572 KB |
input_22.txt |
AC |
2 ms |
3448 KB |
input_23.txt |
AC |
4 ms |
3568 KB |
input_24.txt |
AC |
3 ms |
3572 KB |
input_25.txt |
AC |
3 ms |
3576 KB |
input_26.txt |
AC |
3 ms |
3636 KB |
input_27.txt |
AC |
3 ms |
3508 KB |
input_28.txt |
AC |
2 ms |
3508 KB |
input_29.txt |
AC |
3 ms |
3568 KB |
input_3.txt |
AC |
2 ms |
3468 KB |
input_30.txt |
AC |
6 ms |
3504 KB |
input_31.txt |
AC |
2 ms |
3568 KB |
input_32.txt |
AC |
2 ms |
3672 KB |
input_4.txt |
AC |
2 ms |
3572 KB |
input_5.txt |
AC |
2 ms |
3564 KB |
input_6.txt |
AC |
2 ms |
3500 KB |
input_7.txt |
AC |
2 ms |
3572 KB |
input_8.txt |
AC |
3 ms |
3508 KB |
input_9.txt |
AC |
2 ms |
3568 KB |