兰顿蚂蚁普通思路 摘要:解题思路:定义俩个方向数组int dx[] = {0, 1, 0, -1}; int dy[] = {1, 0, -1, 0};注意事项:主要是定义方向的变量黑色方块(direction + 3) %…… 题解列表 2024年11月26日 2 点赞 0 评论 509 浏览 评分:10.0
3051: 登山 有点难这还是入门题吗? 摘要:解题思路:注意事项:参考代码:#include"bits/stdc++.h" using namespace std; int main(){ // 定义变量n表示数组长度,a、b、c为…… 题解列表 2024年11月26日 0 点赞 0 评论 351 浏览 评分:0.0
灭有感情,全是for//和数学题解//(C语言 摘要:解题思路:for的自增设定注意事项:注释那里可直接代替前个for参考代码:#include<stdio.h>int main(){ int a,b,c,i; float sum1=0,sum2=0,s…… 题解列表 2024年11月26日 5 点赞 0 评论 1138 浏览 评分:0.0
遍历每条对角线 ##遍历每条对角线m,n=map(int,input().split())#m行n列ans=0arr=[]for_inrange(m):arr.append([int(i)foriininput().strip().split()])#两条对角线, 题解列表 2024年11月26日 3 点赞 0 评论 1342 浏览 评分:10.0
超级超级简单的1124 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){ char p[100]; scanf("%s",p); for(int i=0;p[i]!='\0…… 题解列表 2024年11月26日 0 点赞 1 评论 540 浏览 评分:0.0
利用数学思维和for循环来解答,清晰明了 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){ int i,h; double S=0,s,H; scanf("%d",&h); H=h…… 题解列表 2024年11月26日 1 点赞 0 评论 594 浏览 评分:0.0
送分了........ 摘要:解题思路:注意事项:参考代码:#include<stdio.h>#include<math.h>int main(){ int a,b; double c=0; scanf("%d …… 题解列表 2024年11月26日 0 点赞 0 评论 416 浏览 评分:0.0
有规律的数列求和 摘要:解题思路:计算n次落地的高度,令高度为m,每次反弹都是原来的一半,所以可以用math.h库中的pow函数来计算0.5的n次方,即m * pow(0.5, n) 然后是总路…… 题解列表 2024年11月26日 0 点赞 0 评论 818 浏览 评分:0.0
最普通的解题方法 摘要:解题思路:注意事项:参考代码:#include<math.h>int main(){ int i,n,m; float s1=0,s2=0; scanf("%d %d",&n,&m)…… 题解列表 2024年11月26日 0 点赞 0 评论 452 浏览 评分:0.0
编写题解 1099: 校门外的树C++ ```cpp#include/*文件头可以随便,我喜欢万能头,这里也可以(注意有memset函数,要用cstring库):#include#include*/usingnamespacestd;intmain(){intL[10001],a, 题解列表 2024年11月26日 7 点赞 1 评论 1233 浏览 评分:8.0