题解列表
2019: 滚动的榜单(C语言版)
摘要:解题思路:由题意得:第m个选手的名次只需要和第1—(m-1)个人的成绩相比较注意事项:arr[3000]数组容量要注意,看清题意,我刚开始做的时候,容量定义50,系统判别就是不对。参考代码:#incl……
金陵十三钗(超简单DFS+剪枝)
摘要:解题思路:记录一个最大值,如果当前搜索过程中的最大值 + 剩下层数 * maxv <= res 则不可能更新最大值 , 直接return 故只需要加一句剪枝代码: if (s + (n……
蓝桥杯2013年第四届真题-买不到的数目 (java语言) 暴力破解
摘要:解题思路:看下面的注释(我也是参考前面大佬的~~)注意事项:定义数组的时候要防止数组越界。参考代码:import java.util.*;
public class Main{
publi……
2009: 第一个带类的C++程序
摘要:解题思路:本题输入的不是3个整数而是字符串,所以难点在于如何高效的把字符串转成数字。我的想法是把输入的读入一个char数组,遍历此数组,遇到'-'就切换,遇到数字就加到另一个存放日期数……
数据结构-链表的基本操作(c++)
摘要:#include <iostream>
#include <cstring>
#include <string>
#include <stdlib.h>
using namespace std……
报数问题c语言代码,求交流
摘要:# include <stdio.h>
int len; //表示围成圈的总人数
int main(){
scanf("%d", &len);
int j = 0, i = ……
蓝桥杯基础练习VIP-时间转换C++
摘要:#include<iostream>using namespace std;int main() { int n,h,m,s,a; cin >> n; h = n / 3600; ……
蓝桥杯基础练习VIP-回形取数C++bfs
摘要:```cpp
#include
#include
using namespace std;
typedef pairPII;
const int N = 200;
int a[N][N],……
python-贪吃的大嘴
摘要:解题思路:一维费用背包问题(多重背包)注意事项:参考代码:from cmath import inf
def f(n,m):
dp = [inf for j in ra……