Submission #1038350


Source Code Expand

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 Info

Submission Time
Task E - Examination, Estimation
User sugopurochakku
Language Python (2.7.6)
Score 0
Code Size 1088 Byte
Status WA
Exec Time 472 ms
Memory 2696 KB

Judge Result

Set Name All
Score / Max Score 0 / 100
Status
AC × 7
WA × 3
Set Name Test Cases
All 1.txt, 10.txt, 2.txt, 3.txt, 4.txt, 5.txt, 6.txt, 7.txt, 8.txt, 9.txt
Case Name Status Exec Time Memory
1.txt WA 450 ms 2696 KB
10.txt AC 468 ms 2696 KB
2.txt AC 457 ms 2696 KB
3.txt AC 450 ms 2696 KB
4.txt WA 458 ms 2696 KB
5.txt AC 452 ms 2696 KB
6.txt AC 453 ms 2696 KB
7.txt WA 451 ms 2696 KB
8.txt AC 472 ms 2696 KB
9.txt AC 458 ms 2696 KB