简单题 View Code #include <iostream>#include <cstdio>#include <cstdlib>#include <cstring>using namespace std;long long com(long long n, long long r){if (n - r < r) r = n - r;long long i, j, s = 1;for (i = 0, j =
dp注意要多dp出一段,因为有时候付钱需要超过100元再找钱。 求和函数accumulate需要包含头文件numeric,使用方法为sum = accumulate(f, f + n, 0); 求最大值函数max_element返回最大值指针,需要包含头文件algorithm,使用方法为max_value