题解

1323 条题解

  • 0
    @ 2009-10-13 19:06:28

    var

    en,et,ec,eu,ep,ex:Array[0..250000] of longint;

    dis:array[0..1000] of longint;

    v:array[0..1000] of boolean;

    i,j,k,n,m,w,cost,l:longint;

    a,b,ans,left,right:longint;

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

    begin

    if a0)and not v[et[i]] and(dis[et[i]]+ec[i]=dis[no]) then

    begin

    d:=aug(et[i],min(m,eu[i]));

    if d>0 then

    begin

    dec(eu[i],d);

    inc(eu[ep[i]],d);

    ex[no]:=i;

    exit(d);

    end;

    end;

    i:=en[i];

    end;

    ex[no]:=i;

    exit(0);

    end;

    function modlabel:boolean;

    var

    d,i,j:longint;

    begin

    d:=maxlongint;

    for i:=1 to n do

    if v[i] then

    begin

    j:=en[i];

    while j0 do

    begin

    if (eu[j]>0)and not v[et[j]] and(ec[j]-dis[i]+dis[et[j]]0 do

    fillchar(v,sizeof(v),0);

    until modlabel;

    work:=cost;

    end;

    function solve(x,d:longint):longint;

    var i,k,t,p,last,cost,lk:longint;

    begin

    fillchar(en,sizeof(en),0);

    fillchar(dis,sizeof(dis),0);

    k:=0; n:=2; t:=x; p:=0;

    while x0 do

    begin

    k:=k+x mod 10;

    x:=x div 10;

    inc(p);

    end;

    n:=1; x:=t; l:=k+p+1; last:=1; cost:=1; lk:=0;

    while x0 do

    begin

    k:=x mod 10;

    for i:=1 to k do

    begin

    inc(n);

    build(last,n,1,-cost);

    build(n,last+k+1,1,0);

    end;

    cost:=cost*10;

    inc(n);

    if last1 then

    begin

    if lk

  • 0
    @ 2009-10-13 17:05:02

    program yhn;

    var a,b,c:longint;

    begin

    readln(a,b);

    c:=a+b;

    writeln(c);

    end.

  • 0
    @ 2010-03-18 11:58:00

    张仰彪求和法可解此题,鉴定完毕

  • 0
    @ 2009-10-11 11:05:20

    vijos怎么偷数据????????????????????????????????????????????????????????????????????

  • 0
    @ 2009-10-09 13:20:53

    main(a,b){scanf("%d%d",&a,&b);printf("%d\n",a+b);exit(0);}

  • 0
    @ 2009-10-08 17:20:47

    program ab;

    var a,b:integer;

    begin

    readln(a,b);

    writeln(a+b);

    end.

  • 0
    @ 2009-10-15 16:17:18

    INV

    program z(input,output);

    var

    a,b,c:integer;

    begin

    read(a,b);

    c:=a+b;

    writeln(c);

    end.

  • 0
    @ 2009-10-07 11:10:30

    位运算 a+b 用位运算给他一直加1

    var a,b,c,d,n,i:longint;

    begin

    readln(a,b);

    for i:=1 to b do

    begin

    c:=a; n:=1;

    b:=1;

    while b and c0 do

    begin

    a:=a and (not (1 shl (n-1)));

    c:=c shr 1;

    inc(n);

    end;

    a:=a or (1 shl (n-1));

    end;

    writeln(a);

    end.

  • 0
    @ 2009-10-06 23:07:37

    var

    a,b,c:longint;

    begin

    randomize;

    readln(a,b);

    repeat

    c:=random(32767*2+1);

    until c=a+b;

    writeln(c);

    end.

    这样…………也能过…………

  • 0
    @ 2009-10-06 19:20:56

    v

    a

    r

    a

    ,

    b

    :

    i

    n

    t

    6

    4

    ;

    b

    e

    g

    i

    n

    r

    e

    a

    d

    l

    n

    (

    a

    ,

    b

    )

    ;

    w

    r

    i

    t

    e

    (

    a

    +

    b

    )

    ;

    e

    n

    d

    .

  • 0
    @ 2009-10-06 08:50:37

    program Plus;

    var a,b:longint;

    begin

    readln(a,b);

    writeln(a+b);

    end.

  • 0
    @ 2009-10-05 12:39:51

    program ex01;

    var

    a,b,c:integer;

    begin

    readln(a,b);

    c:=a+b;

    writeln(c);

    end.

  • 0
    @ 2009-10-04 20:34:52

    #include

    int main()

    {

    int a,b;

    scanf("%d,%d",&a,&b);

    printf("\n%d",a+b);

    return 0;

    }

  • 0
    @ 2009-09-28 17:00:43

    #include

    int main()

    {

    int a,b;

    scanf("%d %d",&a,&b);

    printf("\n%d",a+b);

    return 0;

    }

  • 0
    @ 2009-09-27 10:30:40

    program aa;

    var x,y,z:longint;

    begin

    read(x,y);

    z:=x+y;

    write(z);

    end.

  • 0
    @ 2009-09-26 15:00:08

    program Ltr;

    const maxn=52;

    type gjd=record l:integer;nu:array[0..maxn] of longint;end;

    var i,j,k,m,n,s,tmp,tp1,tp2,ii:longint;

    st,st1:string;

    a,b,c:gjd;

    procedure myget(var x:gjd);

    begin

    readln(st);

    tmp:=length(st);

    tp2:=3-(tmp-1) mod 4;

    st1:='';

    for i:=1 to tp2 do st1:=st1+'0';

    st:=st1+st;

    inc(tmp,tp2);

    tp1:=tmp div 4;

    x.l:=tp1;

    j:=tmp-3;

    with x do

    for i:=1 to tp1 do begin

    val(copy(st,j,4),nu[i]);

    dec(j,4);

    end;

    end;

    procedure myplus(var x,y,z:gjd);

    begin

    tmp:=x.l;tp1:=y.l;

    if tmp9999 then begin

    dec(z.nu[i],10000);

    inc(z.nu);

    end;

    end;

    if z.nu[tmp+1]>0 then inc(tmp);

    z.l:=tmp;

    end;

    procedure myprint(var x:gjd);

    begin

    with x do begin

    write(nu[l]);

    tmp:=l-1;

    for i:=tmp downto 1 do begin

    tp1:=nu[i];

    if tp1

  • 0
    @ 2009-09-25 22:14:01

    var

    x,y:integer;

    begin

    read(x,y);

    writeln(x+y);

    end.

  • 0
    @ 2009-09-23 20:39:55

    #include

    using namespace std;

    int main(){

    int a,b;

    cin>>a>>b;

    cout

  • 0
    @ 2009-09-23 20:07:06

    program xl1;

    var a,b:longint;

    begin

    read(a,b);

    write(a+b);

    end.

  • 0
    @ 2009-09-22 21:34:12

    program asa;

    var

    a,b:integer;

    begin

    read(a,b);

    writeln(a+b);

    end.

信息

ID
1000
难度
9
分类
(无)
标签
(无)
递交数
74446
已通过
28492
通过率
38%
被复制
223