题解列表

筛选

兰顿蚂蚁普通思路

摘要:解题思路:定义俩个方向数组int dx[] = {0, 1, 0, -1}; int dy[] = {1, 0, -1, 0};注意事项:主要是定义方向的变量黑色方块(direction + 3) %……

遍历每条对角线

摘要:# # 遍历每条对角线 m,n = map(int,input().split()) #m行n列 ans = 0 arr = [] for _ in ra……

超级超级简单的1124

摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){ char p[100]; scanf("%s",p); for(int i=0;p[i]!=&#39;\0&#3……

送分了........

摘要:解题思路:注意事项:参考代码:#include<stdio.h>#include<math.h>int main(){    int a,b;    double c=0;    scanf("%d ……

有规律的数列求和

摘要:解题思路:计算n次落地的高度,令高度为m,每次反弹都是原来的一半,所以可以用math.h库中的pow函数来计算0.5的n次方,即m * pow(0.5, n)                然后是总路……

最普通的解题方法

摘要:解题思路:注意事项:参考代码:#include<math.h>int main(){    int i,n,m;    float s1=0,s2=0;    scanf("%d %d",&n,&m)……

编写题解 1099: 校门外的树C++

摘要:```cpp #include /* 文件头可以随便,我喜欢万能头,这里也可以(注意有memset函数,要用cstring库): #include #include */ using ……