8月19日CCPC——Party(未解决)
来源:互联网 发布:停车场找车软件 编辑:程序博客网 时间:2024/06/06 01:43
Problem DescriptionQscqesze is going to hold a blind date party.He takes n boys and m girls into consideration of invitation.Each of them gets a number as a1..an and b1..bm.The party is in pairs.Everyone is required to choose an opposite sex who is also invited.Every one should be in an only pair.Qscqesze knows everypair of them if they are willing to come together.For better result,he wants to ascertain the invitation list to make everyone could gets it's partner.After his assistant ascertain the invitation list,she writes down the list on a piece of paper.As she is careless,she just writes part of the list down. That is to say Qscqesze gets a piece of paper with incomplete invitation list.Here comes q questions: how many kinds of paper he might get if all guest in complete list has common divisor gi? InputThe first line contains a integer T,indicates the number of testcase.In each testcase:The first line contains there integer n m and q,indicates the number of boys ,the number of girls and the number of question.The next n line contains one 0/1-strings,if the i-th string's j-th character is 1 means the i-th boy is willing to come with the j-th girl and vice versa.The next line contains n integers, they are ai.The next line contains m integers, they are bi.The next line contains q integers,they are gi. OutputFor each test case, output a single line "Case #x: ans1 ans2 ... ansq", where x is the case number, starting from 1. And ans1..ansq is the answer. Sample Input13 3 20101110104 2 68 12 5 2 3 Sample OutputCase #1: 23 3Hint1<=T<=100 1<=n,m<=20 n+m>=20的数据组数为31<=q<=101<=g,ai,bi<=1e9;
答案未更新......
阅读全文
0 0
- 8月19日CCPC——Party(未解决)
- 8月19日CCPC——Vertex Cover(未解决)
- 8月19日CCPC——A Secret(未解决)
- 8月19号CCPC——Palindrome Function(未解决)
- 8月19号CCPC——The Karting(未解决)
- 8月19日CCPC——Friend-Graph
- 8月19号CCPC——CaoHaha's staff(未解答)
- 8月19号CCPC——The Designer(未解答)
- 8月19号CCPC——Graph Of Zhuper(未解答)
- 2009年8月22日broadview博文视点Open Party第4期——程序员职业规划
- 会议记录(7月26日——8月25日)
- 2009年6月13日broadview博文视点Open Party第1期——Web开发新势力
- 8月19日
- ACM训练日记—8月19日
- 【周报】第七周(8月17日~8月23日)工作总结报告——移动应用端
- 【周报】第八周(8月24日~8月30日)工作总结报告——遇到的问题篇
- 8月19日--8月24日(共32小时,还有5160小时)
- 3月13日——3月19日:新闻策划与研究
- HDU 3746 Cyclic Nacklace(KMP)
- POJ-1860-Currency Exchange [最短路][BellmanFord]
- 谈下最近接触的zpl语言
- Excel 2016比“分列”还强大千倍的功能
- Day04 Sqlite数据库
- 8月19日CCPC——Party(未解决)
- 应用服务器未安装oracle,安装PLSQL的方法
- 多条件组合查询
- 基于android6.0版本的SELinux文件访问安全策略
- 安卓折线图折线图charts
- Inno Setup 权限问题
- 综合---扩展方法集
- linux系统无网卡配置文件
- session