#include <cstdio> int main() { int m; int mdays[13] = {0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31}; int year, month, day, after; while (scanf("%d", &m) != EOF) { for (int i = 0; i < m; ++i) { scanf("%d%d%d%d", &year, &month, &day, &after); ...