結果
| 問題 | No.1041 直線大学 |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2026-09-09 17:23:56 |
| 言語 | C++23(gcc16) (gcc 16.1.0 + boost 1.92.0 + ACL) |
| 結果 |
WA
不安定
|
| 実行時間 | - |
| コード長 | 519 bytes |
| 記録 | |
| コンパイル時間 | 4,780 ms |
| コンパイル使用メモリ | 354,300 KB |
| 実行使用メモリ | 6,528 KB |
| 最終ジャッジ日時 | 2026-09-09 17:24:30 |
| 合計ジャッジ時間 | 6,609 ms |
|
ジャッジサーバーID (参考情報) |
judge2_0 / judge1_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 29 WA * 8 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
int main(){
int N;
cin >> N;
vector<pair<int, int>> A(N);
for (auto& [x, y] : A) cin >> x >> y;
int ans = 0;
for (int i = 0; i <= 100; i++){
int cnt = ranges::count_if(A, [&](auto x){return x.first == i;});
ans = max(ans, cnt);
}
for (int a = 0; a <= 100; a++){
for (int b = 0; b <= 100; b++){
int cnt = ranges::count_if(A, [&](auto x){return a*x.first+b == x.second;});
ans = max(ans, cnt);
}
}
cout << ans << endl;
}