摘要:
http://codeforces.com/gym/101873 C 多开一维状态记录时间,d[i][t] = 经过时间t走到节点i的最小花费 每一个状态分别向“原地等待”与“前往下一个节点”转移 代码: include include include include include using n 阅读全文
摘要:
http://codeforces.com/gym/101372 D push1[i][k]:所有操作1总共要让节点i下推多少系数k push2[i][k]:所有操作2总共要让节点i上推多少系数k sum1[i][k]:所有操作1节点i要计算多少系数k sum2[i][k]:所有操作2节点i要计算多 阅读全文
摘要:
http://codeforces.com/gym/101873 F 先对原图跑一遍匈牙利得到原始最大匹配,再遍历每个出度 1的点,考虑若新加入点,能否找到增广路,若可行则答案对应增加 代码: include include include include include include using 阅读全文