- 博客(6)
- 资源 (2)
- 收藏
- 关注
原创 1013 Battle Over Cities (25 分) 计算连通分量个数-并查集或者深搜
It is vitally important to have all the cities connected by highways in a war. If a city is occupied by the enemy, all the highways from/toward that city are closed. We must know immediately if we nee...
2019-05-10 11:04:04 354
原创 1010 Radix (25 分) 二分法 应该算比较简单的理解了
1010Radix(25分)Given a pair of positive integers, for example, 6 and 110, can this equation 6 = 110 be true? The answer isyes, if 6 is a decimal number and 110 is a binary number.Now for any pa...
2019-05-08 19:59:06 955
原创 1003. Emergency (25) Dijkstra算法应用
1003Emergency(25分)As an emergency rescue team leader of a city, you are given a special map of your country. The map shows several scattered cities connected by some roads. Amount of rescue te...
2019-05-07 22:57:10 111
原创 1004 Counting Leaves 层序遍历
A family hierarchy is usually presented by a pedigree tree. Your job is to count those family members who have no child.Input Specification:Each input file contains one test case. Each case starts...
2019-05-04 08:13:05 122
原创 1002 A+B for Polynomials
1002A+B for Polynomials(25分)This time, you are supposed to findA+BwhereAandBare two polynomials.Input Specification:Each input file contains one test case. Each case occupies 2 lines, a...
2019-05-02 18:47:35 69
原创 1050 螺旋矩阵 (25 分) 自己思路分析
1050螺旋矩阵(25分)本题要求将给定的N个正整数按非递增的顺序,填入“螺旋矩阵”。所谓“螺旋矩阵”,是指从左上角第 1 个格子开始,按顺时针螺旋方向填充。要求矩阵的规模为m行n列,满足条件:m×n等于N;m≥n;且m−n取所有可能值中的最小值。输入格式:输入在第 1 行中给出一个正整数N,第 2 行给出N个待填充的正整数。所有数字不超过104...
2019-05-02 10:09:53 760
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人