Conflict
ABC 409Problem 7 of 50
EasyWhat to do
Takahashi and Aoki each want certain items. Their preferences are given as strings of 'o' (wants) and 'x' (doesn't want). Check if there's any position where both have 'o' — meaning they both want the same item. Return 'Yes' if a conflict exists, 'No' otherwise.
Key Concepts
if-statements
loops
string manipulation
conditional checks
Examples
Input:
T = 'oxoo', A = 'xoox'
Output:
Yes
Input:
T = 'xxxxx', A = 'ooooo'
Output:
No
Tips for Beginners
- Focus on understanding the logic, not memorizing syntax
- Use print statements to debug your code
- Don't worry about input parsing - the function handles that for you
- If stuck, try writing out your solution on paper first
Python Editor
Loading Python...