别踩我尾巴
别踩我尾巴
全部文章
分类
题解(9)
归档
标签
去牛客网
登录
/
注册
别踩我尾巴的博客
全部文章
(共25篇)
题解 | 合并区间
# 输入 保存为一对对的 列表存储 interval = [list(map(int,item.split(','))) for item in input().split()] # 按初始节点排序,即每个列表元素的第一项 interval.sort(key=lambda x:x[0]) # 初始化...
2025-09-17
0
16
题解 | 整数求和
def sumc(n, m): # 创建一个n+1行 m+1列的数组 dp = [[0]*(m+1) for _ in range(n+1)] #0到0组合成0只有一种 dp[0][0]=1 for i in range(1,n+1): for j in ...
2025-09-17
0
16
题解 | 整数反转
a = int(input()) is_negative = a<0 if is_negative: a = -a res = int(str(a)[::-1]) if is_negative: res = -res print(res)
2025-09-17
0
19
题解 | 检查SQL语句
SELECT vend_name FROM Vendors ORDER BY vend_name DESC; SELECT 和 from中间不要逗号order by 不是 order
2025-08-12
0
29
题解 | 单组_字符串
#include <algorithm> #include <iostream> using namespace std; int main() { int n; cin >>n; string s; cin >> s; ...
2025-04-04
0
70
题解 | 多组_二维数组_T组形式
#include <iostream> #include <map> #include <vector> using namespace std; int main() { int t; cin >> t; while (t-...
2025-04-04
0
50
题解 | 单组_一维数组
#include <iostream> using namespace std; int main() { long n,temp; long sum = 0; cin >> n; while (n--) { // 注意 while 处理多个...
2025-04-04
0
39
题解 | #遍历字典#
operators_dict={'<': 'less than','==': 'equal'}print('Here is the original dict:')keys=operators_dict.keys()for key in sorted(keys,reverse=False): ...
2023-08-30
0
278
题解 | #名单中出现过的人#
lst=['Tom', 'Tony', 'Allen', 'Cydin', 'Lucy', 'Anna']t=tuple(lst)print(t)name=input()if t.__contains__(name): print("Congratulations!")el...
2023-08-30
0
326
题解 | #生成数字列表#
lst=list(map(int,input().split()))print(lst)提问:map方法的含义是什么
2023-08-30
0
243
首页
上一页
1
2
3
下一页
末页