結果
問題 | No.2776 Bigger image |
ユーザー |
![]() |
提出日時 | 2024-06-13 00:30:42 |
言語 | C++23 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 770 bytes |
コンパイル時間 | 2,833 ms |
コンパイル使用メモリ | 244,532 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-06-13 00:30:47 |
合計ジャッジ時間 | 4,012 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 25 |
ソースコード
#include <bits/stdc++.h>using namespace std;#ifdef LOCAL#include "settings/debug.cpp"#define _GLIBCXX_DEBUG#else#define Debug(...) void(0)#endif#define rep(i, n) for (int i = 0; i < (n); ++i)using ll = long long;using ull = unsigned long long;pair<ll, ll> easyfrac(ll a, ll b) { return { a / b, a % b }; }int main() {ll a, b, h, w;cin >> a >> b >> h >> w;auto nrw = easyfrac(a * b * b * b, w * w);auto nrh = easyfrac(a * a * a * b, h * h);auto rw = easyfrac(a * a * a * b, w * w);auto rh = easyfrac(a * b * b * b, h * h);if (min(nrw, nrh) > min(rw, rh)) {cout << "Non-rotating" << endl;}else if (min(nrw, nrh) < min(rw, rh)) {cout << "Rotating" << endl;}else {cout << "Same" << endl;}return 0;}