0%

# Description

George 拿了一些相同長度的棍子，然後隨意的把這些棍子切成一段一段的棍子（每段長度都不會超過 50 個單位長）。現在他想要把這些一段一段的棍子拼回原來的樣子，但是他忘了他原來帶多少根棍子來，並且也忘了原來每根棍子的長度。請幫助他設計一個程式算出這些棍子原來可能的最小長度。所有的棍子長度都是整數，並且大於 0。

# 驗證開機模式、磁碟分割

## 驗證是否為UEFI開機模式:

# ls /sys/firmware/efi/efivars

# Description

Consider the two patterns of ‘O’ and ‘X’ below (‘.’ represent an empty square). We want the first pattern to be transformed into the second pattern in one time unit. During this time unit, each symbol (‘O’ and ‘X’) can move one step in any of the four directions (or remain at its current square). All movements happen simultaneously, so a symbol can move to an occupied square, if that symbol is moved to some other square. If a symbol moves from square A to B, and the symbol at B moves to A, we have a swap. Write a program which calculates the least number of swaps needed to transform a given pattern into another given pattern.

C++語言自學手冊 是我自己撰寫的自學手冊，裡面是從零基礎開始教起的，不需要任何程式基礎。另外，後面還有演算法的入門教學，這部分與C++語言較無關聯，但是在程式競賽裡面是最重要的部分。