题目链接:1319: 球 参考:wustoj 1319 球-wust_tanyao,并查集 并查集系列:WUSTOJ 1346: DARK SOULS(Java)并查集 Description Icy is a lonely boy. He was so boring these days. So he started to play a game himself. First, he took a heap of balls with many different colors. ( One…
题目链接:1326: Graph 参考博客:HNUSTOJ-1617 Graph(费马数)--G2MI Description Your task is to judge whether a regular polygon can be drawn only by straightedge and compass. The length of the straightedge is infinite. The width of the compass is infinite. The strai…
题目链接:1332: Prime Factors Description I'll give you a number , please tell me how many different prime factors in this number. Input There is multiple test cases , in each test case there is only one line contains a number N(2<=N<=100000). Process to…
题目链接:1349: TLE Description WH在刷题时,设计出了如下代码: #include<stdio.h> int main() { int i, j, cnt, k, N, K, a[5555]; scanf("%d%d", &N, &K); int ans = 0; for (i = 1; i <= N; i++) { scanf("%d", &a[i]); // 输入N个数 } for (i = 1;…
题目链接:1325: Distance Description There is a battle field. It is a square with the side length 100 miles, and unfortunately we have two comrades who get hurt still in the battle field. They are in different positions. You have to save them. Now I give…