1323 条题解
-
0我是天才他哥 LV 10 @ 2009-09-21 18:47:24
好裸的网络流模型,SAP+GAP+当前弧一次AC
const
maxn=100000;
maxm=400000;
var
fir,e,g,next:array [1..maxm] of longint;
d,vd:array [0..maxn] of longint;
n,m,u,v,i,ans,mm,k,num,total,n1,n2:longint;
flag:boolean;
function min(a,b:longint):longint;
begin
if a0 do
begin
v:=e[k];
if (g[k]>0)and(d>d[v]) then
begin
low:=dfs(v,min(g[k],flow-dfs));
dec(g[k],low);
if odd(k) then inc(g[k+1],low)
else inc(g[k-1],low);
inc(dfs,low);
if dfs=flow then exit
end;
k:=next[k]
end;
dec(vd[d]);
if vd[d]=0
then flag:=false;
inc(d);
inc(vd[d])
end;
procedure addedge(u,v,gx:longint);
begin
inc(mm);
e[mm]:=v;g[mm]:=gx;
next[mm]:=fir;
fir:=mm
end;
procedure build(u,v,gx:longint);
begin
addedge(u,v,gx);
addedge(v,u,0)
end;
begin
n:=2;
m:=1;
readln(n1,n2);
addedge(1,2,n1+n2);
vd[0]:=n;
flag:=true;
ans:=0;
while flag do
inc(ans,dfs(1,maxlongint));
writeln(ans);
end. -
02009-09-21 12:47:42@
program a+b problem;
var
q,a,z:integer;
begin
a:=123;
b:=500;
c:=a+b;
write(c);
end. -
02009-09-21 09:25:32@
var
a,b,c:integer;
begin
read(a,b);
c:=a+b;
write(c);
end. -
02009-09-20 22:01:47@
program p1000;
var
x,y,z:integer;
begin
readln(x,y);
z:=x+y;
writeln(z);
end. -
02009-09-20 10:51:45@
program ab;
var
a,b,c:real;
begin
readln(a,b);
c:=a+b;
writeln(c);
end. -
02009-09-19 17:50:43@
program ab;
var
a,b,c:real;
begin
readln(a,b);
c:=a+b;
writeln(c);
end. -
02009-09-19 09:44:48@
应该要用for循环吧
-
02009-09-18 21:09:47@
Program abi(input,output);
var
a,b,c:integer;
begin
read(a,b);
c:=a+b;
write(c);
end. -
02009-09-18 20:51:12@
太水了
-
02009-09-16 20:08:21@
吓唬吓唬新手。。
var
x,y:integer;
tx,ty:string;
l1,l2,i,j,k:longint;
a,b:array[0..100]of shortint;function max(a,b:longint):longint;
begin
max:=a;
if b>max then exit(b);
end;begin
fillchar(a,sizeof(a),0);
fillchar(b,sizeof(b),0);readln(x,y);
str(x,tx);
str(y,ty);l1:=length(tx);
l2:=length(ty);for i:=1 to l1 do val(tx[l1-i+1],a[i]);
for i:=1 to l2 do val(ty[l2-i+1],b[i]);
k:=max(l1,l2);
for i:=1 to k do
begin
a[i]:=a[i]+b[i];
a:=a+a[i] div 10;
a[i]:=a[i] mod 10;
end;
if a[k+1]>0 then inc(k);
for i:=k downto 1 do
write(a[i]);
end. -
02009-09-16 17:08:46@
Program abi(input,output);
var
a,b,c:integer;
begin
read(a,b);
c:=a+b;
write(c);
end. -
02009-09-16 15:34:32@
program PLUS;
var
a,b,c;integer
begin
readln(a,b);
c:=a+b;
writeln(c);
end. -
02009-09-16 13:12:44@
哧。。。
同学们尽情笑吧 -
02009-09-12 20:32:07@
#include
int main()
{
int a,b;
scanf("%d %d",&a,&b);
printf("\n%d",a+b);
return 0;
} -
02009-09-11 12:23:34@
progrom Plus;
var
a,b,c:integer;
begin
readln(a,b);
c:=a+b;
writeln(c);
end. -
02009-09-08 13:36:10@
program Plus;
var a,b:longint;
begin
readln(a,b);
writeln(a+b);
end. -
02009-09-03 15:25:49@
program Plus;
var a,b:longint;
begin
readln(a,b);
writeln(a+b);
end. -
02009-09-03 08:12:35@
program plus (input,output);
var x,y,z:integer;
begin
readln(x,y);
z:=x+y;
write(z);
end. -
02009-09-02 20:20:45@
var
x,y,c:longint;
begin
read(x,y);
c:=x+y;
write(c);
end. -
02009-09-02 17:48:59@
program exp1;
var a,b,c:longint;
begin
readln(a,b);
c:=a+b;
writeln(c);
readln
end.
信息
- ID
- 1000
- 难度
- 9
- 分类
- (无)
- 标签
- (无)
- 递交数
- 74446
- 已通过
- 28492
- 通过率
- 38%
- 被复制
- 223