結果

問題 No.2371 最大の試練それは起床
ユーザー poyonpoyon
提出日時 2023-06-17 01:18:57
言語 C++17
(gcc 12.3.0 + boost 1.83.0)
結果
AC  
実行時間 2 ms / 2,000 ms
コード長 878 bytes
コンパイル時間 6,556 ms
コンパイル使用メモリ 306,404 KB
実行使用メモリ 4,504 KB
最終ジャッジ日時 2023-09-16 12:40:41
合計ジャッジ時間 7,577 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
4,380 KB
testcase_01 AC 2 ms
4,376 KB
testcase_02 AC 1 ms
4,376 KB
testcase_03 AC 1 ms
4,380 KB
testcase_04 AC 1 ms
4,380 KB
testcase_05 AC 2 ms
4,376 KB
testcase_06 AC 2 ms
4,376 KB
testcase_07 AC 2 ms
4,380 KB
testcase_08 AC 1 ms
4,380 KB
testcase_09 AC 2 ms
4,380 KB
testcase_10 AC 1 ms
4,380 KB
testcase_11 AC 2 ms
4,504 KB
testcase_12 AC 2 ms
4,376 KB
testcase_13 AC 1 ms
4,376 KB
testcase_14 AC 1 ms
4,376 KB
testcase_15 AC 2 ms
4,380 KB
testcase_16 AC 2 ms
4,376 KB
testcase_17 AC 2 ms
4,376 KB
testcase_18 AC 1 ms
4,380 KB
testcase_19 AC 2 ms
4,380 KB
testcase_20 AC 1 ms
4,376 KB
testcase_21 AC 2 ms
4,380 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

// Validate Input by testlib.h

// clang-format off
#include <bits/stdc++.h>
using namespace std;
using ll = long long;

#if __has_include("testlib.h")
    #include "testlib.h"
#else
    #include "/opt/testlib/testlib.h"
#endif

// clang-format on
int main(int argc, char *argv[]) {
    // -------------------- Validate Input --------------------
    registerValidation(argc, argv);

    int H = inf.readInt(0, 23);
    inf.readSpace();
    int M = inf.readInt(0, 59);
    inf.readChar('\n');

    inf.readEof();

    // -------------------- Solve --------------------
    auto f = [&](int h, int m) -> int { return 60 * h + m; };

    int s = f(7, 30);
    int t = f(8, 30);
    int T = f(H, M);

    string ans;
    if (T < s) {
        ans = "Yes";
    } else if (T < t) {
        ans = "Late";
    } else {
        ans = "No";
    }
    cout << ans << '\n';

    return 0;
}
0