#include using namespace std; using namespace std::chrono; /// @brief x から y まで何日間 (両端含める) かを求める. int calculate_days_between(year_month_day x, year_month_day y) { return (sys_days(y) - sys_days(x)).count() + 1; } int main() { int ys, ms, ds, ye, me, de; cin >> ys >> ms >> ds >> ye >> me >> de; year_month_day keyaki_started_on {year(ys), month(ms), day(ds)}; year_month_day keyaki_ended_on {year(ye), month(me), day(de)}; year_month_day sakura_started_on = sys_days(keyaki_ended_on) + days{1}; int b = calculate_days_between(keyaki_started_on, keyaki_ended_on); int Q; cin >> Q; for (int q = 1; q <= Q; q++) { int y, m, d; cin >> y >> m >> d; year_month_day query_date {year(y), month(m), day(d)}; int a = calculate_days_between(sakura_started_on, query_date); if (a < b) { cout << "Less" << endl; } if (a == b) { cout << "Same" << endl; } if (a > b) { cout << "More" << endl; } } }