摘要: 题目链接 题解: 这道题太复杂了。。。主要是前两列最开始比较难想怎么做。 # Write your MySQL query statement below select t4.spend_date, t4.platform, if(t6.spend_date is null,0,t6.amount) 阅读全文
posted @ 2020-02-06 20:05 feibilun 阅读(273) 评论(0) 推荐(0) 编辑
摘要: 题目链接 题解1: 先排序,然后用自定义变量记录累计的score。 select gender,day,total from( select day, @s:=(if(gender=@g,@s+score_points,score_points)) as total, @g:=gender as g 阅读全文
posted @ 2020-02-06 18:04 feibilun 阅读(270) 评论(0) 推荐(0) 编辑
摘要: 题目链接 题解: 先用所有的边生成一棵最小生成树,然后从后往前不断删边,看此边有没有用到,用到的话重新跑生成树,没有的话结果不变。还是Kruskal方便些。。。 Prime: #include <bits/stdc++.h> # define LL long long using namespace 阅读全文
posted @ 2020-02-06 12:32 feibilun 阅读(132) 评论(0) 推荐(0) 编辑