結果
| 問題 | No.446 ゆきこーだーの雨と雪 (1) |
| コンテスト | |
| ユーザー |
cww
|
| 提出日時 | 2017-02-06 22:17:19 |
| 言語 | C++14 (gcc 15.3.0 + boost 1.92.0 + ACL) |
| 結果 |
AC
不安定
|
| 実行時間 | 1 ms / 2,000 ms |
| + 311µs | |
| コード長 | 487 bytes |
| 記録 | |
| コンパイル時間 | 884 ms |
| コンパイル使用メモリ | 181,868 KB |
| 実行使用メモリ | 9,844 KB |
| 最終ジャッジ日時 | 2026-10-11 21:20:42 |
| 合計ジャッジ時間 | 1,978 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge1_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 14 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
#define REP(i,n) for(int i=0; i<(n); i++)
struct cww{cww(){ios::sync_with_stdio(false);cin.tie(0);}}star;
bool check( string S )
{
REP( i, (int)S.size() )
{
if( ( S[ 0 ] == '0' && S.size() > 1 ) || isalpha( S[ i ] ) )
{
return false;
}
}
int N = stoi( S );
if( N > 12345 )
{
return false;
}
return true;
}
int main()
{
string A, B;
cin >> A >> B;
cout << ( check( A ) && check( B ) ? "OK" : "NG" ) << endl;
return 0;
}
cww