会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
Asurudo Jyo の 倉 庫
手握红莲,青息不偃
首页
新随笔
联系
订阅
管理
上一页
1
···
34
35
36
37
38
39
40
41
42
···
47
下一页
2018年9月25日
Leetcode-861 Score After Flipping Matrix(翻转矩阵后的得分)
摘要: 1 class Solution 2 { 3 public: 4 int matrixScore(vector>& A) 5 { 6 for(int i = 0; i oneSum) 33 { 34 for(int i = 0; i < A.siz...
阅读全文
posted @ 2018-09-25 19:10 Asurudo
阅读(287)
评论(0)
推荐(0)
2018年9月23日
Leetcode-911 Online Election(在线选举)
摘要: 1 class TopVotedCandidate 2 { 3 public: 4 vector> List; 5 TopVotedCandidate(vector persons, vector times) 6 { 7 map m; 8 int max_count = 0;...
阅读全文
posted @ 2018-09-23 12:04 Asurudo
阅读(698)
评论(2)
推荐(0)
Leetcode-908 Smallest Range I(最小差值 I)
摘要: 1 class Solution 2 { 3 public: 4 int smallestRangeI(vector& A, int K) 5 { 6 int Max = INT_MIN; 7 int Min = INT_MAX; 8 for(auto d:A) 9 ...
阅读全文
posted @ 2018-09-23 11:12 Asurudo
阅读(564)
评论(4)
推荐(0)
2018年9月20日
Leetcode-567 Permutation in String(字符串的排列)
摘要: 1 class Solution 2 { 3 public: 4 bool checkInclusion(string s1, string s2) 5 { 6 if(s2.size()<s1.size()) 7 return false; 8 int leng...
阅读全文
posted @ 2018-09-20 11:07 Asurudo
阅读(180)
评论(0)
推荐(0)
2018年9月16日
Leetcode-904 Fruit Into Baskets(水果成篮)
摘要: 1 class Solution 2 { 3 public: 4 int totalFruit(vector& tree) 5 { 6 vector> dealList; 7 int curType = tree[0]; 8 int curSum = 1; 9 ...
阅读全文
posted @ 2018-09-16 11:10 Asurudo
阅读(646)
评论(0)
推荐(0)
Leetcode-905 Sort Array By Parity(按奇偶校验排序数组)
摘要: 1 class Solution 2 { 3 public: 4 vector sortArrayByParity(vector& A) 5 { 6 vector result_one; 7 vector result_two; 8 for(auto d:A) 9 ...
阅读全文
posted @ 2018-09-16 11:09 Asurudo
阅读(436)
评论(0)
推荐(0)
2018年9月13日
UVA-1592 Database
摘要: 1 #include 2 #include 3 #include 4 #include 5 #include 6 #include 7 #include 8 9 using namespace std; 10 11 12 map IDcache; 13 vector Setcache; 14 15 int ID(string x) 16 { 17 ...
阅读全文
posted @ 2018-09-13 19:21 Asurudo
阅读(149)
评论(0)
推荐(0)
2018年9月12日
大数类
摘要: 支持'+','-','*','\'四则运算,支持'>''<'">="'<='==''!='运算符比较,支持'%'取余操作,支持'<<''>>'标准输入输出流,支持'+=','-=','*=','\='运算符,不支持自增自减操作(因为懒),四则运算实现都是模拟十进制手算,未使用任何优化
阅读全文
posted @ 2018-09-12 15:50 Asurudo
阅读(199)
评论(0)
推荐(0)
2018年9月11日
集合映射为ID
摘要: map的作用是把集合映射成ID,第一个类型是经过“标准化”(如字符串经过了sort,里面的字符都是从小到大按字典序排序过)的,需要存放在vector里的东西,第二个则是int类型的ID;vector其实是一个列表,通过简单的ID下标访问可以轻松获取元素的原貌。 假设标准化函数为repr(),(字符串
阅读全文
posted @ 2018-09-11 16:04 Asurudo
阅读(189)
评论(0)
推荐(0)
2018年9月8日
UVA-1368 DNA Consensus String
摘要: 1 #include 2 #include 3 #include 4 #include 5 #include 6 #include 7 #include 8 #include 9 #include 10 #include 11 12 using namespace std; 13 14 int main() 15 { 16 int T; 17 ...
阅读全文
posted @ 2018-09-08 08:43 Asurudo
阅读(157)
评论(0)
推荐(0)
上一页
1
···
34
35
36
37
38
39
40
41
42
···
47
下一页
公告