import java.util.Scanner;public class FinancialFormula {public static void main(String[] args) {Scanner scanner = new Scanner(System.in);final int N = 1010; // 定义数组大小int n = scanner.nextInt(); //
import java.util.*;public class Main {public static void main(String[] args) {Scanner input = new Scanner(System.in);int N = 100100; // 定义一个较大的常数Nlong[] t = new long[N]; // 存储任务的耗时long[] c = new l
只要懂如何进行矩阵乘法就好了,和注意一点数的大小范围就ok了! #include <iostream>using namespace std;const int N = 10010, D = 30;long long tmp[D][D], ans[N][N];int n, d;int Q[N][D], K[N][D], V[N][D], W[N];int main(){cin >