自定义函数之数字后移 解题思路:注意事项:参考代码:importjava.util.Scanner;publicclassMain{staticScannersc=newScanner(System.in);publicstaticvoidmain(String[]args){intN=sc.nextInt();int[] 题解列表 2024年03月17日 0 点赞 0 评论 628 浏览 评分:9.9
还是畅通工程 摘要:解题思路:最小生成树模版题注意事项:参考代码:#include<bits/stdc++.h> using namespace std; int f[1000]; struct node { …… 题解列表 2024年03月17日 0 点赞 0 评论 651 浏览 评分:9.9
2809: 菲波那契数列(C语言) 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){ int a,b[9999],i; scanf("%d", &a); b[0]=1,b[1]=1…… 题解列表 2024年03月18日 0 点赞 0 评论 646 浏览 评分:9.9
百鸡百钱 捆绑销售 容易理解 #includeintmain(){intcock=100/5;//100块能买20只公鸡inthen=100/3;//100块可以买33只母鸡intchicken=100;//假设将三只雏鸡捆一起卖那么100块可以买100捆inti,j,k;for(i=0;i 题解列表 2024年03月18日 1 点赞 0 评论 899 浏览 评分:9.9
线性动态规划c++版 解题思路:简单的线性规划前i个字符的最大松散值=max(算上第i个,不算第i个)算上第i个=前i-2个字符的最大松散值+i的权重不算第i个=前i-1个字符的最大松散值注意事项:参考代码:#includeusingnamespacestd;constintN=1000010;char 题解列表 2024年03月18日 0 点赞 0 评论 843 浏览 评分:9.9
猴子选大王(报数问题) 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main() { int n,m; while(scanf("%d %d",&n,&m)!=EOF) { int s=0; …… 题解列表 2024年03月18日 0 点赞 0 评论 646 浏览 评分:9.9
最长递增子序列 摘要:public static void main(String[] args) { Scanner scanner=new Scanner(System.in); int n=scanner…… 题解列表 2024年03月18日 0 点赞 0 评论 540 浏览 评分:9.9
Dijskra最短路径 摘要:解题思路:注意事项:参考代码:#include<bits/stdc++.h> using namespace std; const int N=55; int mp[N][N]; int n,…… 题解列表 2024年03月19日 0 点赞 0 评论 564 浏览 评分:9.9
报时助手——基础题目 摘要:解题思路:很简单,分情况讨论即可注意事项:参考代码:h, m = map(int, input().split()) # 时分 M = {0: 'zero', 1: '…… 题解列表 2024年03月19日 0 点赞 0 评论 741 浏览 评分:9.9
2827: 计算多项式的导函数 摘要:参考代码:n = int(input()) if n == 0: print(0) quit() arr = list(map(int, input().split())) …… 题解列表 2024年03月19日 0 点赞 0 评论 663 浏览 评分:9.9