Cod sursa(job #195119)
Utilizator | Data | 16 iunie 2008 19:58:08 | |
---|---|---|---|
Problema | Cutii | Scor | 0 |
Compilator | fpc | Status | done |
Runda | Arhiva de probleme | Marime | 2.49 kb |
program cutii;
{$APPTYPE CONSOLE}
uses
SysUtils;
type cutie = record
x,y,z:integer;
ok,k:boolean;
end;
var j,max,o,q,s,t,c,i,n,m,b:integer;
v:array [1..3500] of cutie;
fin,fout:text;
{*---------------------------------------*}
begin
assign(fin,'cutii.in'); reset(fin);
assign(fout,'cutii.out'); rewrite(fout);
readln(fin,n,t);
for q:=1 to t do
begin
c:=0;
For i:=1 to n do
begin
readln(fin,v[i].x,v[i].y,v[i].z);
v[i].ok:=true;
v[i].k:=true;
end; max:=0;
for i:=1 to n do
//if v[i].ok then
begin
// o:=0;
c:=1;
for j:=1 to n do
begin
// if (v[j].ok) and (i<>j) then
// begin
// s:=v[j].x+v[j].y+v[j].z;
if (v[i].x>v[j].x) and (v[i].y>v[j].y) and (v[i].z>v[j].z) then
begin
//max:=s;
// o:=j;
c:=c+1;
end;
// end;
end;
{ if o > 0 then
begin
// v[i].ok:=false;
v[i].k:=false ;
v[o].k:=false;
v[o].ok:=false;//sa nu mai fie bagata in alta
//v[o].ok:=false;
// c:=c+1;
end; }
if c>max then max:=c;
end;
// for i:=1 to n do if not v[i].k then inc(c);
writeln(fout,c);
end;
close(fin);
close(fout);
end.