分类 技术 下的文章

这是唯一一篇完全撕掉之前的文章,重新撰写的文章。

文章之前的标题是《不定时更新的 ACM 模板》

然鹅现在,完结啦!!!撒花!!!(???)

退役来,多的就不说了,模板打包成 PDF 保留。

比赛模板.pdf

我不想做程序员。

莫名的有些反感这个词。不知从什么时候开始,程序员这个词的重心似乎已经不在“程序”上了,而成了木讷、呆板、情商低乃至直男癌的代名词。欢乐颂2我是没看的,但是其名气大到我通过日常的种种途径也知道了其中的“标准程序员”——应勤,其所作所为,我真的不知道大家是不是对程序员的印象就是这样的,程序员是不是已经成了具有鲜明特点的“范式”,真的能从其职业看出一个人的人品吗?

其实像乔布斯,linus,盖茨这些人都是不能被称之为“程序员”的,就比如乔布斯,我更倾向于他是一位艺术家。当然我达不到他们的高度和水准,但是我也不希望被唤作“程序员”,我希望自己是个梦想家,是个艺术家,抑或是个诗人,我做不到也不想出名,我只是想做我自己的诗人,念自己喜欢的诗,而不是面向工资编程、人生索然无味的“程序员”。

其实从本身决定入这一行,直到现在,我对计算机的热爱没有减过一丝一毫,我热爱技术,这是流在血液里的信仰,简单,又不简单。只是人们对于“程序员”贴的标签,让我觉得有些无奈与迷茫。

只是现在眼界太小,总是纠结于这些鸡毛蒜皮的小事,好在自己刚步入大学,还在成长。我有些迷茫,但我从不畏惧。借用同学一句话:愿都能成长成自己想要的模样。

又是一篇胡言乱语,夜已至半,晚安。

最近做的都是英文题,正好顺手测试一下各翻译网站的翻译能力。

原文

Farmer John completed his new barn just last week, complete with all the latest milking technology. Unfortunately, due to engineering problems, all the stalls in the new barn are different. For the first week, Farmer John randomly assigned cows to stalls, but it quickly became clear that any given cow was only willing to produce milk in certain stalls. For the last week, Farmer John has been collecting data on which cows are willing to produce milk in which stalls. A stall may be only assigned to one cow, and, of course, a cow may be only assigned to one stall.
Given the preferences of the cows, compute the maximum number of milk-producing assignments of cows to stalls that is possible.

The input includes several cases. For each case, the first line contains two integers, N (0 <= N <= 200) and M (0 <= M <= 200). N is the number of cows that Farmer John has and M is the number of stalls in the new barn. Each of the following N lines corresponds to a single cow. The first integer (Si) on the line is the number of stalls that the cow is willing to produce milk in (0 <= Si <= M). The subsequent Si integers on that line are the stalls in which that cow is willing to produce milk. The stall numbers will be integers in the range (1..M), and no stall will be listed twice for a given cow.

For each case, output a single line with a single integer, the maximum number of milk-producing stall assignments that can be made.


- 阅读剩余部分 -

2017-04-16更新:

void init_prime(int n) //欧拉素数筛法
{
    for(int i = 2; i <= n; i++)
    {
        if(!prime[i])
            prime[++prime[0]] = i;
        for(int j = 1; j <= prime[0] && prime[j] <= n / i; j++)
        {
            prime[prime[j] * i] = 1;
            if(i % prime[j] == 0)
                break;
        }
    }
}

以下是原文

- 阅读剩余部分 -