Coder

舒心、快乐,比什么都重要

摘要: #include using namespace std; int main() { int n; string s1, s2; getline(cin,s1); getline(cin,s2); int a[128] = {0}; // 建立一个128的字符的数组 for (int i = 0; i < s1.length(); i++)... 阅读全文
posted @ 2019-04-30 21:33 H123K 阅读(182) 评论(0) 推荐(0) 编辑
摘要: #include #include #include using namespace std; struct s { string id; int dis; } num[10010]; // 结构体数组变量开的大一点 bool cmp (s a, s b) { // 形参中用结构体定义两个结构体变量 return a.dis > n; for (int... 阅读全文
posted @ 2019-04-30 00:09 H123K 阅读(100) 评论(0) 推荐(0) 编辑