@staticmethod
def parse(url):
    """
        For problem: https://codeforces.com/problemset/problem/1257/D, the url can be:
        - https://codeforces.com/problemset/problem/1257/D
        - http://codeforces.com/problemset/problem/1257/D
        - codeforces.com/problemset/problem/1257/D
        - 1257/D
        - 1257D
        :param url:
        :return:
        - refined url: https://codeforces.com/problemset/problem/1257/D
        - status url: https://codeforces.com/problemset/status/1257/problem/D
        """
    url = url.strip()
    status_url = url
    problem_id = ''
    if url.startswith('https://') or url.startswith('http://'):
        problem_id = url[url[:-2].rfind('/') + 1:]
    elif url.startswith('codeforces.com'):
        url = 'https://' + url
        problem_id = url[url[:-2].rindex('/') + 1:]
    else:
        problem_id = url
        if url.find('/') < 0:
            problem_id = problem_id[:-1] + '/' + problem_id[-1]
        url = 'https://codeforces.com/problemset/problem/' + problem_id
    status_url = 'https://codeforces.com/problemset/status/%s/problem/%s' % (
        problem_id[:-2], problem_id[-1:])
    return url, status_url
