結果
問題 | No.138 化石のバージョン |
ユーザー |
![]() |
提出日時 | 2023-12-24 00:21:52 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 3 ms / 5,000 ms |
コード長 | 516 bytes |
コンパイル時間 | 2,776 ms |
コンパイル使用メモリ | 194,740 KB |
最終ジャッジ日時 | 2025-02-18 14:07:30 |
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 33 |
コンパイルメッセージ
main.cpp: In function ‘int main()’: main.cpp:15:8: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 15 | scanf("%d.%d.%d", &get<0>(a), &get<1>(a), &get<2>(a)); | ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ main.cpp:16:8: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 16 | scanf("%d.%d.%d", &get<0>(b), &get<1>(b), &get<2>(b)); | ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ソースコード
#include <bits/stdc++.h>using namespace std;#ifdef LOCAL#include "settings/debug.cpp"#define _GLIBCXX_DEBUG#else#define Debug(...) void(0)#endif#define rep(i, n) for (int i = 0; i < (n); ++i)using ll = long long;using ull = unsigned long long;int main() {tuple<int, int, int> a, b;scanf("%d.%d.%d", &get<0>(a), &get<1>(a), &get<2>(a));scanf("%d.%d.%d", &get<0>(b), &get<1>(b), &get<2>(b));if (b <= a) {cout << "YES" << endl;}else {cout << "NO" << endl;}return 0;}