- 资源勘探
- 2009-10-07 15:15:34 @
program vijos_t1050_3;
var n,m,i,j,s:longint;
a:array[0..1200,0..1200]of longint;
f:array[0..1500000]of longint;
procedure search(x,y:longint);
var i,j,k:longint;
begin
fillchar(f,sizeof(f),0);
for i:=1 to x do
for j:=1 to y do
f[a]:=f[a]+1;
for i:=1 to x do
for j:=1 to y do
if f[a]=1 then inc(s);
end;
begin
readln(n,m);
for i:=1 to n do
begin
for j:=1 to m do read(a);
readln;
end;
s:=0;
for i:=1 to n do
for j:=1 to m do
search(i,j);
writeln(s);
readln;
end.
3 条评论
-
ccw630 LV 10 @ 2009-10-07 19:46:02
优化优化再优化
-
2009-10-07 17:12:13@
好像要高级数据结构
RT
-
2009-10-07 16:32:32@
p1663
用正确的方法不超时。
- 1