結果
| 問題 | No.1801 Segment Game |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2022-04-08 19:01:33 |
| 言語 | C++17 (gcc 15.2.0 + boost 1.90.0) |
| 結果 |
AC
|
| 実行時間 | 22 ms / 2,000 ms |
| コード長 | 401 bytes |
| 記録 | |
| コンパイル時間 | 1,145 ms |
| コンパイル使用メモリ | 208,576 KB |
| 実行使用メモリ | 6,400 KB |
| 最終ジャッジ日時 | 2026-06-25 17:02:49 |
| 合計ジャッジ時間 | 2,238 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge3_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | AC * 10 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
using i64 = long long;
bool check(i64 H, i64 W, i64 D) {
if(H % 2 == 0) {
return W <= D;
}
else {
return W * W + 1 <= D * D;
}
}
void solve() {
i64 H, W, D;
scanf("%lld %lld %lld", &H, &W, &D);
bool f = 0;
f |= check(H, W, D);
f |= check(W, H, D);
puts(f ? "N" : "S");
}
int main() {
int T;
scanf("%d", &T);
while(T--){
solve();
}
}