题解列表

筛选

编写题解 1034: [编程入门]自定义函数之数字分离

摘要:解题思路:将输入的四位数n进行对10取余,再除以10,得到各个位数的值后,加上48,放入字符型数组,在函数中直接按要求输出。注意事项:1.ASCII的存储方式与整形数据相似。所以可以用整形常量给字符型……

位运算基础

摘要:#include<bits/stdc++.h> using namespace std; #define int long long  int lowbit(int x) {     ret……

不难,但有点繁琐

摘要:#include<bits/stdc++.h> using namespace std; int main() { char c[20]; cin>>c; int sum=0; ……

2020: 快速排序练习

摘要:```cpp #include using namespace std; int n; int kspx(int a[]){ sort(a,a+n); for(int i=0;i……

1756: 整数奇偶排序

摘要:```cpp #include using namespace std; int px(long long a[]){ int j[10],o[10],x=0,y=0; for(int ……

1169: 绝对值排序

摘要:```cpp #include using namespace std; bool cmp(int x,int y){ return abs(x)>abs(y); } int px……