結果
| 問題 |
No.1041 直線大学
|
| コンテスト | |
| ユーザー |
259_Momone
|
| 提出日時 | 2020-05-01 21:28:47 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 3 ms / 2,000 ms |
| コード長 | 541 bytes |
| コンパイル時間 | 1,402 ms |
| コンパイル使用メモリ | 168,732 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2024-11-16 07:45:38 |
| 合計ジャッジ時間 | 2,390 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 37 |
ソースコード
#include<bits/stdc++.h>
int main(){
using namespace std;
unsigned long N;
cin >> N;
vector<complex<long>> pts(N);
for(auto&& i : pts){
long x, y;
cin >> x >> y;
i = complex<long>{x, y};
}
unsigned long ans{0};
for(const auto& i : pts)for(const auto& j : pts)if(i != j){
unsigned long cnt{0};
for(const auto& k : pts)if((j - i).real() * (k - i).imag() == (j - i).imag() * (k - i).real())++cnt;
ans = max(ans, cnt);
}
cout << ans << endl;
return 0;
}
259_Momone