记录编号 112902 评测结果 AAAAAAAAAA
题目名称 膜拜神犇 最终得分 100
用户昵称 Gravatarteacher 是否通过 通过
代码语言 Pascal 运行时间 0.343 s
提交时间 2014-07-17 17:06:41 内存使用 0.17 MiB
显示代码纯文本
var n,i,sum,a,b,c:longint;
    x1,x2,x3,y1,y2,y3:integer;
begin
 assign(input,'trioxorz.in'); reset(input);
 assign(output,'trioxorz.out'); rewrite(output);
 readln(n);
 sum:=0;
 for i:=1 to n do begin
  readln(x1,y1,x2,y2,x3,y3);
  a:=x1*y2-y1*x2;
  b:=x2*y3-y2*x3;
  c:=x1*y3-x3*y1;
  if (a<0) and (b<0) and (c>0) then inc(sum)
  else if (a>0) and (b>0) and (c<0) then inc(sum);
 end;
 writeln(sum);
 close(input); close(output);
end.