# import pickle
# import pandas as pd


# title=[]
# with open('../../submission_202110142140.csv', 'r') as f:
#     records = f.readlines()
#     title = records[0].replace("\"","").split(',')

# records = pd.read_csv('./submission_202110142140.csv')
# pros = records["code"].to_list()
# id = range(len(pros))
# pm_id = records["problem_id"].to_list()

# dic={}
# for i in range(len(pros)):
#     problem_id = pm_id[i]
#     if not dic.get(problem_id):
#         dic[problem_id] = []
#     dic[problem_id].append(i)
    
# pairs_a = []
# pairs_b = []
# for k,v in dic.items():
#     for i in range(len(v)):
#         for j in range(i+1, len(v)):
#             pairs_a.append(v[i])
#             pairs_b.append(v[j])
            
# pair_data = {'id1': pairs_a, 'id2':pairs_b}
# newpair = pd.DataFrame(pair_data, columns=["id1","id2"])
# newpair.to_csv('./data/c/id_pair.csv')


# Data = {'0': id, '1': pros}
# newdata = pd.DataFrame(Data, columns=["0","1"])


# newdata.to_csv('./data/c/newproblems.csv')