编写题解 1149: C语言训练-计算1~N之间所有奇数之和 摘要:解题思路:注意事项:参考代码:#include<iostream>using namespace std;int main(){ int n; int sum =0; cin>>n;…… 题解列表 2022年03月27日 0 点赞 0 评论 377 浏览 评分:0.0
编写题解 1150: C语言训练-计算t=1+1/2+1/3+...+1/n 摘要:解题思路:注意事项:参考代码:#include #include using namespace std; int main() { int n; double sum =…… 题解列表 2022年03月27日 0 点赞 0 评论 768 浏览 评分:9.9
编写题解 1151: C语言训练-计算一个整数N的阶乘 摘要:解题思路:注意事项:参考代码:#include<iostream>#include <iomanip>using namespace std;int main(){ int n; int …… 题解列表 2022年03月27日 0 点赞 0 评论 314 浏览 评分:0.0
编写题解 1152: C语言训练-计算:t=1-1/(2*2)-1/(3*3)-...-1/(m*m) 摘要:解题思路:注意事项:参考代码:#include<iostream>#include <iomanip>#include<math.h>using namespace std;int main(){ …… 题解列表 2022年03月27日 0 点赞 0 评论 373 浏览 评分:0.0
利用getline()和istringstream()解决字符串读入空格问题 摘要: #include #include //STL中的set #include using namespace std; int main() …… 题解列表 2022年03月27日 0 点赞 0 评论 617 浏览 评分:9.9
九宫重排【Python】【BFS+降维+hash判重】 摘要:```python from collections import deque from typing import List direct = [3, -3, -1, 1] def chec…… 题解列表 2022年03月27日 0 点赞 0 评论 993 浏览 评分:9.9
方法论(买不到的数目,想不到的公式) 摘要:解题思路:就是简单记录一下这道真题和这个公式{x*y-x-y}注意事项: 注意此公式的前提是,两数不是全偶也不是全奇。参考代码: #include<…… 题解列表 2022年03月27日 0 点赞 0 评论 541 浏览 评分:0.0
三角形 基础Dp 摘要:**题目里说的是,每一步只能由当前位置向左下或右下,结果应该是右下和正下** 很基础的Dp,注意每次结算完后把数组初始化,其实也可以使用**一维Dp滚动数组优化空间**,太懒了,不想搞 代码如下,…… 题解列表 2022年03月27日 0 点赞 0 评论 399 浏览 评分:9.9
分分钟的碎碎念 序列型动态规划 摘要:序列型动态规划 **关键是寻找父亲节点,子节点长度在父亲节记录的长度+1** ```cpp #include #include #include using namespace std; …… 题解列表 2022年03月28日 0 点赞 0 评论 374 浏览 评分:9.9
简单dp-走方格 摘要:```python n,m = map(int,input().split()) dp = [[0 for j in range(m+1)] for i in range(n+1)] dp[1]…… 题解列表 2022年03月28日 0 点赞 0 评论 691 浏览 评分:0.0