题目链接: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…
题目链接: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;…
题目链接: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…
题目链接: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…
java短路问题 短路运算符就是我们常用的"&&"."||",一般称为"条件操作". class Logic{ public ststic void main(String[] args){ int a=1; int b=1; if(a<b && b<a/0){ System.out.println("Oh,That's Impossible!!!"); }else{ System.…
短路运算符就是我们常用的“&&”.“||”,一般称为“条件操作”. class Logic{ public ststic void main(String[] args){ int a=1; int b=1; if(a<b && b<a/0){ System.out.println("Oh,That's Impossible!!!"); }else{ …