結果
問題 | No.2253 Ignore Subtle Differences |
ユーザー |
|
提出日時 | 2023-03-25 00:16:58 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
TLE
|
実行時間 | - |
コード長 | 799 bytes |
コンパイル時間 | 2,635 ms |
コンパイル使用メモリ | 213,568 KB |
最終ジャッジ日時 | 2025-02-11 17:52:18 |
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | TLE * 1 |
ソースコード
#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;}