結果
| 問題 | No.3664 Manhattan Circumcenter |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2025-07-10 22:00:17 |
| 言語 | C++17 (gcc 15.3.0 + boost 1.92.0) |
| 結果 |
MLE
|
| 実行時間 | - |
| コード長 | 903 bytes |
| 記録 | |
| コンパイル時間 | 1,503 ms |
| コンパイル使用メモリ | 214,568 KB |
| 実行使用メモリ | 527,840 KB |
| 最終ジャッジ日時 | 2026-08-30 13:00:21 |
| 合計ジャッジ時間 | 7,865 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge3_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 54 MLE * 3 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
int main(){
int px, py, qx, qy, rx, ry;
cin >> px >> py >> qx >> qy >> rx >> ry;
auto check = [&](int x){
assert(0 <= x && x <= 100);
};
check(px); check(py);
check(qx); check(qy);
check(rx); check(ry);
vector<pair<double, double>> ans;
for(int i = -3000; i <= 3000; i++){
for(int j = -3000; j <= 3000; j++){
double x = i / 2.0, y = j / 2.0;
double d1 = abs(px - x) + abs(py - y),
d2 = abs(qx - x) + abs(qy - y),
d3 = abs(rx - x) + abs(ry - y);
if(d1 == d2 && d2 == d3){
ans.emplace_back(x, y);
}
}
}
if(ans.size() >= 2){
cout << -1 << endl;
return 0;
}
cout << ans.size() << endl;
for(auto [x, y] : ans){
cout << x << " " << y << endl;
}
}