题解列表

筛选

高精度乘法-结构体实现

摘要:解题思路:小学乘法运用到编程。。。注意事项:参考代码:#include<iostream>#include<cstring>using namespace std;struct bign{ int d……

位操作交换数字

摘要:解题思路:a^a=0  0^a=a注意事项:参考代码:#include<stdio.h>#define change(a,b) {a=a^b;b=a^b;a=a^b; }int main(){int ……

2135: 信息学奥赛一本通 T1271-潜水员

摘要:解题思路: 01 背包,f[i][j] 表示i氧j氮气瓶所需要的最小重量,(W) 重量维度优化省略, 因此以倒序遍历i,j 注意事项:当i - x 为负数时注意越界,因此取max(0,i-x)参考代码……

用c语言输出字符菱形

摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){ char a; scanf("%c",&a); printf("  %c",a); printf("\n"); ……

1738-排序(由小到大*多数据排序)

摘要:解题思路:用数组储存数据,两个for循环遍历数据,比较大小交换位置注意事项:会用到new获取数组大小参考代码:#include <iostream>using namespace std;void s……

无聊的星期六

摘要:解题思路:注意事项:参考代码:# include<stdio.h> int fun(int n) {    return (n<=3?n:fun(n-1)+fun(n-3)); } int ……