結果
| 問題 | No.3402 [Cherry Anniversary 5] Beyond Zelkova, the 5th year vista seen through the bloom of a cherry bloosom |
| コンテスト | |
| ユーザー |
hiromi_ayase
|
| 提出日時 | 2025-12-09 21:55:46 |
| 言語 | C++23 (gcc 13.3.0 + boost 1.89.0) |
| 結果 |
AC
|
| 実行時間 | 172 ms / 2,000 ms |
| コード長 | 1,129 bytes |
| 記録 | |
| コンパイル時間 | 5,372 ms |
| コンパイル使用メモリ | 335,256 KB |
| 実行使用メモリ | 7,848 KB |
| 最終ジャッジ日時 | 2025-12-09 21:55:57 |
| 合計ジャッジ時間 | 8,816 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | AC * 24 |
ソースコード
#include <bits/stdc++.h>
#include <atcoder/all>
using namespace std;
using i32 = int;
using u32 = unsigned int;
using i64 = long long;
using u64 = unsigned long long;
#define FAST_IO \
ios::sync_with_stdio(false); \
cin.tie(0);
const i64 INF = 1001001001001001001;
using Modint = atcoder::static_modint<998244353>;
#include <ctime>
int main() {
FAST_IO
int ys, ms, ds, ye, me, de;
cin >> ys >> ms >> ds;
cin >> ye >> me >> de;
tm ts { 0 }, te { 0 };
ts.tm_year = ys - 1900;
ts.tm_mon = ms - 1;
ts.tm_mday = ds;
te.tm_year = ye - 1900;
te.tm_mon = me - 1;
te.tm_mday = de;
auto tts = mktime(&ts);
auto tte = mktime(&te);
int day = 24 * 60 * 60;
int Q;
cin >> Q;
while (Q--) {
int y, m, d;
cin >> y >> m >> d;
tm t { 0 };
t.tm_year = y - 1900;
t.tm_mon = m - 1;
t.tm_mday = d;
auto tt = mktime(&t);
auto b = tte - tts + day;
auto a = tt - tte;
b /= day;
a /= day;
if (a < b) {
cout << "Less" << "\n";
} else if (a == b) {
cout << "Same" << "\n";
} else {
cout << "More" << "\n";
}
}
}
hiromi_ayase