Problem:
AtCoder currently hosts three types of contests: ABC, ARC, and AGC. As the number of users has grown, in order to meet the needs of more users, AtCoder has decided to increase the number of contests to 26 types, from AAC to AZC. For convenience, we number these 26 types as type 1 through type 26. AtCoder wants to schedule contests for D days so that user satisfaction is as high as possible. For every day, AtCoder will hold exactly one contest, and each contest will end on that day. The satisfaction is calculated as follows.    * The satisfaction at the beginning of day 1 is 0. Satisfaction can be negative.   * Holding contests increases satisfaction. The amount of increase will vary depending on a variety of factors. Specifically, we know in advance that holding a contest of type i on day d will increase the satisfaction by s_{d,i}.   * If a particular type of contest is not held for a while, the satisfaction decreases. Each contest type i has an integer c_i, and at the end of each day d=1,2,...,D, the satisfaction decreases as follows. Let \mathrm{last}(d,i) be the last day before day d (including d) on which a contest of type i was held. If contests of type i have never been held yet, we define \mathrm{last}(d,i)=0. At the end of day d, the satisfaction decreases by \sum _{i=1}^{26}c_i \times (d-\mathrm{last}(d,i)).  Please schedule contests on behalf of AtCoder. If the satisfaction at the end of day D is S, you will get a score of \max(10^6 + S, 0). There are 50 test cases, and the score of a submission is the total scores for each test case. You can make submissions multiple times, and the highest score among your submissions will be your score.

Incorrect submission (verdict: Wrong Answer):
def main():
    from builtins import int, str, map, list, dict, float, print, len, sorted, max, min
    from itertools import accumulate, permutations, combinations
    from collections import deque, defaultdict, Counter
    from operator import itemgetter
    from bisect import bisect_left, bisect_right, bisect
    from heapq import heappop, heappush
    import sys, re, math, copy
    sys.setrecursionlimit(10 ** 6)

    input = (lambda: (sys.stdin.readline()).rstrip())
    input_list = (lambda: input().split())
    input_number = (lambda: int(input()))
    input_number_list = (lambda: list(map(int, input_list())))

    D = input_number()
    c = input_number_list()
    s = []
    for i in range(D):
        s.append(input_number_list())
    for i in range(D):
        print(s[i].index(max(s[i])))


if __name__ == '__main__':
    main()


Fixed, accepted submission:
def main():
    from builtins import int, map, list, print, len
    from collections import defaultdict
    import sys
    sys.setrecursionlimit(10 ** 6)

    input = (lambda: (sys.stdin.readline()).rstrip())
    input_list = (lambda: input().split())
    input_number = (lambda: int(input()))
    input_number_list = (lambda: list(map(int, input_list())))

    D = input_number()
    c = input_number_list()
    last = defaultdict(lambda: 0)
    s = []
    c_pt = c.copy()
    c_total = sum(c)
    ans_pt = 0
    for i in range(D):
        s.append(input_number_list())
    for i in range(D):
        pt_ls = s[i].copy()

        
        t_idx = pt_ls.index(max(pt_ls))
        ans_pt += pt_ls[t_idx]

        
        for j in range(len(c)):
            if j == t_idx:
                
                c_pt[j] = c[j]
            else:
                ans_pt -= c_pt[j]
                c_pt[j] += c[j]

        
        print(t_idx + 1)

        
        c_pt[t_idx] = 0


if __name__ == '__main__':
    main()