------
## 最终结论
```python
def alice_score(T, test_cases):
    results = []
    for s in test_cases:
        ones_segments = []
        current_count = 0
        
        # Count consecutive 1's segments
        for char in s:
            if char == '1':
                current_count += 1
            else:
                if current_count > 0:
                    ones_segments.append(current_count)
                current_count = 0
        
        # Append last segment if it ends with 1's
        if current_count > 0:
            ones_segments.append(current_count)
        
        # Sort segments in descending order to maximize Alice's score
        ones_segments.sort(reverse=True)
        
        # Alice takes every other segment starting from the largest
        alice_score = sum(ones_segments[i] for i in range(0, len(ones_segments), 2))
        
        results.append(alice_score)
    
    return results

# Example usage:
T = 5
test_cases = [
    "01111001",
    "0000",
    "111111",
    "101010101",
    "011011110111"
]

for result in alice_score(T, test_cases):
    print(result)
```