結果
| 問題 | No.2315 Flying Camera |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2023-05-26 22:58:07 |
| 言語 | C++17 (gcc 15.2.0 + boost 1.90.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 664 bytes |
| 記録 | |
| コンパイル時間 | 2,412 ms |
| コンパイル使用メモリ | 200,872 KB |
| 実行使用メモリ | 6,400 KB |
| 最終ジャッジ日時 | 2026-06-30 19:05:12 |
| 合計ジャッジ時間 | 3,532 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 8 WA * 16 |
ソースコード
#include <iostream>
#include <iomanip>
#include <stack>
#include <queue>
#include <string>
#include <vector>
#include <cmath>
#include <algorithm>
#include <deque>
#include <set>
#include <map>
#include <bitset>
#include <atcoder/all>
#define rep(i,n) for(int i = 0; i < n; i++)
using namespace std;
using namespace atcoder;
using ll = long long;
int main() {
int n;
cin >> n;
vector<int> x(n), y(n);
for (int i = 0; i < n; i++) {
cin >> x[i] >> y[i];
}
ll ans = 1000000009;
for (int i = 1; i <= 300; i++) {
ll tmp = 0;
for (int j = 0; j < n; j++) {
tmp += abs(i - x[j]) + abs(i - y[j]);
}
ans = min(ans, tmp);
}
cout << ans << endl;
}