定风波临江仙
定风波临江仙
全部文章
分类
归档
标签
去牛客网
登录
/
注册
定风波临江仙的博客
全部文章
(共6篇)
题解 | 括号配对问题
s = input() stack =[] for c in s: if c =='[' or c =='(': stack.append(c) elif c ==']'or c ==')': if len(stack) ==0: ...
2026-03-15
0
8
题解 | 小红的整数配对
n,k = map(int,input().split()) a = list(map(int,input().split())) a.sort() i = n-1 score = 0 while i>=1: if abs(a[i]-a[i-1])<=k: sco...
2026-03-14
0
8
题解 | 讨厌鬼进货
n,x = map(int,input().split()) total = 0 a = list(map(int,input().split())) b = list(map(int,input().split())) for i in range(n): total += min(a[i...
2026-03-14
0
5
题解 | 最大的差
m = int(input()) n = list(map(int,input().split())) n.sort() max_dif = n[-1]-n[0] print(max_dif)
2026-03-13
0
9
题解 | 校门外的树
#include<bits/stdc++.h> using namespace std; int main(){ int L,M,sum = 0; cin>>L>>M; vector<int> removed(L+1,0); ...
2026-03-13
0
6
题解 | 机器翻译
#include<bits/stdc++.h> using namespace std; int main(){ int m,n,miss = 0; deque<int> dic; cin>>m>>n; for(int ...
2026-03-13
1
6