日期排序(c++代码使用stl库) 摘要:解题思路:用sstream类分割字符串,再用vector容器存储起来,依次比较。注意事项:参考代码:#include<iostream> #include<string> #include<vec…… 题解列表 2024年10月15日 0 点赞 0 评论 300 浏览 评分:0.0
我AC的第一个难题 摘要:参考代码:#include<bits/stdc++.h>//100以内数的加减 using namespace std; bool jiancha(string s) { string…… 题解列表 2024年10月15日 1 点赞 0 评论 634 浏览 评分:9.9
2002: 计算数字个数(python) 摘要:### 无需多言,代码如下: ~~~python print(len([i for i in input() if i.isdigit()])) ~~~  摘要:### 代码如下 ~~~python a = [0] * 4 for i in input(): if i.isalpha(): a[0] += 1 e…… 题解列表 2024年10月15日 1 点赞 0 评论 327 浏览 评分:9.9
1052: [编程入门]链表合并(python) 摘要:### 代码如下: ~~~python n,m = map(int,input().split()) d = {} for i in range(m+n): k,v = map(…… 题解列表 2024年10月15日 3 点赞 0 评论 326 浏览 评分:10.0
编写题解 1045: [编程入门]自定义函数之整数处理 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int put(int a[]){ for(int i=0;i<10;i++){ scanf("%d",&a[i])…… 题解列表 2024年10月15日 0 点赞 0 评论 160 浏览 评分:0.0
使用01背包算法解题 摘要:解题思路:背包算法各平台都有介绍,先去了解算法思路,自己举一组数据,正序把所有值列出来就明白了。以下代码是采用的倒序遍历,相比较正序遍历,可以省去部分时间。参考代码:#include <stdio.h…… 题解列表 2024年10月15日 1 点赞 0 评论 384 浏览 评分:10.0
[信息学奥赛一本通T1551-维护序列] 线段树 摘要:# 巧妙的把懒标记传给子节点 ```cpp #include #define ULL unsigned long long #define LL long long #define endl…… 题解列表 2024年10月15日 0 点赞 0 评论 219 浏览 评分:9.9
1122: C语言训练-亲密数(python) 摘要:#### set() - 集合不会有重复元素,可以用来清理重复元素 - 集合是无序的,需要转成`list`然后用`sort()`排序 **二维数组排序** ~~~pytho…… 题解列表 2024年10月15日 0 点赞 0 评论 403 浏览 评分:9.9
连连看题解 摘要:解题思路:注意事项:参考代码:n, m = map(int, input().split())N = int(2e3+5)st1 = [[0] * N for _ in range(N)]st2 = …… 题解列表 2024年10月15日 2 点赞 0 评论 1224 浏览 评分:10.0