题解

273 条题解

  • 0
    @ 2009-10-29 20:35:09

    program p1057;

    var n,m,i,j,max:longint;

    a:array[1..1000,1..1000] of byte;

    f:array[0..1000,0..1000] of longint;

    function min(x,y,z:longint):longint;

    begin

    min:=x;

    if y

  • 0
    @ 2009-10-28 16:37:14

    ^_^

    老师昨天讲的就是这种题!

    10分钟不到就AC咯!

  • 0
    @ 2009-10-28 16:03:49

    编译通过...

    ├ 测试数据 01:答案正确... 0ms

    ├ 测试数据 02:答案正确... 0ms

    ├ 测试数据 03:答案正确... 0ms

    ├ 测试数据 04:答案正确... 0ms

    ├ 测试数据 05:答案正确... 0ms

    ├ 测试数据 06:答案正确... 0ms

    ├ 测试数据 07:答案正确... 0ms

    ├ 测试数据 08:答案正确... 0ms

    ├ 测试数据 09:答案正确... 0ms

    ├ 测试数据 10:答案正确... 0ms

    ---|---|---|---|---|---|---|---|-

    Accepted 有效得分:100 有效耗时:0ms

  • 0
    @ 2009-10-28 08:21:25

    program P1057;

    var

    i,j,n,m,ans:longint;

    f,a:array[0..1001,0..1001]of longint;

    function min(x,y,z:longint):longint;

    begin

    min:=x;

    if min>y then min:=y;

    if min>z then min:=z;

    end;

    begin

    readln(n,m);

    for i:=1 to n do

    for j:=1 to m do

    read(a);

    ans:=0;

    fillchar(f,sizeof(f),0);

    for i:=1 to n do

    for j:=1 to m do

    if a=1 then

    begin

    f:=min(f,f,f)+1;

    if f>ans then ans:=f;

    end;

    writeln(ans);

    end.

  • 0
    @ 2009-10-26 20:17:54

    方程有些意思

    编译通过...

    ├ 测试数据 01:答案正确... 0ms

    ├ 测试数据 02:答案正确... 0ms

    ├ 测试数据 03:答案正确... 0ms

    ├ 测试数据 04:答案正确... 0ms

    ├ 测试数据 05:答案正确... 0ms

    ├ 测试数据 06:答案正确... 0ms

    ├ 测试数据 07:答案正确... 0ms

    ├ 测试数据 08:答案正确... 0ms

    ├ 测试数据 09:答案正确... 0ms

    ├ 测试数据 10:答案正确... 0ms

    ---|---|---|---|---|---|---|---|-

    Accepted 有效得分:100 有效耗时:0ms

  • 0
    @ 2009-10-17 18:57:07

    From 永恒の灵魂

    盖房子

    编译通过...

    ├ 测试数据 01:答案错误... ├ 标准行输出

     ├ 错误行输出

    ├ 测试数据 02:答案错误... ├ 标准行输出

     ├ 错误行输出

    ├ 测试数据 03:答案错误... ├ 标准行输出

     ├ 错误行输出

    ├ 测试数据 04:答案错误... ├ 标准行输出

     ├ 错误行输出

    ├ 测试数据 05:答案错误... ├ 标准行输出

     ├ 错误行输出

    ├ 测试数据 06:答案正确... 0ms

    ├ 测试数据 07:答案错误... ├ 标准行输出

     ├ 错误行输出

    ├ 测试数据 08:答案错误... ├ 标准行输出

     ├ 错误行输出

    ├ 测试数据 09:答案错误... ├ 标准行输出

     ├ 错误行输出

    ├ 测试数据 10:答案错误... ├ 标准行输出

     ├ 错误行输出

    ---|---|---|---|---|---|---|---|-

    Unaccepted 有效得分:10 有效耗时:0ms

    var

    a,t:array[0..1001,0..1001] of integer;

    j,i,l,n,m:integer;

    function dui(x,y,z:integer):integer;

    begin

    if x>y then dui:=y else dui:=x;

    if dui>z then dui:=z;

    end;

    begin

    readln(n,m);

    fillchar(a,sizeof(a),0);

    for i:=1 to n do begin

    for j:=1 to m do

    begin

    read(a);

    if a=1 then

    a:=dui(a,a,a)+1;

    end;

    readln;

    end;

    for i:=1 to n do

    for j:=1 to m do

    if a>athen a:=a ;

    write(a);

    end.

    错哪里了 帮帮忙了

     

  • 0
    @ 2009-10-11 10:54:57

    数据简直太弱智了,裸搜+优化就能过@_@...

    编译通过...

    ├ 测试数据 01:答案正确... 0ms

    ├ 测试数据 02:答案正确... 0ms

    ├ 测试数据 03:答案正确... 0ms

    ├ 测试数据 04:答案正确... 0ms

    ├ 测试数据 05:答案正确... 0ms

    ├ 测试数据 06:答案正确... 0ms

    ├ 测试数据 07:答案正确... 0ms

    ├ 测试数据 08:答案正确... 0ms

    ├ 测试数据 09:答案正确... 0ms

    ├ 测试数据 10:答案正确... 212ms

    ---|---|---|---|---|---|---|---|-

    Accepted 有效得分:100 有效耗时:212ms

  • 0
    @ 2009-10-08 16:42:20

    编译通过...

    ├ 测试数据 01:答案正确... 0ms

    ├ 测试数据 02:答案正确... 0ms

    ├ 测试数据 03:答案正确... 0ms

    ├ 测试数据 04:答案正确... 0ms

    ├ 测试数据 05:答案正确... 0ms

    ├ 测试数据 06:答案正确... 0ms

    ├ 测试数据 07:答案正确... 0ms

    ├ 测试数据 08:答案正确... 0ms

    ├ 测试数据 09:答案正确... 0ms

    ├ 测试数据 10:答案正确... 0ms

    ---|---|---|---|---|---|---|---|-

    Accepted 有效得分:100 有效耗时:0ms

    long f[1001][1001];

    int main()

    {

    long i,j,c,n,m,maxn=99999999;

    scanf("%d%d",&n,&m);

    for (i=1;i

  • 0
    @ 2009-10-07 21:30:34

    haha

  • 0
    @ 2009-09-27 21:42:53

    0ms

  • 0
    @ 2009-09-23 13:03:24

    数据实在太弱!递归都对A

    var i,j,n,m,k,l,o,p:longint;

    a:array[0..1000,0..10000] of longint;

    procedure try(q,w,e:longint);

    var i,j,k:longint;

    begin

    k:=0;

    if e>p then p:=e;

    for i:=q to q+e do

    for j:=w to w+e do

    if a=0 then k:=1;

    if k=1 then exit else try(q,w,e+1);

    end;

    begin

    readln(n,m);

    for i:=1 to n do

    begin

    for j:=1 to m do

    read(a);

    readln;

    end;

    p:=0;

    for i:=1 to n do

    for j:=1 to m do

    if a=1 then try(i,j,1);

    writeln(p);

    end.

  • 0
    @ 2009-09-16 20:28:26
  • 0
    @ 2009-09-14 14:22:40

    so easy

  • 0
    @ 2009-09-13 14:00:36

    const

    maxn=1000;

    maxm=1000;

    maxmin=60000;

    var

    a:array[1..maxn,1..maxm]of 0..1;

    f:array[0..maxn,0..maxm]of word;

    n,m,i,j,max:word;

    function min(x,y,z:word):word;

    begin

    min:=maxmin;

    if x

  • 0
    @ 2009-09-11 20:17:18

    program ex;

    var i,j,n,m,ans:longint;

       f:array[1..1000,1..1000]of longint;

    procedure init;

       var i,j:longint;

      begin

       readln(n,m);

       for i:=1 to n do

        begin

         for j:=1 to m do read(f);

         readln;

        end;

      end;

      function min(a,b,c:longint):longint;

       var temp:longint;

       begin

        if a

  • 0
    @ 2009-09-09 22:45:59

    鄙视

    裸搜超3个点= =、

    program p1057;

    var a:array[1..1000,1..1000]of 0..1;

    i,j,n,m,l,p,k,s,t,t1:integer;

    procedure bj;

    begin

    if n>m then k:=m else k:=n;

    end;

    begin

    //read

    readln(n,m);

    for i:=1 to n do

    for j:=1 to m do

    read(a);

    //going

    p:=0;bj;s:=0;

    for l:=k downto 1 do

    for i:=1 to n-l+1 do

    for j:=1 to m-l+1 do

    begin

    for t:=i to i+l-1 do

    for t1:=j to j+l-1 do

    if a[t,t1]=1 then s:=s+1;

    if s=l*l then begin p:=l;writeln(p);halt;end;

    s:=0;

    end;

    end.

  • 0
    @ 2009-09-06 16:23:03

    编译通过...

    ├ 测试数据 01:答案正确... 0ms

    ├ 测试数据 02:答案正确... 0ms

    ├ 测试数据 03:答案正确... 0ms

    ├ 测试数据 04:答案正确... 0ms

    ├ 测试数据 05:答案正确... 0ms

    ├ 测试数据 06:答案正确... 0ms

    ├ 测试数据 07:答案正确... 0ms

    ├ 测试数据 08:答案正确... 0ms

    ├ 测试数据 09:答案正确... 0ms

    ├ 测试数据 10:答案正确... 0ms

    ---|---|---|---|---|---|---|---|-

    Accepted 有效得分:100 有效耗时:0ms

    简单的DP

    但枚举更简单

  • 0
    @ 2009-09-02 17:37:31

    鄙视自己,wa了3次~~

    全是细节~~~~

  • 0
    @ 2009-08-28 17:14:31

    晕...被水题阴了一下...没考虑类似于

    0 0 0

    1 0 0

    0 0 0

    的情况....叫了两次呃...

  • 0
    @ 2009-08-27 11:17:40

    编译通过...

    ├ 测试数据 01:答案正确... 0ms

    ├ 测试数据 02:答案正确... 0ms

    ├ 测试数据 03:答案正确... 0ms

    ├ 测试数据 04:答案正确... 0ms

    ├ 测试数据 05:答案正确... 0ms

    ├ 测试数据 06:答案正确... 0ms

    ├ 测试数据 07:答案正确... 0ms

    ├ 测试数据 08:答案正确... 0ms

    ├ 测试数据 09:答案正确... 0ms

    ├ 测试数据 10:答案正确... 0ms

    ---|---|---|---|---|---|---|---|-

    Accepted 有效得分:100 有效耗时:0ms

    program ex;

    var i,j,n,m,ans:longint;

    f:array[1..1000,1..1000]of longint;

    procedure init;

    var i,j:longint;

    begin

    readln(n,m);

    for i:=1 to n do

    begin

    for j:=1 to m do read(f);

    readln;

    end;

    end;

    function min(a,b,c:longint):longint;

    var temp:longint;

    begin

    if a

信息

ID
1057
难度
4
分类
动态规划 点击显示
标签
(无)
递交数
6650
已通过
3067
通过率
46%
被复制
8
上传者