結果
| 問題 |
No.446 ゆきこーだーの雨と雪 (1)
|
| コンテスト | |
| ユーザー |
HO_RI1991
|
| 提出日時 | 2016-11-18 22:28:42 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 1,042 bytes |
| コンパイル時間 | 803 ms |
| コンパイル使用メモリ | 99,884 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2024-11-26 06:51:41 |
| 合計ジャッジ時間 | 1,439 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 11 WA * 2 |
ソースコード
#include<iostream>
#include<vector>
#include<string>
#include<array>
#include<algorithm>
#include<list>
#include<cmath>
#include<iomanip>
#include<queue>
#include<functional>
#include<climits>
#include<iterator>
#include<unordered_set>
#include<unordered_map>
#include<map>
#include<stack>
#include<set>
using namespace std;
const double pi=4*atan(1.0);
constexpr long long mod=static_cast<long long>(1e9+7);
using cWeightEdges=vector<vector<pair<int,int>>>;
using cEdges=vector<vector<int>>;
int main(){
string A,B;
cin>>A>>B;
bool ans=true;
for(const auto& val:A){
if(!('0' <= val && val <= '9')){
ans=false;
break;
}
}
if(ans){
for(const auto& val:B){
if(!('0' <= val && val <= '9')){
ans=false;
break;
}
}
}
if(ans){
bool is_zero_leading=false;
if(A.size()>1 && (A[0] == '0')){
is_zero_leading=true;
}
if(B.size()>1 && (B[0] == '0')){
is_zero_leading=true;
}
if(is_zero_leading)ans=false;
}
if(ans)cout<<"OK"<<endl;
else cout<<"NG"<<endl;
//system("pause");
return 0;
}
HO_RI1991