3061: 公共子序列-动态规划 摘要: #include #include #include using namespace std; int dp[205][205]; int m…… 题解列表 2024年03月05日 0 点赞 0 评论 283 浏览 评分:0.0
信息学奥赛一本通T1331-后缀表达式的值-Python 摘要:解题思路:定义一个Stack和对应的push和pop方法,然后将数字全部push进栈,然后根据操作符来eval计算,最后将结果pop出来。注意事项:参考代码:class Stack: def…… 题解列表 2024年03月05日 0 点赞 0 评论 409 浏览 评分:9.9
编写题解 2966: 最大质因子序列 摘要:解题思路:先找因数,在判断是不是质数。注意事项:参考代码:#include <stdio.h>#include <math.h>int yinshu(int c){ for (int i = 1; i…… 题解列表 2024年03月05日 0 点赞 0 评论 380 浏览 评分:9.9
记忆化搜索解法 摘要:``` import java.util.Arrays; import java.util.Scanner; public class Main { static int N; …… 题解列表 2024年03月05日 0 点赞 0 评论 336 浏览 评分:9.9
计负均正 使用C++语言编写 代码可能不是最简洁的 但是通俗易懂 容易理解 适合入门的 欢迎大家一起讨论 摘要:解题思路:注意事项:参考代码:#include <iostream>#include <iomanip>using namespace std;int main() { const int n …… 题解列表 2024年03月05日 0 点赞 0 评论 364 浏览 评分:0.0
编写题解 2002: 计算数字个数(Python) 摘要:解题思路:题解一:通过遍历字符串判断字符是否为数字参考代码:n=input() s1=0 for i in n: if i.isdigit(): s1+=1 prin…… 题解列表 2024年03月05日 0 点赞 0 评论 358 浏览 评分:0.0
蓝桥杯2023年第十四届省赛真题-冶炼金属 摘要:#include<iostream> using namespace std; const int MAX_N = 1e4 + 1; // 规定数据范围不超 int N, A[MAX_N], B…… 题解列表 2024年03月05日 0 点赞 0 评论 704 浏览 评分:9.9
平方差python解 摘要:解题思路:只有当x为奇数或4的倍数时才能拆分为两个数的平方差。注意事项:x-(x//2)求奇数的个数x//4求4的倍数的个数为了计算范围 [L, R] 内满足条件的数目,减去 f(L-1) 的目的是排…… 题解列表 2024年03月05日 0 点赞 1 评论 555 浏览 评分:6.0
java两种方式题解 动态规划、深度搜索(题目测试数据有坑,输入数据中有大于n的数据,会导致数组越界) 摘要: import java.util.*; public class Main { //1567 public static void main(String[] args) { …… 题解列表 2024年03月05日 0 点赞 0 评论 256 浏览 评分:9.9
台球碰撞问题 摘要:解题思路:注意事项:参考代码:#include<iostream>using namespace std;#include<math.h>//调用数学库函数//使用三角函数注意事项://1、包含头文件…… 题解列表 2024年03月05日 0 点赞 0 评论 357 浏览 评分:0.0