Submission #1368741


Source Code Expand

#include <bits/stdc++.h>
using namespace std;
#define repl(i,a,b) for(int i=(int)(a);i<(int)(b);i++)
#define rep(i,n) repl(i,0,n)
#define mp(a,b) make_pair((a),(b))
#define pb(a) push_back((a))
#define all(x) (x).begin(),(x).end()
#define uniq(x) sort(all(x)),(x).erase(unique(all(x)),end(x))
#define fi first
#define se second
#define dbg(...) _dbg(#__VA_ARGS__",", __VA_ARGS__)
void _dbg(string){cout<<endl;}
template<class H,class... T> void _dbg(string s,H h,T... t){int l=s.find(',');cout<<s.substr(0,l)<<" = "<<h<<", ";_dbg(s.substr(l+1),t...);}
template<class T,class U> ostream& operator<<(ostream& o, const pair<T,U> &p){o<<"("<<p.fi<<","<<p.se<<")";return o;}
template<class T> ostream& operator<<(ostream& o, const vector<T> &v){o<<"[";for(T t:v){o<<t<<",";}o<<"]";return o;}

#define INF 1120000000

int m[] = {0, 31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};

int main(){
  repl(i,1,13) m[i] += m[i-1];

  int a,b,c,d;
  cin>>a>>b>>c>>d;
  int p = m[a-1]+b;
  int q = m[c-1]+d;

  cout << q-p <<  endl;

  return 0;
}

Submission Info

Submission Time
Task A - 招待状
User tossy
Language C++14 (GCC 5.4.1)
Score 100
Code Size 1066 Byte
Status AC
Exec Time 1 ms
Memory 256 KB

Judge Result

Set Name All
Score / Max Score 100 / 100
Status
AC × 33
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 1 ms 256 KB
input_1.txt AC 1 ms 256 KB
input_10.txt AC 1 ms 256 KB
input_11.txt AC 1 ms 256 KB
input_12.txt AC 1 ms 256 KB
input_13.txt AC 1 ms 256 KB
input_14.txt AC 1 ms 256 KB
input_15.txt AC 1 ms 256 KB
input_16.txt AC 1 ms 256 KB
input_17.txt AC 1 ms 256 KB
input_18.txt AC 1 ms 256 KB
input_19.txt AC 1 ms 256 KB
input_2.txt AC 1 ms 256 KB
input_20.txt AC 1 ms 256 KB
input_21.txt AC 1 ms 256 KB
input_22.txt AC 1 ms 256 KB
input_23.txt AC 1 ms 256 KB
input_24.txt AC 1 ms 256 KB
input_25.txt AC 1 ms 256 KB
input_26.txt AC 1 ms 256 KB
input_27.txt AC 1 ms 256 KB
input_28.txt AC 1 ms 256 KB
input_29.txt AC 1 ms 256 KB
input_3.txt AC 1 ms 256 KB
input_30.txt AC 1 ms 256 KB
input_31.txt AC 1 ms 256 KB
input_32.txt AC 1 ms 256 KB
input_4.txt AC 1 ms 256 KB
input_5.txt AC 1 ms 256 KB
input_6.txt AC 1 ms 256 KB
input_7.txt AC 1 ms 256 KB
input_8.txt AC 1 ms 256 KB
input_9.txt AC 1 ms 256 KB