結果

問題 No.1801 Segment Game
ユーザー pockynypockyny
提出日時 2022-01-07 23:02:46
言語 C++17
(gcc 13.2.0 + boost 1.83.0)
結果
AC  
実行時間 240 ms / 2,000 ms
コード長 382 bytes
コンパイル時間 661 ms
コンパイル使用メモリ 68,008 KB
実行使用メモリ 4,384 KB
最終ジャッジ日時 2023-08-09 06:06:05
合計ジャッジ時間 4,031 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
4,384 KB
testcase_01 AC 236 ms
4,376 KB
testcase_02 AC 237 ms
4,376 KB
testcase_03 AC 236 ms
4,380 KB
testcase_04 AC 239 ms
4,380 KB
testcase_05 AC 234 ms
4,376 KB
testcase_06 AC 234 ms
4,380 KB
testcase_07 AC 237 ms
4,380 KB
testcase_08 AC 229 ms
4,380 KB
testcase_09 AC 240 ms
4,380 KB
testcase_10 AC 1 ms
4,380 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>

using namespace std;
typedef long long ll;
int main(){
    int t; cin >> t;
    while(t){
        t--;
        ll h,w,d; cin >> h >> w >> d;
        ll l1,l2;
        if(h%2==0) l1 = w*w;
        else l1 = 1 + w*w;
        if(w%2==0) l2 = h*h;
        else l2 = 1 + h*h;
        if(min(l1,l2)<=d*d) cout << "N" << endl;
        else cout << "S" << endl;
    }
}
0