to_string的大作用 摘要:参考代码:#include<bits/stdc++.h> using namespace std; #define int long long bool haoshu(int i) { s…… 题解列表 2024年10月07日 1 点赞 0 评论 406 浏览 评分:0.0
蓝桥杯历届试题-数字游戏(暴力法) 摘要:解题思路:暴力循环注意事项:参考代码:#include<stdio.h>int main(){ int n,k,t; scanf("%d%d%d",&n,&k,&t); int a[…… 题解列表 2024年10月07日 0 点赞 0 评论 872 浏览 评分:9.9
C++使用Swap函数倒置字符串 摘要:解题思路:注意事项:参考代码:#include <iostream>using namespace std;int main(){ int num = 0;// 读入字符串长度 cin >…… 题解列表 2024年10月07日 0 点赞 0 评论 587 浏览 评分:0.0
会战兵力 是80万对60万 优势在我 摘要:解题思路:注意事项:参考代码:#include <bits/stdc++.h>using namespace std;typedef long long ll;int prime(ll x){ …… 题解列表 2024年10月07日 0 点赞 0 评论 427 浏览 评分:9.9
用最朴素的C语言(不用数组,字符)解决这类问题 解题思路:通过循环的方式使a反复除以10,直至a==0,程序终止,可求得a的位数。再进行分类讨论,因为位数不同情况也不同。注意事项:一定要把数据a存到数据b里,因为循环之后a最终会==0,导致之后输出的结果有误,即00000参考代码:#includeintmain(){inta, 题解列表 2024年10月07日 0 点赞 0 评论 592 浏览 评分:9.9
2825: 计算多项式的值 摘要:解题思路:注意事项:参考代码:#include <bits/stdc++.h>using namespace std;typedef long long ll;int main(){ ll n;…… 题解列表 2024年10月06日 0 点赞 0 评论 511 浏览 评分:0.0
1014: [编程入门]阶乘求和 摘要:解题思路:注意事项:参考代码:#include <bits/stdc++.h>using namespace std;typedef long long ll;int main(){ ll n,…… 题解列表 2024年10月06日 0 点赞 0 评论 765 浏览 评分:0.0
题目 1050: [编程入门]结构体之成绩记录 摘要:解题思路:注意事项:参考代码:#include <stdio.h> void input();void print(); int n;struct information{ char num[10]…… 题解列表 2024年10月06日 0 点赞 0 评论 1007 浏览 评分:0.0
沙子合并-区间动态规划(详细注释C++) 解题思路:1995年的经典题目,采用对区间进行动态规划的思想。每次合并的代价为两堆沙子数量之和,那么最后一次合并的代价就是所有沙子数量之和,当合成进行最后一次合并的两堆沙子所用的代价最小时,总代价最小。问题就变为选择某种区间划分方法,将[1,n]划分为两个大区间[1,k]和[k+1,n], 题解列表 2024年10月06日 0 点赞 0 评论 704 浏览 评分:9.9
1585:链表操作 ```cpp#includeusingnamespacestd;typedefstructnode{intshibu;intxubu;node*next;}node,*linklist;voidinitlist(linklist&L){L=newnode;if(L==NULL)return;L->ne 题解列表 2024年10月05日 0 点赞 0 评论 426 浏览 评分:0.0