记录编号 |
433685 |
评测结果 |
AAAAAAAAAA |
题目名称 |
膜拜神犇 |
最终得分 |
100 |
用户昵称 |
Cooook |
是否通过 |
通过 |
代码语言 |
C++ |
运行时间 |
0.269 s |
提交时间 |
2017-08-05 19:19:34 |
内存使用 |
0.31 MiB |
显示代码纯文本
#include <bits/stdc++.h>
using namespace std;
int n,Ans;
struct Point{
int x,y;
inline void in(){scanf("%d%d",&x,&y);}
Point(int _,int __){x=_;y=__;}
Point(){}
};
inline Point operator - (Point a,Point b){return (Point){a.x-b.x,a.y-b.y};}
inline int Cross(Point a,Point b){return a.x*b.y-a.y*b.x;}
int main(){
freopen("trioxorz.in","r",stdin);
freopen("trioxorz.out","w",stdout);
scanf("%d",&n);
Point Cooook(0,0);
for(int i=1;i<=n;i++){
Point LadyLex,TS_Hugh,Ren_Ivan;
LadyLex.in();
TS_Hugh.in();
Ren_Ivan.in();
int Ans1=Cross(TS_Hugh-LadyLex,Cooook-LadyLex);
int Ans2=Cross(Ren_Ivan-TS_Hugh,Cooook-TS_Hugh);
int Ans3=Cross(LadyLex-Ren_Ivan,Cooook-Ren_Ivan);
if(Ans1>0&&Ans2>0&&Ans3>0)Ans++;
if(Ans1<0&&Ans2<0&&Ans3<0)Ans++;
}
printf("%d\n",Ans);
}