結果
問題 | No.1041 直線大学 |
ユーザー |
|
提出日時 | 2020-06-28 02:56:09 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 364 bytes |
コンパイル時間 | 2,888 ms |
コンパイル使用メモリ | 196,300 KB |
最終ジャッジ日時 | 2025-01-11 13:11:17 |
ジャッジサーバーID (参考情報) |
judge3 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | WA * 3 |
other | WA * 37 |
ソースコード
#include<bits/stdc++.h>using namespace std;int gcd(int a,int b){if(a%b)return gcd(b,a%b);return b;}int main(){cin.tie(0),ios::sync_with_stdio(false);int n; cin>>n;unordered_map<int,int>m;for(int i=0;i<n;++i){int x,y; cin>>x>>y;int g=1;if(x!=0&&y!=0)g=gcd(x,y);++m[(x/g)*100+y/g];}int ans=2;for(auto&&i:m)ans=max(ans,i.second);}