![](https://img-blog.csdnimg.cn/20201014180756925.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
pat
qq_30478929
这个作者很懒,什么都没留下…
展开
-
1114. Family Property
This time, you are supposed to help us collect the data for family-owned property. Given each person’s family members, and the estate(房产)info under his/her own name, we need to know the size of each fa原创 2017-02-19 15:16:32 · 221 阅读 · 0 评论 -
1112. Stucked Keyboard (20)
On a broken keyboard, some of the keys are always stucked. So when you type some sentences, the characters corresponding to those keys will appear repeatedly on screen for k times.Now given a resulting原创 2017-02-19 19:10:10 · 130 阅读 · 0 评论 -
1065. 单身狗(25)
“单身狗”是中文对于单身人士的一种爱称。本题请你从上万人的大型派对中找出落单的客人,以便给予特殊关爱。输入格式:输入第一行给出一个正整数N(<=50000),是已知夫妻/伴侣的对数;随后N行,每行给出一对夫妻/伴侣——为方便起见,每人对应一个ID号,为5位数字(从00000到99999),ID间以空格分隔;之后给出一个正整数M(<=10000),为参加派对的总人数;随后一行给出这M位客人的ID,以空原创 2017-02-14 11:25:44 · 153 阅读 · 0 评论 -
1064. 朋友数(20)
如果两个整数各位数字的和是一样的,则被称为是“朋友数”,而那个公共的和就是它们的“朋友证号”。例如123和51就是朋友数,因为1+2+3 = 5+1 = 6,而6就是它们的朋友证号。给定一些整数,要求你统计一下它们中有多少个不同的朋友证号。注意:我们默认一个整数自己是自己的朋友。输入格式:输入第一行给出正整数N。随后一行给出N个正整数,数字间以空格分隔。题目保证所有数字小于104。输出格式:首先第一原创 2017-02-14 11:37:22 · 186 阅读 · 0 评论 -
1122. Hamiltonian Cycle (25)
The “Hamilton cycle problem” is to find a simple cycle that contains every vertex in a graph. Such a cycle is called a “Hamiltonian cycle”.In this problem, you are supposed to tell if a given cycle is原创 2017-02-14 14:10:14 · 119 阅读 · 0 评论 -
1127. ZigZagging on a Tree (30)
很简单的题,先根据中序排序,与后序排序递归建树,然后层次遍历存入到out数组中,用now存储当前遍历的先后次序,用level来存储当前层数,date存储数据。用sort结构体排序,不同层次按从小到到排。相同层次,如果是奇数层,按now大到小排,如果为偶数层,按now的大小到大排。#include<iostream> #include<cstdio> #include<vector> #includ原创 2017-03-04 19:17:47 · 381 阅读 · 0 评论 -
1108. Finding Average (20)
2的测试点过不了是这个问题 The average of 1 number is Y#include<iostream> #include<cstdio> #include<cstring> #include<cstdlib> using namespace std; double sum=0; int judge(char arr[]) { int len=strlen(arr原创 2017-02-27 17:40:45 · 143 阅读 · 0 评论