結果
問題 | No.1801 Segment Game |
ユーザー | たたき@競プロ |
提出日時 | 2023-08-18 16:23:10 |
言語 | C++23 (gcc 12.3.0 + boost 1.83.0) |
結果 |
AC
|
実行時間 | 253 ms / 2,000 ms |
コード長 | 683 bytes |
コンパイル時間 | 4,803 ms |
コンパイル使用メモリ | 306,236 KB |
実行使用メモリ | 4,380 KB |
最終ジャッジ日時 | 2023-08-18 16:23:21 |
合計ジャッジ時間 | 8,208 ms |
ジャッジサーバーID (参考情報) |
judge12 / judge14 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 1 ms
4,380 KB |
testcase_01 | AC | 248 ms
4,376 KB |
testcase_02 | AC | 250 ms
4,376 KB |
testcase_03 | AC | 245 ms
4,380 KB |
testcase_04 | AC | 249 ms
4,376 KB |
testcase_05 | AC | 250 ms
4,376 KB |
testcase_06 | AC | 247 ms
4,376 KB |
testcase_07 | AC | 250 ms
4,376 KB |
testcase_08 | AC | 253 ms
4,376 KB |
testcase_09 | AC | 249 ms
4,376 KB |
testcase_10 | AC | 1 ms
4,376 KB |
ソースコード
#include<bits/stdc++.h> using namespace std; #include <atcoder/all> using namespace atcoder; using mint=modint998244353; //1000000007; using ll=long long; using pp=pair<int,int>; #define sr string #define vc vector #define fi first #define se second #define rep(i,n) for(int i=0;i<(int)n;i++) #define pb push_back #define all(v) v.begin(),v.end() #define pque priority_queue #define bpc(a) __builtin_popcount(a) int main(){ int t;cin>>t; rep(z,t){ ll h,w,d;cin>>h>>w>>d; bool ok=false; if(h&1&&d*d>=w*w+1)ok=true; if(w&1&&d*d>=h*h+1)ok=true; if(w%2==0&&d>=h)ok=true; if(h%2==0&&d>=w)ok=true; if(ok)cout<<'N'; else cout<<'S'; cout<<"\n"; } }