随笔分类 -  PAT

摘要:#include<iostream> #include<string> #include<map> using namespace std; map<int, string> m = {{0, "zero"}, {1, "one"}, {2, "two"}, {3, "three"}, {4, "four"}, {5, "five"}, {6, "six"}, {7, "seven"}, 阅读全文
posted @ 2019-08-08 17:28 Stoves 阅读(79) 评论(0) 推荐(0)
摘要:#include<iostream> using namespace std; struct TreeNode { int father = 0; int level = 0; bool isLeaf = true; }; TreeNode t[100]; int main() { int N, M; while(cin>>N>>M) { //input int ID, K, child, num 阅读全文
posted @ 2019-08-07 20:16 Stoves 阅读(104) 评论(0) 推荐(0)
摘要:#include #include #include using namespace std; int n, m, c1, c2;//dis[i]从起点到i的最短路径,num[i]为长度,weight[i]为i城的救援小组人数,w[i]为到i城已经接到的救援人数,e[][]路径权重 int dis[500], num[500], weight[500], w[500], e[500][500]... 阅读全文
posted @ 2019-08-05 16:58 Stoves 阅读(119) 评论(0) 推荐(0)
摘要:#include #include #include #include #include using namespace std; int main() { string s1, s2; while(getline(cin, s1) && getline(cin, s2)) { stringstream ss1, ss2; map m; ... 阅读全文
posted @ 2019-08-02 16:36 Stoves 阅读(117) 评论(0) 推荐(0)
摘要:初版 修改版晚点给 阅读全文
posted @ 2019-08-02 10:29 Stoves 阅读(87) 评论(0) 推荐(0)