結果
問題 | No.1801 Segment Game |
ユーザー |
![]() |
提出日時 | 2022-01-07 22:08:05 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 252 ms / 2,000 ms |
コード長 | 693 bytes |
コンパイル時間 | 1,842 ms |
コンパイル使用メモリ | 165,676 KB |
実行使用メモリ | 6,820 KB |
最終ジャッジ日時 | 2024-11-14 11:49:30 |
合計ジャッジ時間 | 4,728 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 |
other | AC * 10 |
ソースコード
/*** @FileName a.cpp* @Author kanpurin* @Created 2022.01.07 22:07:58**/#include "bits/stdc++.h"using namespace std;typedef long long ll;int main() {int t;cin >> t;for (int _ = 0; _ < t; _++) {ll h,w,d;cin >> h >> w >> d;ll h2 = h/2,w2 = w/2;if (h%2 == 0 && w<=d) {puts("N");continue;}if (w%2 == 0 && h<=d) {puts("N");continue;}if (h%2 == 1 && w*w+1<=d*d) {puts("N");continue;}if (w%2 == 1 && h*h+1<=d*d) {puts("N");continue;}puts("S");}return 0;}