結果

問題 No.446 ゆきこーだーの雨と雪 (1)
ユーザー paruki
提出日時 2016-11-18 22:27:35
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 888 bytes
コンパイル時間 1,370 ms
コンパイル使用メモリ 167,496 KB
実行使用メモリ 5,248 KB
最終ジャッジ日時 2024-11-26 06:42:45
合計ジャッジ時間 1,952 ms
ジャッジサーバーID
(参考情報)
judge5 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1 WA * 3
other AC * 5 WA * 8
権限があれば一括ダウンロードができます

ソースコード

diff #

#include "bits/stdc++.h"
using namespace std;
#define FOR(i,j,k) for(int (i)=(j);(i)<(int)(k);++(i))
#define rep(i,j) FOR(i,0,j)
#define each(x,y) for(auto &(x):(y))
#define mp make_pair
#define mt make_tuple
#define all(x) (x).begin(),(x).end()
#define debug(x) cout<<#x<<": "<<(x)<<endl
#define smax(x,y) (x)=max((x),(y))
#define smin(x,y) (x)=min((x),(y))
#define MEM(x,y) memset((x),(y),sizeof (x))
#define sz(x) (int)(x).size()
typedef long long ll;
typedef pair<int, int> pii;
typedef vector<int> vi;
typedef vector<ll> vll;

int f(string s) {
    if(sz(s) > 1 && s[0] == '0')return 0;
    each(c, s)if(!('0'<=c&&c<='9'))return 0;
    return 1;
}

int main(){
    ios::sync_with_stdio(false);
    cin.tie(0);
    string s, t;
    while(cin >> s >> t) {
        if(f(s) && f(t)) {
            cout << "OK" << endl;
        } else {
            cout << "NO" << endl;
        }
    }
}
0