結果
問題 |
No.2776 Bigger image
|
ユーザー |
|
提出日時 | 2024-06-08 16:18:54 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 536 bytes |
コンパイル時間 | 1,663 ms |
コンパイル使用メモリ | 166,656 KB |
実行使用メモリ | 6,820 KB |
最終ジャッジ日時 | 2024-12-28 03:34:52 |
合計ジャッジ時間 | 2,617 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 15 WA * 10 |
ソースコード
#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); if (s0 > s1) cout << "Non-rotating" << endl; else if (s0 < s1) cout << "Rotating" << endl; else cout << "Same" << endl; return 0; }