2017年6月13日

Codility---CountFactors

摘要: Task description A positive integer D is a factor of a positive integer N if there exists an integer M such that N = D * M. For example, 6 is a factor 阅读全文

posted @ 2017-06-13 23:06 Hugh_Sun 阅读(417) 评论(0) 推荐(0) 编辑

2017年6月12日

Codlility---MinPerimeterRectangle

摘要: Task description An integer N is given, representing the area of some rectangle. The area of a rectangle whose sides are of length A and B is A * B, a 阅读全文

posted @ 2017-06-12 09:07 Hugh_Sun 阅读(265) 评论(0) 推荐(0) 编辑

Codility---MaxDoubleSliceSum

摘要: Task description A non-empty zero-indexed array A consisting of N integers is given. A triplet (X, Y, Z), such that 0 ≤ X < Y < Z < N, is called a dou 阅读全文

posted @ 2017-06-12 08:34 Hugh_Sun 阅读(336) 评论(0) 推荐(0) 编辑

2017年6月11日

Codility---MaxProfit

摘要: Task description A zero-indexed array A consisting of N integers is given. It contains daily prices of a stock share for a period of N consecutive day 阅读全文

posted @ 2017-06-11 11:27 Hugh_Sun 阅读(625) 评论(0) 推荐(0) 编辑

Codility---EquiLeader

摘要: Task description A non-empty zero-indexed array A consisting of N integers is given. The leader of this array is the value that occurs in more than ha 阅读全文

posted @ 2017-06-11 10:30 Hugh_Sun 阅读(384) 评论(0) 推荐(0) 编辑

Codility---Dominator

摘要: Task description A zero-indexed array A consisting of N integers is given. The dominator of array A is the value that occurs in more than half of the 阅读全文

posted @ 2017-06-11 10:00 Hugh_Sun 阅读(328) 评论(0) 推荐(0) 编辑

2017年5月17日

Codility---StoneWall

摘要: Task description You are going to build a stone wall. The wall should be straight and N meters long, and its thickness should be constant; however, it 阅读全文

posted @ 2017-05-17 00:16 Hugh_Sun 阅读(329) 评论(0) 推荐(0) 编辑

2017年5月16日

Codility---Nesting

摘要: Task description A string S consisting of N characters is called properly nested if: S is empty; S has the form "(U)" where U is a properly nested str 阅读全文

posted @ 2017-05-16 23:29 Hugh_Sun 阅读(491) 评论(0) 推荐(0) 编辑

2017年5月2日

Codility---Fish

摘要: Task description You are given two non-empty zero-indexed arrays A and B consisting of N integers. Arrays A and B represent N voracious fish in a rive 阅读全文

posted @ 2017-05-02 11:03 Hugh_Sun 阅读(150) 评论(0) 推荐(0) 编辑

2017年5月1日

Codility---MaxSliceSum

摘要: Task description A non-empty zero-indexed array A consisting of N integers is given. A pair of integers (P, Q), such that 0 ≤ P ≤ Q < N, is called a s 阅读全文

posted @ 2017-05-01 22:25 Hugh_Sun 阅读(347) 评论(0) 推荐(0) 编辑

导航