vj1063 迎春舞会之集体

Vj1063 迎春舞会之集体

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
//±¾ÌâÊý¾Ý¹æÄ£´íÎó / //±ÉÈ˵ķ½·¨ //dp //Èý½ÇÐÎÓÐÁ½ÖÖÇé¿ö //¼â³¯Ï£ºf[i,j]:=min(f[i-1,j],f[i-1,j+2])+1 //¼â³¯ÉÏ£ºf[i,j]:=min(f[i+1,j-2],f[i+1,j])+1 / //±ÉÈ˵ÄÎÊÌâ //¾ÐÄàÓÚ×î´óÕý·½ÐεÄ×ö·¨ ÕÒ×óбµÄ×î´óÈý½ÇÐκÍÓÒбµÄ×±ßµÄСÕß //ÆäʵÕÒ×óбºÍÓÒб×î´óÈý½ÇÐεÄСÕß¼´¿É / const maxn=200; var n,ans:integer; g:array[0. .maxn] of boolean; f:array[0. .maxn] of integer; function min(x,y:integer):integer; begin if x<=y then exit(x); exit(y); end; procedure init; var i,j:integer; ch:char; begin readln(n); for i:=1 to n do begin for j:=1 to i-1 do read(ch); for j:=1 to (n-i+1) << 1 -1 do begin
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Background image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 2

Vj1063 &egrave;&iquest;Ž&aelig;˜&yen;&egrave;ˆž&auml;&frac14;š&auml;&sup1;‹&eacute;›†&auml;&frac12;“

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online