题解列表

筛选

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

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

C语言递归简单易懂

摘要:解题思路:注意事项:参考代码:#include <stdio.h>double f(double n){    if(n==1||n==0){        return 1;    }else{  ……

C语言简单易懂

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

琴海——计负均正——

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

C++ 猴子偷逃问题

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

C语言训练-"水仙花数"问题1

摘要:解题思路:注意事项:参考代码:#include<iostream>using namespace std;int main(){    int a,b,c,i;    bool p;    cin>>……

津津的储蓄计划

摘要:注意事项: 只有交给母亲的整钱才加20%,别忘了到最后可以还有余钱,没成整的 参考代码: ```c #include int main() { int a,k,sum=0; dou……