题解列表

筛选

亲戚—并查集

摘要:题目要求我们将两个人合并为亲戚关系或输出一个人有多少个亲戚,很明显的是并查集操作 size[]数组存放的是每个根节点下面有几个亲戚,开始的时候每个人都是独立的所以每个根节点都初始化为1 ####解……

1869: 鸡兔同笼(多组输入)

摘要:解题思路:注意事项:参考代码:#include<bits/stdc++.h> using namespace std; int main () {     int m,n;     int ……

计算并联电阻的阻值

摘要:解题思路:注意事项:参考代码:r1,r2=map(float,input().strip().split())R = 1/(1/r1 + 1/r2)print("%.2f"%R)……

2750-字符菱形

摘要:import java.util.Scanner;public class Main {    public static void main(String[] args) {        Scan……

水无月C语言版本

摘要:**代码:** ```c #include #include int main() { char a[50],b[50]; int i; gets(a); ……

Python才是最牛的,其他的就是Shit!

摘要:import math print(math.factorial(int(input())))Python 是一种易学易用且功能强大的高级编程语言,具有许多独特的优点,使其成为开发者和数据科学家们的……

明明的随机数

摘要:解题思路:注意事项:参考代码:#include<stdio.h> int main() { int n; scanf("%d",&n); int a[n]; for(int i=0……