上一页 1 2 3 4 5 6 ··· 9 下一页
摘要: 链接 http://acm.hdu.edu.cn/showproblem.php?pid=2612 题目描述 Pass a year learning in Hangzhou, yifenfei arrival hometown Ningbo at finally. Leave Ningbo one 阅读全文
posted @ 2020-11-12 20:09 CrosseaLL 阅读(58) 评论(0) 推荐(0) 编辑
摘要: 链接 http://acm.hdu.edu.cn/showproblem.php?pid=1495 题目描述 大家一定觉的运动以后喝可乐是一件很惬意的事情,但是seeyou却不这么认为。因为每次当seeyou买了可乐以后,阿牛就要求和seeyou一起分享这一瓶可乐,而且一定要喝的和seeyou一样多 阅读全文
posted @ 2020-11-12 19:35 CrosseaLL 阅读(52) 评论(0) 推荐(0) 编辑
摘要: Sample input 15 1 2 3 1 2 3 3 1 1 3 2 2 1 2 3 1 2 1 3 1 4 1 14 1 15 2 5 2 6 2 7 3 8 3 9 3 10 4 11 4 12 4 13 Sample output 6 5 4 3 2 3 3 1 1 3 2 2 1 2 阅读全文
posted @ 2020-11-10 19:20 CrosseaLL 阅读(27) 评论(0) 推荐(0) 编辑
摘要: 亚军代码 作者采用了resnest200作为主干网络 采用多次训练模型预测投票的方法 来进行最终分类 数据增强方面 除了常规的方法之外,还有几个操作目前不知道意思 需要进一步研究 以下是部分的transform的写法 normalize = transforms.Normalize(mean=[0. 阅读全文
posted @ 2020-11-05 20:04 CrosseaLL 阅读(245) 评论(0) 推荐(1) 编辑
摘要: 暴力 class Solution { public: int maxLengthBetweenEqualCharacters(string s) { map<char, int> mp; int ans = -1; for(int i=1; i<=s.size(); i++){ if(mp[s[i 阅读全文
posted @ 2020-10-21 09:28 CrosseaLL 阅读(76) 评论(0) 推荐(0) 编辑
摘要: 记录最长的没匹配右括号的左括号 class Solution { public: int maxDepth(string s) { int d = 0; int ans=0; for (char c : s){ if (c == '(') { ++d; ans = max(ans, d); } el 阅读全文
posted @ 2020-10-11 13:28 CrosseaLL 阅读(59) 评论(0) 推荐(0) 编辑
摘要: 可以发现,当当前节点由上一个节点转移过来的时候 当前节点以及它的子节点对当前节点的距离和的贡献 相对上一个节点都减小了1 其余节点对这个点的贡献相对上一个节点的距离增加了1 于是当前节点的距离和就是上一个节点的距离和加上 n-son[cur]-2 class Solution { public: v 阅读全文
posted @ 2020-10-06 13:17 CrosseaLL 阅读(86) 评论(0) 推荐(0) 编辑
摘要: 记录每个的车位 当请求停车的时候减去 class ParkingSystem { public: map<int, int> mp; ParkingSystem(int big, int medium, int small ) { mp.clear(); mp[1] = big; mp[2]=med 阅读全文
posted @ 2020-10-04 10:04 CrosseaLL 阅读(153) 评论(0) 推荐(1) 编辑
摘要: 用栈简单模拟就可以 class Solution { public: int minOperations(vector<string>& logs) { stack<int> st; for(auto s:logs){ if(s[0]=='.'&&s[1]=='.'){ if(st.size()) 阅读全文
posted @ 2020-09-27 17:11 CrosseaLL 阅读(93) 评论(0) 推荐(0) 编辑
摘要: 通过dfs搜出每条边会被走过的次数 然后贪心的分配就行 #include<bits/stdc++.h> using namespace std; #define rep(i,j,k) for(LL i=(j); i<(k); ++i) #define pb push_back #define PII 阅读全文
posted @ 2020-09-27 17:05 CrosseaLL 阅读(101) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 ··· 9 下一页