結果
| 問題 | No.3664 Manhattan Circumcenter |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2026-08-30 16:07:19 |
| 言語 | C++23 (gcc 15.3.0 + boost 1.92.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 771 bytes |
| 記録 | |
| コンパイル時間 | 2,063 ms |
| コンパイル使用メモリ | 335,012 KB |
| 実行使用メモリ | 6,528 KB |
| 最終ジャッジ日時 | 2026-08-30 16:07:26 |
| 合計ジャッジ時間 | 5,294 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge1_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 25 WA * 32 |
ソースコード
#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), S;
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 = -2000; y <= 2000; y++){
for(int x = -2000; x <= 2000; x++){
if(f(y, x, 0) == f(y, x, 1) && f(y, x, 1) == f(y, x, 2)){
S.emplace_back(y, x);
if(abs(y) > 1000 || abs(x) > 1000){
cout << "-1\n";
return 0;
}
}
}
}
cout << S.size() << '\n';
for(auto [y, x] : S) cout << y << " " << x << "\n";
}