Submission
Status:
PPPPPPTTTx
Subtask/Task Score:
60/100
Score: 60
User: APNICHANAN
Problemset: กางเต็นท์
Language: cpp
Time: 1.100 second
Submitted On: 2025-12-27 22:58:49
#include <bits/stdc++.h>
using namespace std;
int main()
{
priority_queue<int> pq;
int n;
cin >> n;
pair<int, int> c[n];
for (int i = 0; i < n; i++)
cin >> c[i].first >> c[i].second;
pq.push(0);
for (int i = 0; i < n; i++)
{
for (int j = i + 1; j < n; j++)
{
if (abs(c[i].first - c[j].first) == abs(c[i].second - c[j].second))
{
pq.push(abs(c[i].first - c[j].first));
}
}
}
cout << pq.top() << endl;
}