STL map解法 和为给定数 摘要:#include <bits/stdc++.h>using namespace std;typedef long long ll;const int N = 1e7 + 10;ll num[N];ma…… 题解列表 2024年11月14日 0 点赞 0 评论 231 浏览 评分:0.0
1107: 纪念品分组 摘要:解题思路:动态数组:vector<int>p(n)sort 对数组进行降序排序两重遍历,只要两项加起来小于等于w,就分为一组已分配好的纪念品置成-1(价格不会达到的数)第一重遍历会遇到已经分配好的纪念…… 题解列表 2024年11月14日 0 点赞 0 评论 357 浏览 评分:0.0
只用循环做出本题 摘要:解题思路:穷举每个情况注意事项:想好逻辑就行参考代码:#include<stdio.h>int main(){ int n; scanf("%d", &n); …… 题解列表 2024年11月14日 2 点赞 0 评论 492 浏览 评分:0.0
简单算法,易理解 摘要:解题思路:a和b分别接收字符串,用加号拼接注意事项:参考代码:a=input()b=input()print(a+b)…… 题解列表 2024年11月14日 0 点赞 0 评论 402 浏览 评分:0.0
最普通的解题方法 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){ int n,sum=0; scanf("%d",&n); sum=n*2+n*(n-1)/2*…… 题解列表 2024年11月14日 1 点赞 0 评论 312 浏览 评分:0.0
大一新生用C语言编写的 摘要:解题思路:不知道为啥用scanf,printf就不行注意事项:参考代码:#include<stdio.h>#include<string.h>void fanh(char a[]);//函数的声明in…… 题解列表 2024年11月14日 1 点赞 0 评论 534 浏览 评分:0.0
发工资咯 记way 摘要: #include using namespace std; int dir[] = { 100, 50, 10, 5, 2, 1 }; int main() {…… 题解列表 2024年11月14日 0 点赞 0 评论 415 浏览 评分:0.0
题解 1052: [编程入门]链表合并 摘要:解题思路:注意事项:参考代码:import java.util.Comparator; import java.util.Scanner; import java.util.TreeSet; …… 题解列表 2024年11月14日 0 点赞 0 评论 547 浏览 评分:0.0
火柴棒等式,暴力dfs 摘要:解题思路:注意事项:参考代码:#include"bits/stdc++.h" using namespace std; // 全局变量声明 int n, a[10005], b[10005] =…… 题解列表 2024年11月14日 1 点赞 0 评论 288 浏览 评分:0.0
1013: [编程入门]Sn的公式求和(最简单解法) 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){ int a=2,sum=0,i,n; scanf("%d",&n); for(i=0;i<n;…… 题解列表 2024年11月14日 4 点赞 0 评论 861 浏览 评分:0.0