Xmas Contest 2016 昼の部

Submission #1038350

Source codeソースコード

for t in xrange(200):
    cnts = [0]*30
    p_cnts = [0]*30
    A = []
    for i in xrange(30):
        A.append(map(int, raw_input().split()))

    res = [[0]*4 for i in xrange(50)]
    for a in A:
        for j in xrange(50):
            res[j][a[j]] += 1
    for i in xrange(30):
        a = A[i]
        for j in xrange(50):
            cnts[i] += float(res[j][a[j]]) / sum(res[j])
            if max(res[j]) == res[j][a[j]]:
                p_cnts[i] += 1
    b = range(30)
    b.sort(key=lambda x: p_cnts[x])
    #for i in xrange(30):
    #    print b[i], cnts[b[i]], p_cnts[b[i]]

    g1 = b[20:]   # 2/3
    g2 = b[10:20] # 1/3
    g3 = b[:10]   # 1/4

    res_prob = [[0]*4 for i in xrange(50)]
    for i in xrange(10):
        a = A[g1[i]]
        for j in xrange(50):
            res_prob[j][a[j]] += 2

    for i in xrange(10):
        a = A[g2[i]]
        for j in xrange(50):
            res_prob[j][a[j]] += 1

    ans = []
    for j in xrange(50):
        ans.append(str(res_prob[j].index(max(res_prob[j]))))
    print " ".join(ans)

Submission

Task問題 E - Examination, Estimation
User nameユーザ名 すごぷろ/ちゃっく
Created time投稿日時
Language言語 Python2 (2.7.6)
Status状態 WA
Score得点 0
Source lengthソースコード長 1088 Byte
File nameファイル名
Exec time実行時間 ms
Memory usageメモリ使用量 -

Test case

Set

Set name Score得点 / Max score Cases
All 0 / 100 1.txt,10.txt,2.txt,3.txt,4.txt,5.txt,6.txt,7.txt,8.txt,9.txt

Test case

Case name Status状態 Exec time実行時間 Memory usageメモリ使用量
1.txt WA
10.txt AC 468 ms 2696 KB
2.txt AC 457 ms 2696 KB
3.txt AC 450 ms 2696 KB
4.txt WA
5.txt AC 452 ms 2696 KB
6.txt AC 453 ms 2696 KB
7.txt WA
8.txt AC 472 ms 2696 KB
9.txt AC 458 ms 2696 KB