题解列表

筛选

2^k进制数 (C++代码)

摘要:解题思路:  题目的例子为例,长度为7位的01字串按3位一段就这样分:0 000 000。其中除了首段,每段都小于(111)2,也即小于2k,而首段自然是小于2w%k(对于w%k为0时也成立)了。  ……

DNA (C++代码)(直接上代码)

摘要:注意:(每组输出有一个空行)cout << endl;cout << endl;参考代码:#include<iostream>using namespace std;void show(int a,i……

汪汪与打针 (C语言代码)

摘要:解题思路:注意事项:参考代码:#define M 120    //妙三多的价格 #define Y 100    //疫苗的价格 #include <stdio.h> int main(v……

P1021 (C语言代码)

摘要:为什么运行结果是错的?参考代码:#include<iostream>#include<math.h>using namespace std;#define N 100int main(){ int a……

循环数组就好啦

摘要:解题思路:循环数组的思想就行拉注意事项:参考代码:#include<cstdio>#include <cstring>#include <ctype.h> using namespace std;in……