蓝桥杯2014年第五届真题-分糖果(C语言) 摘要:解题思路:注意事项:参考代码://[蓝桥杯][2014年第五届真题]分糖果#include <stdio.h>int fun(int *a, int n) //判断糖果数是否相同{ int fl…… 题解列表 2021年04月15日 0 点赞 0 评论 524 浏览 评分:9.9
Python自己调用自己 摘要:a,n,m,x=map(int,input().split())def qiushu(zs,ss,s,dj): if dj==n-1: if zs==m: r…… 题解列表 2021年04月15日 0 点赞 0 评论 647 浏览 评分:9.9
2300题解——外卖店优先级 摘要:**题解分析:** `初始时时刻所有店的优先级都为0(最低)[用数组arr表示]` `每过1时刻:有订单的店arr[id-1] += 2*订单数(优先级+2);` `每一时刻的时候定义一数组ar…… 题解列表 2021年04月15日 0 点赞 0 评论 907 浏览 评分:9.9
优质题解 菜鸡的题解005——糖果 摘要:数位DP,动态规划(DP)的一种,在本题中表示为使用二进制表示糖果情况,第i位上为0代表第i种糖果不能吃到,为1则代表能吃到。用a[n]表示在二进制数为n时需要的最少糖果袋数,f[n]表示初始的n个糖…… 题解列表 2021年04月15日 0 点赞 0 评论 1361 浏览 评分:9.9
c++暴力解法(自写sort函数的第三个参数) 摘要:```cpp #include #include #include #include using namespace std; bool comp(vector a,vector…… 题解列表 2021年04月15日 0 点赞 0 评论 796 浏览 评分:9.9
c++解法(可读性强) 摘要:```cpp #include #include #include #include using namespace std; int main() { int n1,n2…… 题解列表 2021年04月15日 0 点赞 0 评论 558 浏览 评分:9.9
1095: The 3n + 1 problem Python解法(25行简单易懂) 摘要:解题思路:注意事项: i,j的大小不确定的,要分类来做,我第一次就错了参考代码:while True: t = False m = [] a, b = map(int,i…… 题解列表 2021年04月15日 0 点赞 0 评论 888 浏览 评分:9.9
c语言 求两对角线上的元素之和 摘要:解题思路:初看题目,求矩阵的两对角线上的元素之和,当时的第一想法就是遍历,将两条对角线分别算一下,加进s中。但后来细想加仔细审题,发现一些端倪,如果按照上面的想法,其实还是有一些问题。如果行列数是奇数…… 题解列表 2021年04月15日 0 点赞 1 评论 961 浏览 评分:9.9
C++版本——欧拉筛打表 摘要: #include using namespace std; bool flag[10010]; void f(){ //筛下打个表 flag[…… 题解列表 2021年04月15日 0 点赞 0 评论 621 浏览 评分:9.9
修改数组题解 摘要:解题思路:暴力模拟到并查集注意事项:参考代码:暴力模拟 没有ACN = int(input()) ##inputList = [int(temp) for temp in input().strip…… 题解列表 2021年04月15日 0 点赞 0 评论 658 浏览 评分:9.9