syf 发布的文章

我不想做程序员。

莫名的有些反感这个词。不知从什么时候开始,程序员这个词的重心似乎已经不在“程序”上了,而成了木讷、呆板、情商低乃至直男癌的代名词。欢乐颂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;
        }
    }
}

以下是原文

- 阅读剩余部分 -