結果
| 問題 | No.3664 Manhattan Circumcenter |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2026-08-30 16:14:14 |
| 言語 | C++23 (gcc 15.3.0 + boost 1.92.0) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 785 bytes |
| 記録 | |
| コンパイル時間 | 2,069 ms |
| コンパイル使用メモリ | 335,012 KB |
| 実行使用メモリ | 6,400 KB |
| 最終ジャッジ日時 | 2026-08-30 16:14:24 |
| 合計ジャッジ時間 | 8,922 ms |
|
ジャッジサーバーID (参考情報) |
judge2_0 / judge1_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | -- * 3 |
| other | TLE * 1 -- * 56 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
int main(){
ios::sync_with_stdio(false);
cin.tie(0);
vector<pair<int,int>> a(3), ans;
for(auto &&[y, x] : a) cin >> y >> x;
auto f = [&](int y, int x, int p){
auto [y2, x2] = a[p];
return abs(y - y2) + abs(x - x2);
};
for(int y = -50000; y <= 50000; y++){
for(int x = -50000; x <= 50000; x++){
if(f(y, x, 0) == f(y, x, 1) && f(y, x, 1) == f(y, x, 2)){
ans.emplace_back(y, x);
if(abs(y) > 40000 || abs(x) > 40000){
cout << "-1\n";
return 0;
}
}
}
}
cout << ans.size() << '\n';
for(auto [y, x] : ans) cout << y << " " << x << "\n";
}