UVA 11218 - KTV
摘要:
brute force暴力枚举即可,位运算hash判重#include<stdio.h>
int n,ans;
int a[100],b[100],c[100],d[100],s[100];
void init(){ for(int i=1;i<=n;i++){ d[i]=(1<<a[i])+(1<<b[i])+(1<<c[i]); }
}
int main(){ int i,tm1,tm2; int ca=0; while(scanf("%d",&n)!=EOF && n){ ans=-1; f 阅读全文
posted @ 2012-01-27 22:45 c语言源码 阅读(222) 评论(0) 推荐(0) 编辑