摘要:
http://codeforces.com/contest/236/problem/C 觉得这题挺有意思,贴一下代码。if(a<=0)or(b<=0)or(c<=0)then continue;这句一开始没写,WA了。注意多个数的LCM求法。 Codeprogram LCMchallenge;uses math;var i,j,k:longint; n,a,b,c,ans,temp:int... 阅读全文
posted @ 2012-10-23 16:58
ljlin
阅读(241)
评论(0)
推荐(0)
摘要:
A 迷路的VariantF (P2011) 没什么好说的,把bit打包到byte里,其实我以前一直以为boolean是1 bit。比赛的时候写挂了。 Codevar n,i,j,h,t:integer; dis,Q:array[1..1000] of integer; map:array[0..125000] of byte; ch:char;procedure setbit... 阅读全文
posted @ 2012-10-23 16:41
ljlin
阅读(148)
评论(0)
推荐(0)
摘要:
A 山坡探险 画图做吧,考差分的。注意到如果存在合法的山坡,一定是恰好走了hn-h0,然后其他的都抵消了。 Codeuses math;var m,n,hi,hn,t,count:longint; ch:char;beginreadln(n,hi,hn);while not eoln do begin read(ch);inc(m); case ch of 'U':t:=1; ... 阅读全文
posted @ 2012-10-23 16:07
ljlin
阅读(214)
评论(0)
推荐(0)

浙公网安备 33010602011771号