結果

問題 No.1801 Segment Game
ユーザー rogi52rogi52
提出日時 2022-10-22 04:40:33
言語 C++17
(gcc 12.3.0 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 594 bytes
コンパイル時間 1,673 ms
コンパイル使用メモリ 198,084 KB
実行使用メモリ 4,380 KB
最終ジャッジ日時 2023-09-14 02:56:18
合計ジャッジ時間 3,073 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

diff #

#include <bits/stdc++.h>
#define rep(i,n) for(int i = 0; i < (n); i++)
using namespace std;
using ll = long long;
using ld = long double;

int main(){
    cin.tie(0);
    ios::sync_with_stdio(0);
    
    int T; cin >> T;
    rep(_,T) {
        ll H,W,D; cin >> H >> W >> D;
        enum { SECOND, FIRST };
        using i128 = __int128_t;
        cout << ([H, W, D]() {
            if((i128)H * H + (H % 2) * (H % 2) <= (i128)D * D) return FIRST;
            if((i128)W * W + (W % 2) * (W % 2) <= (i128)D * D) return FIRST;
            return SECOND;
        } () ? "N" : "S") << "\n";
    }
}
0