Submission

Status:
PPPPPPTTTT

Score: 60

User: Winzzwz

Problemset: กางเต็นท์

Language: cpp

Time: 1.095 second

Submitted On: 2025-03-05 12:13:36

#include <bits/stdc++.h>
using namespace std;
using ll = long long;

int n,x,y,mx;
vector <pair<int,int>> v;

int main() {
    cin.tie(0)->sync_with_stdio(0);
    cin >> n;
    for (int i = 1; i <= n; i++) {
        cin >> x >> y;
        for (int j = 0; j < v.size(); j++) {
            if (abs(v[j].first-x) == abs(v[j].second-y)) {
                mx = max(mx,abs(v[j].second-y));
            }
        }
        v.push_back({x,y});
    }
    cout << mx;

    return 0;
}