比赛 20120706 评测结果 ATTTTTTTTA
题目名称 校草 最终得分 20
用户昵称 isabella 运行时间 0.000 s
代码语言 Pascal 内存使用 0.00 MiB
提交时间 2012-07-06 10:53:06
显示代码纯文本
var
 a:array[1..100000,1..4]of longint;
 v:array[1..100000]of boolean;
 m,n,i,j:longint;

begin
assign(input,'hjjhvf.in');reset(input);
assign(output,'hjjhvf.out');rewrite(output);
 readln(n);
 for i:=1 to n do
  read(a[i,1],a[i,2],a[i,3],a[i,4]);
 fillchar(v,sizeof(v),0);
 m:=0;

 for i:=1 to n do
  for j:=1 to n do
   if v[j]=false then
   begin
    if((a[i,1]<a[j,1])and(a[i,2]<a[j,2])and(a[i,3]<a[j,3]))or
      ((a[i,4]<a[j,4])and(a[i,2]<a[j,2])and(a[i,3]<a[j,3]))or
      ((a[i,1]<a[j,1])and(a[i,2]<a[j,2])and(a[i,4]<a[j,4]))or
      ((a[i,1]<a[j,1])and(a[i,4]<a[j,4])and(a[i,3]<a[j,3]))then
      begin inc(m);v[j]:=true;end;
   end;

 writeln(m);
 for i:=1 to n do if v[i] then writeln(i);
 close(input);close(output);
end.