摘要:
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 inp 阅读全文
摘要:
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 ro 阅读全文
摘要:
This time, you are supposed to find A+B where A and B are two polynomials. Input Specification: Each input file contains one test case. Each case occu 阅读全文
摘要:
Calculate a+b and output the sum in standard format -- that is, the digits must be separated into groups of three by commas (unless there are less tha 阅读全文
摘要:
题目链接:https://www.luogu.com.cn/problem/P1195 今天上算法设计课,复习一下 Kruskal 和并查集。 放AC代码 1 #include<bits/stdc++.h> 2 using namespace std; 3 int n, m, k, ans; 4 i 阅读全文
摘要:
看了题解之后发现确实比我更有规律... 妙啊妙啊 我的: 1 #include<bits/stdc++.h> 2 using namespace std; 3 4 long long int n, k, m = 1, p = 0;//k表示增加的次数,m表示第几位 5 long long int n 阅读全文
摘要:
题目链接:http://www.acwing.com/problem/content/897/ 浅浅复习 放AC代码 1 #include<bits/stdc++.h> 2 using namespace std; 3 4 const int N = 1010; 5 int n; 6 int a[N 阅读全文