上一页 1 ··· 4 5 6 7 8 9 10 11 12 ··· 29 下一页
摘要: #include <bits/stdc++.h> #include<math.h> #include <string> using namespace std; const int maxn = 1010; struct mouse{ int weight;//质量 int R;//排名 }mous 阅读全文
posted @ 2020-01-18 12:06 JasonPeng1 阅读(156) 评论(0) 推荐(0)
摘要: 解法1:(自己码的) #include <bits/stdc++.h> #include<math.h> #include <string> using namespace std; const int MAXN = 10000; stack<int> stk; int main(){ int M, 阅读全文
posted @ 2020-01-17 23:37 JasonPeng1 阅读(144) 评论(0) 推荐(0)
摘要: #include <bits/stdc++.h> #include<math.h> #include <string> using namespace std; //5个map变量分别建立书名,作者,关键词,出版社及出版年份与id的映射关系 map<string,set<int>> mpTitle, 阅读全文
posted @ 2020-01-17 11:43 JasonPeng1 阅读(140) 评论(0) 推荐(0)
摘要: #include <bits/stdc++.h> #include<math.h> #include <string> using namespace std; const int maxn = 480005;//最大学生人数 map<int,int> temp; int main(){ int m 阅读全文
posted @ 2020-01-17 10:22 JasonPeng1 阅读(94) 评论(0) 推荐(0)
摘要: #include <bits/stdc++.h> #include<math.h> #include <string> using namespace std; const int maxn = 40010;//最大学生人数 bool check(char c){ if(c >= '0' && c< 阅读全文
posted @ 2020-01-16 22:11 JasonPeng1 阅读(155) 评论(0) 推荐(0)
摘要: 用了打表的技巧 #include <bits/stdc++.h> #include<math.h> #include <string> using namespace std; const int maxn = 40010;//最大学生人数 //[0,12]的火星文 string unitDigit 阅读全文
posted @ 2020-01-16 21:33 JasonPeng1 阅读(258) 评论(0) 推荐(0)
摘要: 超时主要是这个语句的原因: for(iter = temp[num1].begin();iter != temp[num1].end();++iter){ for(iter1 = temp[num2].begin();iter1 != temp[num2].end();++iter1){ if(*i 阅读全文
posted @ 2020-01-16 13:04 JasonPeng1 阅读(234) 评论(0) 推荐(0)
摘要: 没有想到以二维数组 char [N][5] 存放输入的姓名,自己尝试用vector<char> 失败了。 小技巧:如果排序时直接对字符串排序,那么会导致大量的字符串移动,非常耗时间,因此比较合适的做法是使用字符串的下标来代替字符串本身进行排序,这样消耗的时间会少得多 strcmp 的返回值不一定是 阅读全文
posted @ 2020-01-15 23:43 JasonPeng1 阅读(136) 评论(0) 推荐(0)
摘要: #include <bits/stdc++.h> #include<math.h> #include <string> using namespace std; const int N = 40005; //vector<vector<int>> const int M = 26*26*26*10 阅读全文
posted @ 2020-01-15 18:31 JasonPeng1 阅读(132) 评论(0) 推荐(0)
摘要: #include <bits/stdc++.h> #include<math.h> #include <string> using namespace std; const int MAXN = 100005; //const int MOD = 1000000007; const int INF 阅读全文
posted @ 2020-01-15 15:12 JasonPeng1 阅读(107) 评论(0) 推荐(0)
上一页 1 ··· 4 5 6 7 8 9 10 11 12 ··· 29 下一页