Boostable

  博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

2014年2月10日

摘要: 1007. Maximum Subsequence Sum (25) Given a sequence of K integers { N1, N2, ..., NK }. A continuous subsequence is defined to be { Ni, Ni+1, ..., Nj } where 1 23intmain()4{5intK;6intdata[10000];7inti;8intflag;9while(scanf("%d",&K)!=EOF){10flag=0;11for(i=0;i=0)14flag=1;15}16if(flag==0). 阅读全文
posted @ 2014-02-10 22:07 Boostable 阅读(220) 评论(0) 推荐(0) 编辑

摘要: 1006. Sign In and Sign Out (25) At the beginning of every day, the first person who signs in the computer room will unlock the door, and the last one who signs out will lock the door. Given the records of signing in's and out's, you are supposed to find the ones who have unlocked a... 阅读全文
posted @ 2014-02-10 21:17 Boostable 阅读(335) 评论(0) 推荐(0) 编辑

摘要: 1005. Spell It Right (20) Given a non-negative integer N, your task is to compute the sum of all the digits of N, and output every digit of the sum in English. Input Specification: Each input file contains one test case. Each case occupies one line which contains an N (2#include3... 阅读全文
posted @ 2014-02-10 15:33 Boostable 阅读(153) 评论(0) 推荐(0) 编辑

摘要: 1004. Counting Leaves (30) A family hierarchy is usually presented by a pedigree tree. Your job is to count those family members who have no child. Input Each input file contains one test case. Each case starts with a line containing 0 2#include34intmain()5{6intN,M;7intTree[100][10... 阅读全文
posted @ 2014-02-10 15:07 Boostable 阅读(182) 评论(0) 推荐(0) 编辑