#include<iostream>using namespace std;int ifrun(int year){if ((year % 4 == 0 && year % 100 != 0) || year % 400 == 0) return 1;else return 0;}int main(){int n; cin >> n;while (n--){int y, m, d, day;cin >> y >> m >> d >> day;int md[2][13] = { {0,31,28,31,30,...