#define _USE_MATH_DEFINES #include #include #include #include #include //#include #include #include #include #include #include #include ///////// #define REP(i, x, n) for(int i = x; i < n; i++) #define rep(i,n) REP(i,0,n) #define P(p) cout<<(p)< ///////// typedef long long LL; typedef long double LD; ///////// using namespace::std; ///////// int N; vector > sline; int solve(PII L1,PII L2){ int ans=0; int T0,T1; rep(i,N){ T0 = (L1.first-L2.first)*(sline[i].first.second-L1.second)+ (L1.second-L2.second)*(L1.first-sline[i].first.first); T1 = (L1.first-L2.first)*(sline[i].second.second-L1.second)+ (L1.second-L2.second)*(L1.first-sline[i].second.first); if(T0*T1 <= 0){ ++ans; } } return ans; } int main(void){ std::cin.tie(0); std::ios::sync_with_stdio(false); std::cout << std::fixed;// //cout << setprecision(10);// cin>>N; if(N<=2){ P(N); return 0; } pair line; int x0,y0,x1,y1; rep(i,N){ cin>>x0>>y0>>x1>>y1; sline.push_back( pair(PII(x0,y0),PII(x1,y1) ) ); } int ans = 0,tans; for(int i=0;i