def post(self, request, format=None):
    data = request.data
    contestid = data.get('contestid', '')
    problem = data.get('problem', '')
    statusid = data.get('statusid', '')
    statustype = data.get('statustype', '')
    print(contestid, problem, statusid, statustype)
    if ((contestid == 0) or (problem == (- 1))):
        return Response('bad', status=HTTP_400_BAD_REQUEST)
    if ((contestid != '') and (problem != '')):
        JudgeStatus.objects.filter(contest=contestid).filter(contestproblem=problem).update(result=(- 1))
        return Response('ok', status=HTTP_200_OK)
    if ((problem != '') and (contestid == '')):
        JudgeStatus.objects.filter(problem=problem).update(result=(- 1))
        return Response('ok', status=HTTP_200_OK)
    if (statusid != ''):
        JudgeStatus.objects.filter(id=statusid).update(result=(- 1))
        return Response('ok', status=HTTP_200_OK)
    if (statustype != ''):
        JudgeStatus.objects.filter(result=statustype).update(result=(- 1))
        return Response('ok', status=HTTP_200_OK)
    return Response('bad', status=HTTP_400_BAD_REQUEST)
def post(self, request, format=None):
    data = request.data
    contestid = data.get('contestid', )
    problem = data.get('problem', )
    statusid = data.get('statusid', )
    statustype = data.get('statustype', )
    print(contestid, problem, statusid, statustype)
    if ((contestid == 0) or (problem == (- 1))):
        return Response('bad', status=HTTP_400_BAD_REQUEST)
    if ((contestid != ) and (problem != )):
        JudgeStatus.objects.filter(contest=contestid).filter(contestproblem=problem).update(result=(- 1))
        return Response('ok', status=HTTP_200_OK)
    if ((problem != ) and (contestid == )):
        JudgeStatus.objects.filter(problem=problem).update(result=(- 1))
        return Response('ok', status=HTTP_200_OK)
    if (statusid != ):
        JudgeStatus.objects.filter(id=statusid).update(result=(- 1))
        return Response('ok', status=HTTP_200_OK)
    if (statustype != ):
        JudgeStatus.objects.filter(result=statustype).update(result=(- 1))
        return Response('ok', status=HTTP_200_OK)
    return Response('bad', status=HTTP_400_BAD_REQUEST)