結果
| 問題 |
No.2253 Ignore Subtle Differences
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2023-07-08 20:05:22 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 2,000 ms |
| コード長 | 961 bytes |
| コンパイル時間 | 986 ms |
| コンパイル使用メモリ | 102,524 KB |
| 最終ジャッジ日時 | 2025-02-15 09:09:40 |
|
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 1 |
ソースコード
#include<iostream>
#include<set>
#include<algorithm>
#include<vector>
#include<string>
#include<set>
#include<map>
#include<numeric>
#include<queue>
#include<cmath>
using namespace std;
typedef long long ll;
const ll INF=1LL<<60;
typedef pair<ll,ll> P;
typedef pair<int,P> PP;
const ll MOD=998244353;
const double PI=acos(-1);
int main(){
ll ans=0;
vector<ll> b(100000,0);
vector<pair<ll,ll>> ansxy(3);
b[0]=0,b[1]=1;
for(int i=2;;i++){
b[i]=4*b[i-1]-b[i-2];
ll canda=b[i];
ll candb=b[i-1];
if(canda>=1e9 || candb>=1e9)break;
if(canda>0 && candb>0){
ll S= (canda+candb)*abs(canda-candb);
if(S>1e16){
ans=max(ans,S);
ansxy[0]=make_pair(0,0);
ansxy[1]=make_pair(canda,candb);
ansxy[2]=make_pair(candb,canda);
}
}
}
for(auto [x,y]:ansxy){
cout<<x<<' '<<y<<endl;
}
}