結果

問題 No.2776 Bigger image
ユーザー eve__fuyuki
提出日時 2024-06-08 13:00:07
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 25 ms / 2,000 ms
コード長 663 bytes
コンパイル時間 2,025 ms
コンパイル使用メモリ 192,456 KB
最終ジャッジ日時 2025-02-21 20:51:34
ジャッジサーバーID
(参考情報)
judge5 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 25
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>

using namespace std;

void fast_io() {
    ios_base::sync_with_stdio(false);
    cin.tie(nullptr);
}

int main() {
    fast_io();
    int a, b, h, w;
    cin >> a >> b >> h >> w;
    int r1_1, r1_2, r2_1, r2_2;
    if (h * b <= a * w) {
        r1_1 = h;
        r1_2 = a;
    } else {
        r1_1 = w;
        r1_2 = b;
    }
    if (h * a <= b * w) {
        r2_1 = h;
        r2_2 = b;
    } else {
        r2_1 = w;
        r2_2 = a;
    }
    if (r1_1 * r2_2 > r1_2 * r2_1) {
        cout << "Non-rotating\n";
    } else if (r1_1 * r2_2 < r1_2 * r2_1) {
        cout << "Rotating\n";
    } else {
        cout << "Same\n";
    }
}
0