Submission #5921225
Source Code Expand
#include <bits/stdc++.h>
using namespace std;
typedef pair<int, int> pii;
const int N = 55;
int n, maxi, x[N], y[N];
map<pii, int> cnt;
int main() {
ios::sync_with_stdio(false), cin.tie(0);
cin >> n;
for (int i = 0; i < n; i++)
cin >> x[i] >> y[i];
for (int i = 0; i < n; i++)
for (int j = 0; j < n; j++)
if(i != j)
cnt[pii(x[i] - x[j], y[i] - y[j])]++;
for (auto p: cnt)
maxi = max(maxi, p.second);
cout << n - maxi;
return 0;
}
Submission Info
| Submission Time | |
|---|---|
| Task | B - Picking Up |
| User | LODB |
| Language | C++14 (GCC 5.4.1) |
| Score | 300 |
| Code Size | 474 Byte |
| Status | AC |
| Exec Time | 2 ms |
| Memory | 384 KiB |
Judge Result
| Set Name | Sample | All | ||||
|---|---|---|---|---|---|---|
| Score / Max Score | 0 / 0 | 300 / 300 | ||||
| Status |
|
|
| Set Name | Test Cases |
|---|---|
| Sample | s1.txt, s2.txt, s3.txt |
| All | 01.txt, 02.txt, 03.txt, 04.txt, 05.txt, 06.txt, 07.txt, 08.txt, 09.txt, 10.txt, 11.txt, 12.txt, 13.txt, 14.txt, 15.txt, 16.txt, 17.txt, 18.txt, 19.txt, 20.txt, s1.txt, s2.txt, s3.txt |
| Case Name | Status | Exec Time | Memory |
|---|---|---|---|
| 01.txt | AC | 1 ms | 256 KiB |
| 02.txt | AC | 1 ms | 256 KiB |
| 03.txt | AC | 2 ms | 384 KiB |
| 04.txt | AC | 2 ms | 384 KiB |
| 05.txt | AC | 1 ms | 256 KiB |
| 06.txt | AC | 1 ms | 256 KiB |
| 07.txt | AC | 1 ms | 256 KiB |
| 08.txt | AC | 1 ms | 256 KiB |
| 09.txt | AC | 1 ms | 256 KiB |
| 10.txt | AC | 1 ms | 256 KiB |
| 11.txt | AC | 1 ms | 256 KiB |
| 12.txt | AC | 1 ms | 256 KiB |
| 13.txt | AC | 1 ms | 256 KiB |
| 14.txt | AC | 1 ms | 256 KiB |
| 15.txt | AC | 1 ms | 256 KiB |
| 16.txt | AC | 1 ms | 256 KiB |
| 17.txt | AC | 1 ms | 256 KiB |
| 18.txt | AC | 1 ms | 256 KiB |
| 19.txt | AC | 1 ms | 256 KiB |
| 20.txt | AC | 1 ms | 256 KiB |
| s1.txt | AC | 1 ms | 256 KiB |
| s2.txt | AC | 1 ms | 256 KiB |
| s3.txt | AC | 1 ms | 256 KiB |