
from checker.local import LocalChecker as BaseChecker
#from checker.contest import ContestChecker as BaseChecker

OK = 0
TIMEOUT = 1
NOTWORKING = 2
NOTFOUND = 3


from checker.local import LocalChecker as BaseChecker
#from checker.contest import ContestChecker as BaseChecker

OK = 0
TIMEOUT = 1
NOTWORKING = 2
NOTFOUND = 3

_mapping = ["OK", "TIMEOUT", "NOTWORKING", "NOTFOUND"]

def string_to_result(strresult):
    return _mapping.index(strresult)

def result_to_string(result):
    return _mapping[result]

Add forward/reverse mapping of checkerstati
Add forward/reverse mapping of checkerstati

  
  from checker.local import LocalChecker as BaseChecker
  #from checker.contest import ContestChecker as BaseChecker
  
  OK = 0
  TIMEOUT = 1
  NOTWORKING = 2
  NOTFOUND = 3
  
+ _mapping = ["OK", "TIMEOUT", "NOTWORKING", "NOTFOUND"]
+ 
+ def string_to_result(strresult):
+     return _mapping.index(strresult)
+ 
+ def result_to_string(result):
+     return _mapping[result]
+ 
Add forward/reverse mapping of checkerstati
## Code Before:

from checker.local import LocalChecker as BaseChecker
#from checker.contest import ContestChecker as BaseChecker

OK = 0
TIMEOUT = 1
NOTWORKING = 2
NOTFOUND = 3

## Instruction:
Add forward/reverse mapping of checkerstati
## Code After:

from checker.local import LocalChecker as BaseChecker
#from checker.contest import ContestChecker as BaseChecker

OK = 0
TIMEOUT = 1
NOTWORKING = 2
NOTFOUND = 3

_mapping = ["OK", "TIMEOUT", "NOTWORKING", "NOTFOUND"]

def string_to_result(strresult):
    return _mapping.index(strresult)

def result_to_string(result):
    return _mapping[result]
