結果

問題 No.2776 Bigger image
ユーザー tobbietobbie
提出日時 2024-06-08 16:18:24
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 571 bytes
コンパイル時間 1,701 ms
コンパイル使用メモリ 165,988 KB
実行使用メモリ 6,824 KB
最終ジャッジ日時 2024-12-28 03:33:49
合計ジャッジ時間 3,014 ms
ジャッジサーバーID
(参考情報)
judge5 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample WA * 4
other WA * 25
権限があれば一括ダウンロードができます

ソースコード

diff #

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

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

int main() {
  int A, B;
  cin >> A >> B;
  int H, W;
  cin >> H >> W;
  auto f = [&](int a, int b) {
    if (a * W < b * H) {
      return (ll)a * H * W;
    } else {
      return (ll)b * H * W;
    }
    return (ll)0;
  };
  ll s0 = f(A, B);
  ll s1 = f(B, A);
  cout << s0 << " " << s1 << endl;
  if (s0 > s1)
    cout << "Non-rotating" << endl;
  else if (s0 < s1)
    cout << "Rotating" << endl;
  else
    cout << "Same" << endl;
  return 0;
}
0