
落谷
吃草的哈士奇
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
P1149 火柴棒等式
P1149 火柴棒等式 #include <bits/stdc++.h> using namespace std; int a[10]={6,2,5,5,4,5,6,3,7,6}; int numbers[2201]={0}; int gt(int n){ if (!n)return a[0]; int res=0; while (n){res+=a[n%10]...原创 2019-03-01 22:53:00 · 208 阅读 · 0 评论 -
P1022 计算器的改良
P1022 计算器的改良 #include <bits/stdc++.h> using namespace std; int cnt(vector<int>nums){ int ans=0; for (int i = 0; i <nums.size() ; ++i) { ans+=nums[i]; } return ...原创 2019-03-04 16:51:38 · 294 阅读 · 0 评论 -
P1328 生活大爆炸版石头剪刀布
P1328 生活大爆炸版石头剪刀布 因为循环次数小,直接建立二维方程组确定每一步的关系 #include <bits/stdc++.h> using namespace std; int res[5][5]={{0,-1,1,1,-1},{1,0,-1,1,-1},{-1,1,0,-1,1},{-1,-1,1,0,1},{1,1,-1,-1,0}}; int main() { ...原创 2019-03-20 21:03:45 · 151 阅读 · 0 评论 -
P1563 玩具谜题
P1563 玩具谜题 处理好异或运算的关系即可 #include <bits/stdc++.h> using namespace std; map<string,int>cnt; int main() { int n,m; vector<string>order; scanf("%d%d",&n,&m); ...原创 2019-03-20 21:27:31 · 202 阅读 · 0 评论 -
P1042 乒乓球
P1042 乒乓球 严格按照题目要求去做即可(最好自己在本子上画个流程图) #include <bits/stdc++.h> using namespace std; typedef pair<int,int> pii; const int N=2505; pii eleven={0,0},twenty_one={0,0}; string nums[N]={""}; in...原创 2019-04-02 15:41:50 · 155 阅读 · 0 评论 -
P1098 字符串的展开
P1098 字符串的展开 #include <bits/stdc++.h> using namespace std; int p1,p2,p3; int length=0; string dispose_str(char begin,char end){ int len=end-begin-1; string ans,temp; if (len>2...原创 2019-04-02 16:58:33 · 413 阅读 · 0 评论 -
P1093 奖学金
P1093 奖学金 不太适用排序算法,利用map容器的自排序就可以了 #include <bits/stdc++.h> using namespace std; int Sum[305][3]={0}; map<int,vector<int> >Count; bool cmp(int a,int b){ if (Sum[a][0]>Sum[b]...原创 2019-04-12 21:57:27 · 408 阅读 · 0 评论 -
P1803 凌乱的yyy / 线段覆盖
P1803 凌乱的yyy / 线段覆盖 以结束时间为key,只存储考试用时最短的一组数据,建立map数组 #include <bits/stdc++.h> using namespace std; int n; map<int,int> Count; int main(){ scanf("%d",&n); for (int i = 0; i &l...原创 2019-05-31 10:36:16 · 197 阅读 · 0 评论