結果
問題 | No.1801 Segment Game |
ユーザー | 蜜蜂 |
提出日時 | 2022-01-07 21:57:03 |
言語 | C++14 (gcc 13.2.0 + boost 1.83.0) |
結果 |
AC
|
実行時間 | 40 ms / 2,000 ms |
コード長 | 1,108 bytes |
コンパイル時間 | 3,923 ms |
コンパイル使用メモリ | 226,288 KB |
実行使用メモリ | 4,508 KB |
最終ジャッジ日時 | 2023-08-09 05:58:00 |
合計ジャッジ時間 | 5,329 ms |
ジャッジサーバーID (参考情報) |
judge13 / judge15 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 1 ms
4,356 KB |
testcase_01 | AC | 39 ms
4,508 KB |
testcase_02 | AC | 38 ms
4,380 KB |
testcase_03 | AC | 39 ms
4,380 KB |
testcase_04 | AC | 39 ms
4,380 KB |
testcase_05 | AC | 40 ms
4,376 KB |
testcase_06 | AC | 39 ms
4,380 KB |
testcase_07 | AC | 39 ms
4,380 KB |
testcase_08 | AC | 40 ms
4,376 KB |
testcase_09 | AC | 40 ms
4,376 KB |
testcase_10 | AC | 1 ms
4,380 KB |
ソースコード
//g++ 1.cpp -std=c++14 -O2 -I . #include <bits/stdc++.h> using namespace std; #include <atcoder/all> using namespace atcoder; using ll = long long; using ld = long double; using vi = vector<int>; using vvi = vector<vi>; using vll = vector<ll>; using vvll = vector<vll>; using vld = vector<ld>; using vvld = vector<vld>; using vst = vector<string>; using vvst = vector<vst>; #define fi first #define se second #define pb push_back #define pq_big(T) priority_queue<T,vector<T>,less<T>> #define pq_small(T) priority_queue<T,vector<T>,greater<T>> #define all(a) a.begin(),a.end() #define rep(i,start,end) for(ll i=start;i<(ll)(end);i++) #define per(i,start,end) for(ll i=start;i>=(ll)(end);i--) #define uniq(a) sort(all(a));a.erase(unique(all(a)),a.end()) void solve(){ ll h,w,d; cin>>h>>w>>d; if(h>w){ swap(h,w); } if(w%2==0){ if(h<=d){ cout<<"N\n"; return; } } else{ if(h*h+1<=d*d){ cout<<"N\n"; return; } } cout<<"S\n"; } int main(){ ios::sync_with_stdio(false); cin.tie(nullptr); int t; cin>>t; while(t--){ solve(); } }