#!/bin/python3 import sys def profit(b, s, c): a = 0 while True: b = b-1 s = s-1 c = c-1 a = a+1 if (b+s) == c: return a if __name__ == "__main__": t = int(input().strip()) for a0 in range(t): b, s, c = input().strip().split(' ') b, s, c = [int(b), int(s), int(c)] result = profit(b, s, c) print(result)