排水打水问题dp方法 摘要:对于第i个打水的人来说,他所花的时间为上一个在该水龙头打水的人所需的时间+自己打水所需的时间#include <iostream>#include <bits/stdc++.h>using names…… 题解列表 2021年06月04日 1 点赞 0 评论 625 浏览 评分:6.0
蛇行矩阵的递归解法 摘要:解题思路:(1)通过阶层求出需要填充的最大的数max(2)采用递归的方式对整个数组进行遍历 我们可以发现数组下标每次都是上一个元素的 行数-1(i-1)列数+1(j+1),…… 题解列表 2021年06月04日 0 点赞 0 评论 305 浏览 评分:9.9
[编程入门]分段函数求值-题解 摘要:解题思路:x<1时,y=x;x>=10时,y=3*x-11;其他x的情况(即1=<x<10时),y=2*x-1;注意事项:1、函数分三段,任给x只需要进行两次判断【if()里面一次,else if()…… 题解列表 2021年06月04日 0 点赞 0 评论 561 浏览 评分:0.0
运用STL的写法 摘要:解题思路:list中merge函数;注意事项:参考代码:#include<iostream> #include<set> #include<map> #include<list> #inclu…… 题解列表 2021年06月03日 0 点赞 1 评论 778 浏览 评分:9.9
题解 1020: [编程入门]猴子吃桃的问题(C代码,递归实现) 摘要:解题思路:注意事项:参考代码:#include <stdio.h> int taozi(int a); int main() { int t; scanf( "%d", …… 题解列表 2021年06月03日 0 点赞 0 评论 743 浏览 评分:9.9
题解 1192: 十->二进制转换 摘要:参考代码:#include <stdio.h>#include <stdlib.h>int main(){ int x; while(scanf("%d",&x)!=EOF) { …… 题解列表 2021年06月02日 0 点赞 0 评论 489 浏览 评分:0.0
题解 1783: 星期判断机(C代码) 摘要:解题思路:注意事项:参考代码:#include <stdio.h> int main() { int a; scanf( "%d", &a ); switch(a) …… 题解列表 2021年06月02日 0 点赞 0 评论 975 浏览 评分:9.9
扑克排序c++简单思路 摘要:解题思路:把字符都看成数字讲‘J’看成11,‘Q’看成12以此类推,然后判断花色将方块看成1,梅花看成2,红桃看成3,黑桃看成4。用STL库里中的sort排序算法,但是这里用的是结构体还要另外写一个判…… 题解列表 2021年06月02日 0 点赞 0 评论 496 浏览 评分:9.9
题解(找规律,列出数列) 摘要:解题思路:// 1 2 3 4 5 6 7 8 9 10// 1 2 3 4 6 9 13 19 28 41注意事项:参考代码:#include <bits/stdc++.h> using…… 题解列表 2021年06月01日 0 点赞 0 评论 261 浏览 评分:0.0
用C语言筛选N以内的素数 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){ int n; scanf("%d",&n); int i=2,j=2,m=1; for(…… 题解列表 2021年06月01日 0 点赞 0 评论 218 浏览 评分:0.0