摘要: 题目链接:https://www.51nod.com/onlineJudge/questionCode.html#!problemId=1265 思路 : 通过矩阵 AB=(x2-x1,y2-y1,z2-z1) BC=(x3-x2,y3-y2,z3-z2) AB=(x4-x3,y4-y3,z4-z3 阅读全文
posted @ 2017-08-16 19:57 sortmin 阅读(99) 评论(0) 推荐(0) 编辑
摘要: 直接使用STL函数就可以 AC代码: #include<bits/stdc++.h>using namespace std;int main(){ char a[100]; int n; while(cin>>a) { int n=strlen(a); sort(a,a+n); do { cout< 阅读全文
posted @ 2017-08-16 16:39 sortmin 阅读(80) 评论(0) 推荐(0) 编辑
摘要: 题目链接https://www.51nod.com/onlineJudge/questionCode.html#!problemId=2006 二分图的最大匹配 水题 AC代码: #include<bits/stdc++.h>>using namespace std;int n,k,m;int ma 阅读全文
posted @ 2017-08-16 14:57 sortmin 阅读(342) 评论(0) 推荐(0) 编辑
摘要: 水题 题意 分糖果 每次最多8个 多出来的可以遗留到下一天 注意下一天少于8个要清0; 代码: #include<bits/stdc++.h>using namespace std;int n,k;int q,b,ok;int a;long long sum;int main(){ cin>>n>> 阅读全文
posted @ 2017-08-13 12:05 sortmin 阅读(106) 评论(0) 推荐(0) 编辑
摘要: 题意给定一个长方形的范围;从给定的长方形中找两个占据面积最大的 wa多次 注意各个x,y的结合写错。。 代码: #include<bits/stdc++.h>using namespace std;int n;struct node{ int x; int y;}ma[105];int main() 阅读全文
posted @ 2017-08-13 00:06 sortmin 阅读(208) 评论(0) 推荐(0) 编辑
摘要: 国旗问题的水题 直接上下扫两遍; 代码: #include<bits/stdc++.h>using namespace std;int n,m;char s[105][105];int x1,x2,x3;int main(){ int sum; while(scanf("%d%d",&n,&m)!= 阅读全文
posted @ 2017-08-12 23:12 sortmin 阅读(253) 评论(0) 推荐(0) 编辑
摘要: 题意找一段文字的大写字母 水题 注意getchar的使用 代码: #include<bits/stdc++.h>using namespace std;int n;char s[205];int main(){ int sum; while(cin>>n) { sum=0; int ans = 0; 阅读全文
posted @ 2017-08-12 22:14 sortmin 阅读(112) 评论(0) 推荐(0) 编辑