Пример #1
0
def fetch(users_probs):
    users, probs = users_probs
    for i, p in enumerate(probs):
        probs[i] = (p[0], oj.decode_probname(p[0], p[1]))
    judges = set()
    for p in probs:
        judges.add(p[0])
    result = {}
    for user, accts in users.items():
        raw_result = {}
        for judge in judges:
            if judge in accts:
                raw_result[judge] = oj.fetch_user(judge, accts[judge])
            else:
                raw_result[judge] = set()
        status = []
        for p in probs:
            judge, prob = p
            if p in raw_result[judge]:
                status.append("AC")
            else:
                status.append("NO")
        result[user] = status
    return result
Пример #2
0
def _fetch(judge_user):
	judge,user = judge_user.split(":",1)
	return oj.fetch_user(judge,user)