A. Bigger, Stronger
for a sequence to be strictly increasing, no two elements can be equal. Therefore, if there are any duplicate elements in the array, it is impossible to rearrange the array to make it strictly increasing.
Use a set to keep track of unique elements while iterating through the array. If, at any point during the iteration, an element is found to already exist in the set, it means there is a duplicate, and the answer is "NO." If the iteration completes without finding any duplicates, the answer is "YES."
t = int(input())
for _ in range(t):
nums = list(map(int,input().split()))
seen = set()
possible = True
for i in nums:
if i in seen:
possible = False
seen.add(i)
if possible:
print("YES")
else:
print("NO")
B. Application
Consider using a hashmap to store the count of change requests made by a given username.
We can use a hashmap to store the usernames along with their change counts. It also makes it easier to check if a username exists in the database, and to access the count of changes made for a person.
If a person is not registered we store $$$0$$$ as a value for the username. Afterwards we increment this value if a change request is made again with this username.
n = int(input())
database = {}
for _ in range(n):
username = input()
if username in database:
database[username] += 1
print(username + str(database[username]))
else:
database[username] = 0
print('OK')