1315: 田忌赛马 摘要:解题思路:1、先将田忌和齐王最快的马进行比较如果田忌的马更快则先赢一局2、如果田忌最快的马比齐王慢,则比较两者最慢的马,如果田忌的快则派出最慢的马赢下一局。3、如果1、2都不成立,则比较田忌最慢的马和…… 题解列表 2022年08月12日 0 点赞 0 评论 908 浏览 评分:10.0
C语言训练-角谷猜想(C语言) 摘要:解题思路:注意事项:参考代码:#include <stdio.h>#include <math.h>#include <string.h>int main(){ //若为偶数除以2,若为奇数…… 题解列表 2022年08月15日 0 点赞 0 评论 792 浏览 评分:10.0
蓝桥杯2016年第七届真题-路径之谜(DFS) 摘要:```cpp #include using namespace std; const int N = 21; int topCount[N]; int leftCount[N]; bo…… 题解列表 2022年08月16日 1 点赞 0 评论 582 浏览 评分:10.0
数组乘常数—2^(n+1)-2 摘要:解题思路:汉罗双塔的次数为2*2(^(n)-1);注意事项:参考代码:#include <stdio.h> #include <malloc.h> #include <string.h> int…… 题解列表 2022年09月13日 0 点赞 0 评论 593 浏览 评分:10.0
优质题解 【C语言】数字游戏:从暴力循环到精简代码 - DotcppXF 摘要:【解题思路】 将题目描述的游戏规则转化为数学规律问题,不断优化代码,解决【时间超限】和【数据超范围】两大难点。【1】常规解法(暴力循环求解) ① 直接按题目描述的规则写代码…… 题解列表 2022年10月04日 3 点赞 5 评论 1917 浏览 评分:10.0
实数的打印 摘要: #include #include #include using namespace std; int main() { floa…… 题解列表 2022年10月12日 2 点赞 0 评论 416 浏览 评分:10.0
递归标准题解 摘要:解题思路:注意事项:参考代码:#include<stdio.h>void f(int i,int x);int s[100]={0}; int s1[100]={0}; //s1[-1]=0; int…… 题解列表 2022年10月19日 0 点赞 0 评论 449 浏览 评分:10.0
[编程入门]矩阵对角线求和,最容易理解的解法,非常暴力 摘要:解题思路:注意事项:没有丝毫含金量参考代码:x=list(map(int,input().split()))y=list(map(int,input().split()))z=list(map(int…… 题解列表 2022年10月23日 2 点赞 0 评论 1141 浏览 评分:10.0
aaaaaaaaaaaaaaaaaaa 摘要:解题思路:注意事项:参考代码:#include <stdio.h>int main(){ int n; scanf("%d",&n); while(n--) …… 题解列表 2022年10月24日 0 点赞 0 评论 417 浏览 评分:10.0
二级C语言-平均值计算 摘要:``` #include using namespace std; int main() { int arr[10], sum = 0; for (int i = 0; …… 题解列表 2022年10月26日 1 点赞 0 评论 382 浏览 评分:10.0