PTA 1121 Damn Single】的更多相关文章

题目链接:1121 Damn Single (25 分) "Damn Single (单身狗)" is the Chinese nickname for someone who is being single. You are supposed to find those who are alone in a big party, so they can be taken care of. Input Specification: Each input file contains on…
1121 Damn Single (25 分) "Damn Single (单身狗)" is the Chinese nickname for someone who is being single. You are supposed to find those who are alone in a big party, so they can be taken care of. Input Specification: Each input file contains one tes…
1121. Damn Single (25) 时间限制 300 ms 内存限制 65536 kB 代码长度限制 16000 B 判题程序 Standard 作者 CHEN, Yue "Damn Single (单身狗)" is the Chinese nickname for someone who is being single. You are supposed to find those who are alone in a big party, so they can be t…
1121 Damn Single (25 分) "Damn Single (单身狗)" is the Chinese nickname for someone who is being single. You are supposed to find those who are alone in a big party, so they can be taken care of. Input Specification: Each input file contains one tes…
"Damn Single (单身狗)" is the Chinese nickname for someone who is being single. You are supposed to find those who are alone in a big party, so they can be taken care of. Input Specification: Each input file contains one test case. For each case, t…
"Damn Single (单身狗)" is the Chinese nickname for someone who is being single. You are supposed to find those who are alone in a big party, so they can be taken care of. Input Specification: Each input file contains one test case. For each case, t…
博主欢迎转载,但请给出本文链接,我尊重你,你尊重我,谢谢~http://www.cnblogs.com/chenxiwenruo/p/6789787.html特别不喜欢那些随便转载别人的原创文章又不给出链接的所以不准偷偷复制博主的博客噢~~ 给出n个couple和m个宾客如果宾客没有couple或者couple没来,则被认为lonely问你有多少个lonely的宾客,并且按照id的升序输出 #include <iostream> #include <cstdio> #include…
题意: 给出n对情侣,然后给出聚会上的m个人,问这m个人中有几个人事落单的. 思路: 首先,开一个数组couple[]存储情侣间的映射关系:然后,用exist[]标记聚会上出现过的人:最后遍历0~N,如果当前这个id在聚会中出现过,就考察其对应的couple即可.需要注意的是,由于人的id是从00000~99999,所以要注意输出格式的控制,还有,在初始化couple的时候要设置成-1,而不可是0(因为id可能是0): 代码: #include <cstdio> #include <cs…
1121. Damn Single (25) 时间限制 300 ms 内存限制 65536 kB 代码长度限制 16000 B 判题程序 Standard 作者 CHEN, Yue "Damn Single (单身狗)" is the Chinese nickname for someone who is being single. You are supposed to find those who are alone in a big party, so they can be t…
2019/4/3 1063 Set Similarity n个序列分别先放进集合里去重.在询问的时候,遍历A集合中每个数,判断下该数在B集合中是否存在,统计存在个数(分子),分母就是两个集合大小减去分子. // 1063 Set Similarity #include <set> #include <map> #include <cstdio> #include <iostream> #include <algorithm> using name…