コード例 #1
0
 def fetch_problems(self):
     query = '''
         SELECT contest_id, p_index, name, type, rating, tags, start_time
         FROM problem
     '''
     res = self.conn.execute(query).fetchall()
     if res is None: return None
     return [(cf.Problem(*r[:6]), r[6]) for r in res]
コード例 #2
0
ファイル: cache_db_conn.py プロジェクト: krofna/TLE
 def _unsquish_tags(problem):
     args, tags = problem[:-1], json.loads(problem[-1])
     return cf.Problem(*args, tags)