We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
- Prepare
- Python
- Collections
- Piling Up!
- Discussions
Piling Up!
Piling Up!
Sort by
recency
|
955 Discussions
|
Please Login in order to post a comment
Enter your code here. Read input from STDIN. Print output to STDOUT
def can_stack_cubes(test_cases): results = [] for case in test_cases: n, blocks = case left, right = 0, n - 1 current_top = float('inf') can_stack = True
Read input
def main(): import sys input = sys.stdin.read data = input().strip().split("\n")
if name == "main": main()