結果

問題 No.2253 Ignore Subtle Differences
ユーザー KKT89KKT89
提出日時 2023-03-25 00:16:58
言語 C++17
(gcc 12.3.0 + boost 1.83.0)
結果
TLE  
実行時間 -
コード長 799 bytes
コンパイル時間 2,688 ms
コンパイル使用メモリ 214,124 KB
実行使用メモリ 14,728 KB
最終ジャッジ日時 2023-10-18 21:47:29
合計ジャッジ時間 9,253 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 TLE -
権限があれば一括ダウンロードができます

ソースコード

diff #

#pragma GCC optimize("Ofast")
#include <bits/stdc++.h>
using namespace std;
typedef long long int ll;
typedef unsigned long long int ull;

mt19937_64 rng(chrono::steady_clock::now().time_since_epoch().count());
ll myRand(ll B) {
    return (ull)rng() % B;
}

int main() {
    cin.tie(nullptr);
    ios::sync_with_stdio(false);
    pair<ll,ll> p;
    for (ll a = 1e8; a <= 1e9; a++) {
        ll c1 = -4*a;
        ll c2 = a*a-1;
        if (c1*c1 - 4*c2 < 0) continue;
        ll b = -c1+round(sqrt(c1*c1 - 4*c2));
        if (b%2 == 0) {
            b /= 2;
            if (a*a-4*a*b+b*b == 1 and b <= 1e9) {
                p = {a,b};
            }
        }
    }
    cout << 0 << " " << 0 << endl;
    cout << p.first << " " << p.second << endl;
    cout << p.second << " " << p.first << endl;
}
0