vj1480 恺撒密码

Vj1480 恺撒密码

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

View Full Document Right Arrow Icon
//±ÉÈ˵ķ½·¨ //f[i] ±íʾ´Ó i µ½ n ÐèÒªµÄ×îÉÙ·Ö¸î //f[i]=min(f[ i-j*j ] + 1) //ÒòΪҪʹ¾ØÐξ¡Á¿´ó j Ñ»·Ë³×ÅÀ´ <= f[i] ¾Í¸üР» //±ÉÈ˵ÄÎÊÌâ //ÍüÁËÅжϵÈÓÚ / const maxn=65536; var n:longint; s:array[0. .maxn] of char; f,path:array[0. .maxn+1] of longint; function min(x,y:longint):longint; begin if x<=y then exit(x) else exit(y); end; procedure init; begin n:=0; while not eoln do begin inc(n); read(s[n]); end; end; procedure main; var i,j,k,t:longint;
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.

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

Vj1480 恺撒密码

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