链接:https://ac.nowcoder.com/acm/contest/72369/D#include<bits/stdc++.h>using namespace std;#define N 3005long long a[N],f[N][N];//dp数组,dp[i][j]表示前i个数中除以k的余数为j的当前最大和int n,k;int main(){ cin >> n >> k; for(int i = 1; i <= n; i ++) {cin >> a[i];} memset(f,-0x3f,...