摘要:
Pat
Lost Boy Calling 。。。。
DLUTOJ 1331 Maximum Sum
传送门
Time Limit: 1 Sec Memory Limit: 128 MB
Description
You are given an array of size N and another integer M.Your target is to find the maximum value of sum of subarray modulo M.
Subarray is a continous subset of array elements.
Note that we need to find the maximum value of (Sum of Subarray)%M , where there are N*(N+1)/2 possible subarrays.
Input
First line contains T , number of test cases to follow. Each test case consits of exactly 2 阅读全文