vj1318 Jam&ccedil;š„&egrave;&reg;&iexcl;&aelig;•&deg;&aelig;&sup3;•

# Vj1318 Jamçš„è®¡æ•°æ³•

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

//±ÉÈËµÄ·½·¨ //µÝ¹é //´ÓµÚÒ»Î»¿ªÊ¼Ë³´ÎÃ¶¾Ù Ã¶¾ÙÍê×îºóÒ»Î»¾ÍÊä³ö / //´óÅ£µÄºÃ·½·¨ //ÏÈµÃµ½×îºóÒ»¸öJamÊý //´Ó×îºóÍùÇ°ÅÐ¶Ïµ±Ç°Êý Èç¹ûµ±Ç°Êý¸ÃÎ»Ð¡ÓÚ×îºóÒ»¸öÊýµÄ¸ÃÎ» Ôò¸ÃÎ»¿ÉÒÔ+1 ºóÃæµÄËùÓÐÎ»¶¼ÎªÇ°Ò»Î»+1 //ÒòÎªÊÇ´ÓºóÍùÇ°ÅÐ¶Ï ËùÒÔ±£Ö¤ÁËË³Ðò / var s,t,w,tot:integer; now,last:string[26]; procedure main; var i,j:integer; begin readln(s,t,w); readln(now); for i:=1 to w do last:=chr(97+t-i)+last; while (tot<5) and (now<>last) do begin for i:=w downto 1 do if now[i]<last[i] then begin now[i]:=chr(ord(now[i])+1); for j:=i+1 to w do now[j]:=chr(ord(now[j-1])+1); inc(tot);

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

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

## This note was uploaded on 02/21/2011 for the course CS 001 taught by Professor 001 during the Spring '11 term at Shandong University.

### Page1 / 2

Vj1318 Jamçš„è®¡æ•°æ³•

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

View Full Document
Ask a homework question - tutors are online