afterward

导航

 

2012年8月20日

摘要: 线段树,虽然没接触过也不太懂,但实用价值好像还蛮大的。View Code /*Sample Input15101 240 331 4 5231 34 51 5Sample OutputCase #1:8 7 6 4 27 4 2 -1 -19 8 7 6 4HintFor the first query, [1,3] has six subintervals: [1,1],[2,2],[3,3],[1,2],[2,3],[1,3]. Interval sums are 101,240,331,341,571,672, correspondence digital roots are 2,6,7 阅读全文
posted @ 2012-08-20 17:33 afterward 阅读(231) 评论(1) 推荐(0) 编辑