2.8k 3 分鐘

🌕🌗🌑🌑🌑 # 題目連結 題目連結 Online Judge uDebug # 題目說明 Time limit: 3.000 seconds # 題目 The game of Spot is played on an N × N board as shown below for N = 4 . During the game, alternate players may either place a black counter (spot) in an empty square or remove one from the board, thus producing a...
1.8k 2 分鐘

⭐️⭐️⭐️⭐️⭐️ # 題目敘述 You have an undirected, connected graph of n nodes labeled from 0 to n - 1 . You are given an array graph where graph[i] is a list of all the nodes connected with node i by an edge. Return the length of the shortest path that visits every node. You may start and stop at any node,...
1.1k 1 分鐘

🌕🌑🌑🌑🌑 # 題目連結 題目連結 Online Judge uDebug # 題目說明 Time limit: 3.000 seconds # 題目 Ugly numbers are numbers whose only prime factors are 2 , 3 or 5 . The sequence 1,  2,  3,  4,  5,  6,  8,  9,  10,  12,  15,  ...1,\ \ 2,\ \ 3,\ \ 4,\ \ 5,\ \ 6,\ \ 8,\ \ 9,\ \ 10,\ \ 12,\ \ 15,\ \...
5.5k 5 分鐘

🌕🌑🌑🌑🌑 # 題目連結 題目連結 Online Judge uDebug # 題目說明 Time limit: 3.000 seconds # 題目 Robotics, robot motion planning, and machine learning are areas that cross the boundaries of many of the subdisciplines that comprise Computer Science: artificial intelligence, algorithms and complexity, electrical...
2.5k 2 分鐘

🌕🌗🌑🌑🌑 # 題目連結 題目連結 Online Judge uDebug # 題目說明 Time limit: 3.000 seconds # 題目 A problem that is simple to solve in one dimension is often much more difficult to solve in more than one dimension. Consider satisfying a boolean expression in conjunctive normal form in which each conjunct consists...
1.8k 2 分鐘

⭐️⭐️⭐️ # 題目敘述 You are given an array points representing integer coordinates of some points on a 2D-plane, where points[i] = [xi, yi] . The cost of connecting two points [xi, yi] and [xj, yj] is the manhattan distance between them: |xi - xj| + |yi - yj| , where |val| denotes the absolute value of...
2.9k 3 分鐘

🌕🌗🌑🌑🌑 # 題目連結 題目連結 Online Judge uDebug # 題目說明 Time limit: 3.000 seconds # 題目 With the advent of high speed graphics workstations, CAD (computer-aided design) and other areas (CAM, VLSI design) have made increasingly effective use of computers. One of the problems with drawing images is the...
2.6k 2 分鐘

🌕🌑🌑🌑🌑 # 題目連結 題目連結 Online Judge uDebug # 題目說明 Time limit: 3.000 seconds # 題目 Problems in Computer Science are often classified as belonging to a certain class of problems (e.g., NP, Unsolvable, Recursive). In this problem you will be analyzing a property of an algorithm whose classification is...
1.8k 2 分鐘

⭐️⭐️⭐️ # 題目敘述 There are n people that are split into some unknown number of groups. Each person is labeled with a unique ID from 0 to n - 1 . You are given an integer array groupSizes , where groupSizes[i] is the size of the group that person i is in. For example, if groupSizes[1] = 3 , then person...
1.5k 1 分鐘

⭐️⭐️⭐️⭐️⭐️ # 題目敘述 A frog is crossing a river. The river is divided into some number of units, and at each unit, there may or may not exist a stone. The frog can jump on a stone, but it must not jump into the water. Given a list of stones ' positions (in units) in sorted ascending order,...