牛客482915720号
牛客482915720号
全部文章
分类
归档
标签
去牛客网
登录
/
注册
牛客482915720号的博客
全部文章
(共14篇)
题解 | 均衡版 KMeans 分群与新用户归类
import sys line = sys.stdin.read().splitlines() line_iter=iter(line) input = lambda :next(line_iter) def read(t=int): return list(map(t,input()....
2026-04-11
0
23
题解 | 结构化剪枝后的分类预测
def read(t=int): return list(map(t,input().split())) N,D,C=read() xs,ws=[read(float) for _ in range(N)],[read(float) for _ in range(D)] ratio=flo...
2026-04-10
0
19
题解 | 三项评分线性定价
def read(t=int): return list(map(t,input().split())) K=int(input()) line2=read() N=int(input()) line4=read() trains=[] ys=[] tests=[] for i in r...
2026-04-10
0
20
题解 | 三项评分线性定价
def read(t=int): return list(map(t,input().split())) K=int(input()) line2=read() N=int(input()) line4=read() trains=[] ys=[] tests=[] for i in r...
2026-04-10
0
15
题解 | 多分类加权指标计算
def read(type): return list(map(type,input().split())) pred=read(int) gt=read(int) ws=read(float) # tp, fp, fn cs=[[0]*3 for _ in ws] for p,g i...
2026-04-07
1
24
题解 | 对称INT8量化方案
超级大模拟,务必小心写 import math def read(): M,N=map(int,input().split()) arr = [list(map(float,input().split())) for _ in range(M)] return arr,M,...
2026-04-07
0
25
题解 | 连续子序列
line=input() dc={} i,res=0,1 for j,c in enumerate(line): if c in dc: i=max(dc[c]+1,i) dc[c]=j res=max(j-i+1,res) print(res) 遍历所有右...
2026-04-07
0
13
题解 | 加速优化问题
# 分组背包 def main(groups,L,T)->float: dp = [(0,0)] for choices in groups: nxt = [] for t,c in choices: for t0,c0...
2026-04-04
0
25
题解 | 关闭工位
# 注意: [0,K] 所以K+1 def main(T,K,ds): INF = 10**18 # 很贴心的设置了ds长度为T-1,注意要i-1访问 dp = [[[INF,INF] for _ in range(K+1)] for _ in range(T)] ...
2026-04-04
0
24
题解 | 加速优化问题
# 分组背包 def main(groups,L,T): global_min = float('inf') groups = [[(0,0)]] + groups def dfs(cur_i,cur_t,cur_c): # print(f"i:{...
2026-04-04
0
26
首页
上一页
1
2
下一页
末页