# ===================================================== # Practice Problems for USACO Herdle # Each problem is written as comments. # Uncomment the code of the problem you want to run. # ===================================================== # ===================================================== # Problem 1 # Print all characters in a 3x3 board in one line. # # Input # ABC # DEF # GHI # # Output # A B C D E F G H I # ===================================================== # ===================================================== # Problem 2 # Count how many characters are the same # AND in the same position. # # Input # ABC # DEF # GHI # # AXC # DZF # GHQ # # Output # 6 # ===================================================== # ===================================================== # Problem 3 # Count how many characters appear in BOTH boards. # Position does NOT matter. # # Input # ABC # DEF # GHI # # CAB # DEF # IHG # # Output # 9 # ===================================================== # ===================================================== # Problem 4 # Count characters that exist in both boards # BUT are in different positions. # # (Ignore characters that match in the same position) # # Input # ABC # DEF # GHI # # CAB # DEF # IHG # # Output # 6 # ===================================================== # ===================================================== # Problem 5 (Almost Herdle) # Count both GREEN and YELLOW # # GREEN : same character, same position # YELLOW : same character, different position # # Input # ABC # DEF # GHI # # AXC # DZF # GHI # # Output # Green: 7 # Yellow: 0 # =====================================================
To embed this project on your website, copy the following code and paste it into your website's HTML: