結果
問題 |
No.138 化石のバージョン
|
ユーザー |
👑 |
提出日時 | 2022-08-08 16:13:06 |
言語 | C++17(gcc12) (gcc 12.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 778 bytes |
コンパイル時間 | 624 ms |
コンパイル使用メモリ | 73,468 KB |
最終ジャッジ日時 | 2025-01-30 19:26:12 |
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 28 WA * 5 |
ソースコード
#include <iostream> #include <list> #include <vector> #include <string> #include <stdio.h> #include <stdint.h> using namespace std; using uint = unsigned int; using ll = long long; #define CIN( LL , A ) LL A; cin >> A #define GETLINE( A ) string A; getline( cin , A ) int main() { CIN( string , S0 ); CIN( string , S1 ); string S[2] = { S0 , S1 }; ll A[2] = {}; for( ll i = 0 ; i < 2 ; i++ ){ const string& Si = S[i]; const uint& size = Si.size(); ll& Ai = A[i]; for( ll j = 0 ; j < size ; j++ ){ const string c = Si.substr( j , 1 ); if( c == "." ){ Ai *= 1000; } else { Ai = Ai * 10 + stoi( c ); } } } const string answer = A[0] < A[1] ? "NO" : "YES"; cout << answer << endl; return 0; }