結果
| 問題 | 
                            No.2776 Bigger image
                             | 
                    
| コンテスト | |
| ユーザー | 
                             | 
                    
| 提出日時 | 2024-06-07 22:20:47 | 
| 言語 | C++14  (gcc 13.3.0 + boost 1.87.0)  | 
                    
| 結果 | 
                             
                                AC
                                 
                             
                            
                         | 
                    
| 実行時間 | 3 ms / 2,000 ms | 
| コード長 | 873 bytes | 
| コンパイル時間 | 2,289 ms | 
| コンパイル使用メモリ | 165,376 KB | 
| 実行使用メモリ | 5,248 KB | 
| 最終ジャッジ日時 | 2024-12-26 08:28:52 | 
| 合計ジャッジ時間 | 3,460 ms | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge2 / judge1 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 4 | 
| other | AC * 25 | 
ソースコード
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int,int> P;
#define REP(i,n) for(ll i=0;i<ll(n);i++)
int main(void){
	cin.tie(nullptr);  ios_base::sync_with_stdio(false);
	ll A,B,H,W;
	cin >> A >> B >> H >> W;
	if(A*W>=B*H && B*W>=A*H){
		if(A>B) cout << "Rotating" << endl;
		else if(A==B) cout << "Same" << endl;
		else cout << "Non-rotating" << endl;
	}
	else if(A*W>=B*H && B*W<A*H){
		if(H>W) cout << "Non-rotating" << endl;
		else if(H==W) cout << "Same" << endl;
		else cout << "Rotating" << endl;
	}
	else if(A*W<B*H && B*W>=A*H){
		if(H>W) cout << "Rotating" << endl;
		else if(H==W) cout << "Same" << endl;
		else cout << "Non-rotating" << endl;
	}
	else if(A*W<B*H && B*W<A*H){
		if(A>B) cout << "Non-rotating" << endl;
		else if(A==B) cout << "Same" << endl;
		else cout << "Rotating" << endl;
	}
	return 0;
}