题库首页 › 信息学奥赛 › 题目 12671

阅读程序(2) 第7-12题,组合题 01 #include 02 #include 03 #include 04 05 using namespace std; 06 07 const int MAXN = 105; 08 const int MAXK = 105; 09 10 int h[MAXN][MAXK]; 11 12 int f(int n, int m) 13 { 14 if (m == 1) return n; 15 if (n == 0) return 0; 16 17 int ret = numeric_limits ::max(); 18 for (int i = 1; i ::max(); 33 for (int k = 1; k > n >> m; 47 cout << f(n, m) << endl << g(n, m) << endl; 48 return 0; 49 } 假设输入的 n、m 均是不超过 100 的正整数,完成下面的判断题和单选题:

正确答案:判断题答案B。输入7 3时第19行min执行次数不是449,故错误。

试卷来源:2022 CSP-J入门级(第一轮)C++真题

本卷相关题目

在线做题 同科目题库