본문 바로가기

Computer Science/Algorithm

[Algorithm] Maximise Sum

Maximise Sum





[Problem]

배열의 크기를 나타내는 N과 다른 정수 M이 주어진다. 

(부분합 % M)의 최대값을 구하라.


[Input Format]


[Output Format]


[Constraints]

2<= N <=10^5

1<= M <= 10^14



[Solve]








'Computer Science > Algorithm' 카테고리의 다른 글

[Algorithm] Sherlock and Array  (0) 2016.04.11
[Algorithm] Snakes and Ladders: The Quickest Way Up  (0) 2016.04.08
[Algorithm] Grid Challenge  (0) 2016.03.28
[Algorithm] Utopian Tree  (0) 2016.03.21
Algorithm 진행 계획  (0) 2016.03.16