题解列表

筛选

数组的距离

摘要:#解题思路 首先,这道题数据量不大,也不难,我们只需要从小到大排序一遍,找两个相邻的不同数组里元素的差最小的那个就行了,对于不同数组的这个条件,我们进行简单的记录一下就行,只需要遍历一次就行,没必要……

以数组的形式

摘要:解题思路:注意事项:参考代码:# include<stdio.h>int main(void){    int n;    int array[55];    for(n=1;n<=4;n++)   ……

2819: 数字反转

摘要:``` #include using namespace std; int main(){ int a,ans=0; cin>>a; while(a){ ans=ans*10+……