結果
| 問題 |
No.245 貫け!
|
| コンテスト | |
| ユーザー |
tails
|
| 提出日時 | 2015-07-17 23:00:16 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 519 bytes |
| コンパイル時間 | 1,099 ms |
| コンパイル使用メモリ | 158,616 KB |
| 実行使用メモリ | 6,940 KB |
| 最終ジャッジ日時 | 2024-07-08 09:24:50 |
| 合計ジャッジ時間 | 1,777 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 15 WA * 1 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
#define rep(i,n) for(int i=0;i<(n);++i)
int N;
struct P { int x,y; };
P p[100][2];
P l,m;
int f(P const & p){
return (p.x-l.x)*(m.y-l.y)-(p.y-l.y)*(m.x-l.x);
}
int main(){
cin>>N;
rep(i,N)cin>>p[i][0].x>>p[i][0].y>>p[i][1].x>>p[i][1].y;
int b=0;
rep(j,N)rep(jj,2)rep(k,j)rep(kk,2){
l=p[j][jj];
m=p[k][kk];
if(l.x!=m.x||l.y!=m.y){
int c=0;
rep(i,N){
if((long long)f(p[i][0])*f(p[i][1])<=0){
++c;
}
}
if(b<c)b=c;
}
}
cout<<b;
}
tails