結果

問題 No.2776 Bigger image
ユーザー forest3forest3
提出日時 2024-07-11 15:38:16
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 600 bytes
コンパイル時間 1,855 ms
コンパイル使用メモリ 166,620 KB
実行使用メモリ 5,376 KB
最終ジャッジ日時 2024-07-11 15:38:20
合計ジャッジ時間 3,361 ms
ジャッジサーバーID
(参考情報)
judge2 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 24 WA * 1
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;

using ll = long long;
#define rep(i, n) for(int i = 0; i < n; i++)

int main() {
	int a, b, h, w;
	cin >> a >> b >> h >> w;
	long double rh = (long double)h / a;
	long double s1 = rh * a * rh * b;
	long double rw = (long double)w / b;
	long double s2 = rw * a * rw * b;
	long double s = min(s1, s2);
	swap(a, b);
	rh = (long double)h / a;
	s1 = rh * a * rh * b;
	rw = (long double)w / b;
	s2 = rw * a * rw * b;
	long double sr = min(s1, s2);
	string ans = "Same";
	if(s > sr) ans = "Non-rotating";
	if(s < sr) ans = "Rotating";
	cout << ans << endl;
}

0