
from itertools import combinations def check(iterPeople, n): result = [] for peoples in iterPeople: iList, oList = [], [] for people in peoples: iList.append(people['inFu']) #想要的福卡 oList.append(people['outFu']) #给出的福卡 iSet, oSet = set(iList), set(oList) if iSet == oSet and len(iSet) == n: result.append(peoples) return result def matchResult(n): people = people # 登记需求的用户 result = check(combinations(people, n), n) return result 1 CodeingBoy 2017 年 1 月 19 日 想要的福卡只能挑一个……那为什么要做成多选的→_→ |
2 deleted OP @CodeingBoy 这正是跨时代的前端不验证,只在后端验证啊 |
4 CodeingBoy 2017 年 1 月 19 日 |
5 deleted OP @CodeingBoy 支付宝隐私是设置了不验证,后来才发现不在通讯录还是要验证 |
7 jadecoder 2017 年 1 月 19 日 这个真的 666 |
8 velee 2017 年 1 月 19 日 我就知道有程序员无聊会做这个,为楼主的执行力点赞! |
9 Arcus 2017 年 1 月 19 日 via Android 怕是不符合价值观,封你支付宝账号 |
10 shyrock 2017 年 1 月 20 日 不错不错,思路和行动力都不错 |
11 0747916 2017 年 1 月 20 日 good job |
12 0747916 2017 年 1 月 20 日 前端:我有一句 xxx 不知当讲不当讲 233 |
13 solmur 2017 年 1 月 21 日 via Android 试试看 |
14 SoulGem 2017 年 1 月 22 日 默默地看了一眼 ngrok 的域名…… |