結果
問題 |
No.2776 Bigger image
|
ユーザー |
|
提出日時 | 2024-06-07 21:45:33 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 3 ms / 2,000 ms |
コード長 | 691 bytes |
コンパイル時間 | 4,518 ms |
コンパイル使用メモリ | 251,112 KB |
最終ジャッジ日時 | 2025-02-21 20:07:13 |
ジャッジサーバーID (参考情報) |
judge4 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 25 |
ソースコード
#include <bits/stdc++.h> using namespace std; #include <atcoder/all> using namespace atcoder; using ll = long long; using P = pair<ll,ll>; ll H,W; ll A,B; P calc(ll x,ll y){ if(x>y){ return {y*H*H,x}; } return {x*W*W,y}; } void solve(){ P l = calc(A,B); P r = calc(B,A); if(l.first*r.second==l.second*r.first){ cout<<"Same"<<endl; }else if(l.first*r.second<l.second*r.first){ cout<<"Rotating"<<endl; }else{ cout<<"Non-rotating"<<endl; } } signed main(){ ios::sync_with_stdio(false); cin.tie(nullptr); cin >> A >> B; cin >> H >> W; if(H>W){ swap(H,W); swap(A,B); } solve(); }