摘要: 1160 Forever (20 分) "Forever number" is a positive integer A with K digits, satisfying the following constrains: the sum of all the digits of A is m; 阅读全文
posted @ 2022-03-04 21:43 勇往直前的力量 阅读(50) 评论(0) 推荐(0) 编辑
摘要: 7-1 The Closest Fibonacci Number (20 分) The Fibonacci sequence Fn is defined by The closest Fibonacci number is defined as the Fibonacci number with t 阅读全文
posted @ 2022-03-04 21:24 勇往直前的力量 阅读(27) 评论(0) 推荐(0) 编辑
摘要: Given a singly linked list, you are supposed to rearrange its elements so that all the negative values appear before all of the non-negatives, and all 阅读全文
posted @ 2022-03-02 22:48 勇往直前的力量 阅读(21) 评论(0) 推荐(0) 编辑
摘要: 1032 1032 点击查看代码 #include <bits/stdc++.h> using namespace std; struct Node { char key; int next; bool flag; }node[100000]; int main() { #ifdef ONLINE_ 阅读全文
posted @ 2022-03-02 22:47 勇往直前的力量 阅读(336) 评论(0) 推荐(0) 编辑
摘要: 1107 1107 i号同学:喜欢的活动1、喜欢的活动2... 1:5 6 course[5]=1 course[6]=1 2:5 union(2,findFather(course[5]))-> union(2,1) 2->1 3:5 union(3,findFather(course[5]))- 阅读全文
posted @ 2022-03-02 17:11 勇往直前的力量 阅读(64) 评论(0) 推荐(0) 编辑
摘要: Some scientists took pictures of thousands of birds in a forest. Assume that all the birds appear in the same picture belong to the same tree. You are 阅读全文
posted @ 2022-03-02 17:10 勇往直前的力量 阅读(20) 评论(0) 推荐(0) 编辑
摘要: This time, you are supposed to help us collect the data for family-owned property. Given each person's family members, and the estate(房产)info under hi 阅读全文
posted @ 2022-03-02 15:53 勇往直前的力量 阅读(45) 评论(0) 推荐(0) 编辑
摘要: 1003 1003 点击查看代码 #include <bits/stdc++.h> using namespace std; const int INF=999999999; int n,m,c1,c2; int e[510][510],weight[510],w[510]; int d[510], 阅读全文
posted @ 2022-03-01 21:24 勇往直前的力量 阅读(219) 评论(0) 推荐(0) 编辑
摘要: Input our current position and a destination, an online map can recommend several paths. Now your job is to recommend two paths to your user: one is t 阅读全文
posted @ 2022-03-01 21:13 勇往直前的力量 阅读(41) 评论(0) 推荐(0) 编辑
摘要: 1122 1122 点击查看代码 #include <bits/stdc++.h> using namespace std; int n,m; int G[210][210]; int main() { #ifdef ONLINE_JUDGE #else freopen("1.txt", "r", 阅读全文
posted @ 2022-02-27 16:57 勇往直前的力量 阅读(235) 评论(0) 推荐(0) 编辑