题解列表

筛选

1157: 亲和数

摘要:解题思路:注意事项:参考代码:#include <bits/stdc++.h>using  namespace std;int zys(int x){    int sum=0;    for(int……

循环移位(基础)

摘要:解题思路:  循环就是转圈  建议画图理解注意事项: 无参考代码:#include<iostream> using namespace std; const int N=10010; unsig……

1067: 二级C语言-分段函数(c++题解)

摘要:解题思路:x<0时求绝对值,x>=0并<2时求(x+1)的平方根,x>=2并<4时求(x+2)的5次方,否则求2x+5。注意事项:保留2位小数参考代码:#include <bits/stdc++.h>……

C++ 猴子偷逃问题

摘要: //整体思路:反向推理 #include using namespace std; int main() { int N;int s = 1;//表示桃子的数量 ……

琴海——计负均正——

摘要:解题思路:注意事项:参考代码:#include <stdio.h> void main() {     int i=0,a;     int neg=0,pos=0;     float s……

C语言简单易懂

摘要:解题思路:是空格跳过,不是空格输出!!!注意事项:参考代码:#include <stdio.h>int main (){    char a[100];    while (gets(a)){    ……

思路很简单,代码很友好(注释),也很短

摘要:解题思路:1.如果是*直接输出,else就考虑相邻元素,这里的相邻元素是核心,可以先考虑同一行和同一列的相邻元素(曼哈顿距离)abs(i - x) + abs(j - y) < 2 // 上下左右的相……