
枚举
shishiness
这个作者很懒,什么都没留下…
展开
-
pat 甲级 Hash散列 A1048 Find Coins (25分)
#include<cstdio> int hash[10010]; int main() { int n,m,a; scanf("%d %d",&n,&m); for(int i=0;i<n;i++) { scanf("%d",&a); hash[a]++; } for(int i=0;i<10010;i++) { if(hash[i]&&hash[m-i]) { if(i==m-i&&ha.原创 2020-08-27 20:07:20 · 121 阅读 · 0 评论 -
pat 甲级 枚举 A1148 Werewolf - Simple Version (20分)
1148 Werewolf - Simple Version (20分) Werewolf(狼人杀) is a game in which the players are partitioned into two parties: the werewolves and the human beings. Suppose that in a game, player #1 said: "Player #2 is a werewolf."; player #2 said: "Player #3 is a原创 2020-07-22 08:50:30 · 131 阅读 · 0 评论