编写题解 1119: C语言训练-"水仙花数"问题1(循环解决) 摘要:解题思路:注意事项:参考代码:#include <stdio.h>int main(){ int n,c=0; scanf("%d", &n); int t = n; while (n != 0) …… 题解列表 2024年03月06日 1 点赞 0 评论 698 浏览 评分:10.0
C++老管家的忠诚(线段树做法) 摘要:区间查询,果断想到线段树,看了一下题解有很多用的st表,但感觉st表模板太难记了,线段树相对好记很多,还是线段树更香一点。树状数组也可以求最值但得改模板。参考代码:#include using nam…… 题解列表 2024年03月07日 0 点赞 0 评论 331 浏览 评分:10.0
利用类型转换解Hello, world! 摘要:解题思路:利用char,把int类型转换为char类型即可注意事项:参考代码:#include<iostream>using namespace std;int main(){int a = 0;wh…… 题解列表 2024年03月07日 1 点赞 0 评论 413 浏览 评分:10.0
A+B for Input-Output Practice (I) 摘要:解题思路:注意事项:参考代码:#include<iostream>using namespace std;int main(){ int a,b; while(cin>>a>>b) cou…… 题解列表 2024年03月07日 0 点赞 0 评论 703 浏览 评分:10.0
1290: 奶牛的锻炼 摘要:解题思路:注意事项:说实话没怎么看懂!参考代码:#include <iostream>using namespace std;int main(){ //d[i]代表第i分钟可以跑的路程 …… 题解列表 2024年03月10日 2 点赞 0 评论 457 浏览 评分:10.0
数的划分(深搜) 摘要:解题思路:注意事项:参考代码:#include<bits/stdc++.h> using namespace std; int n, m, ans; void dfs(int k,int s…… 题解列表 2024年03月11日 1 点赞 0 评论 394 浏览 评分:10.0
2680: 蓝桥杯2022年第十三届省赛真题-纸张尺寸 摘要:解题思路: 在这段代码中,int s = int(str1[1])-48; 的目的是将输入的字符串中的第二个字符转换为整数。这是因为输入的字符串表示的是一个数字,而不是一个…… 题解列表 2024年03月12日 1 点赞 0 评论 548 浏览 评分:10.0
C语言最简单易懂的01背包解法 摘要:解题思路:注意事项:参考代码:// DP动态规划 01背包#include<stdio.h>int main(){ int N, m, v[25], p[25], dp[30000] = { …… 题解列表 2024年03月12日 0 点赞 0 评论 497 浏览 评分:10.0
1113: C语言考试练习题_保留字母 摘要:解题思路:注意事项:参考代码:#include<stdio.h> #include<string.h> int main(){ char a[100]; gets(a); int l=strlen(a…… 题解列表 2024年03月14日 0 点赞 0 评论 368 浏览 评分:10.0
LETTERS(经典DFS) 摘要:解题思路:注意事项:参考代码:#include<iostream> #include<cstdio> using namespace std; int r, s,t1=0,t2;//r,s表示迷…… 题解列表 2024年03月14日 0 点赞 0 评论 563 浏览 评分:10.0