It is a big mistake to start from hard problems. Many World Finals problems are too hard for lots of experienced programmers, so it is no surprise that it is also too hard for someone new.
As others have said, start with much easier problems. I am assuming you know the basics of programming and can write code in at least one programming language. Try problems from Division-2 problemsets on TopCoder, and Regional/Qualifying rounds of ACM ICPC. Find out the easy problems from sites like SPOJ, UVa and Project Euler (there are lists of easy problems available online) and solve them. As you solve, also read up on the basics of algorithms and computer science. TopCoder is a great resource since they have lots of tutorials and articles and also allow you to view other people's solutions.
IMHO, becoming a better programmer in general takes a lot of practice and study. There is no shortcut. You cannot assume that you are some sort of hero programmer who can just jump in and solve everything. You just have to accept that there is a long way to go, and start at the beginning.
You should start with much easier problems. Try looking for regionals, or even get the problems from the local schools contest. You need to have a large view of general programming, from data structures to algorithms. Master a basic programming language, one that the answers are accepted.
You cannot start learning programming by doing competitions. If you don't know any programming at all, the first programs you will write are things like "hello world", fibonacci and ackermann. Starting with things like TopCoder is like learning to drive using a formula one car. It doesn't work that way.
In short, you have to know some basic techniques that are used to develop this kinds of problems. Knowing dynamic programming, backtracking algorithms, searching, etc, helps you a lot when solving the problems.
我真正喜欢 Code Jam 的一点是,你几乎可以使用任何你想要的语言,并且你可以从他们的自动判断中获得反馈。如果您遇到了 Code Jam 问题,请查看其他人提到的其他一些网站。
I've been working Google Code Jam problems for the past week or so, and I think they are great exercises. The key is to find problems that stretch your abilities a little, but aren't the ones that make you want to give up. Google Code Jam problems range widely in difficulty!
I recommend starting with the ones under "Where should I start" here:
And then explore all of the competition round 1 problems. If those are too easy move up to the other rounds.
The thing I really like about code jam is that you can use pretty much any language you want, and you can get feedback from their automated judge. If you run out of Code Jam problems check out some of the other sites that others have mentioned.
You are very right JesperE. JPRO, go back to the basics and get it settled from there. Your ability to compete and win programming contests depends on just two things:
Your deep understanding of the language you are using and
发布评论
评论(7)
阅读拉尔森的《通过问题解决问题》。
它是用于数学的,但我发现它对于解决算法问题非常有用。
Read Problem Solving Through Problems by Larson.
It's for mathematics but I find it extremely useful for solving algorithm problems.
从困难的问题入手是一个很大的错误。许多世界总决赛的问题对于许多经验丰富的程序员来说都太难了,因此对于新手来说也太难也就不足为奇了。
正如其他人所说,从更简单的问题开始。我假设您了解编程基础知识并且可以使用至少一种编程语言编写代码。尝试 TopCoder 上的 Division-2 问题集以及 ACM ICPC 的区域/资格赛轮次中的问题。从 SPOJ、UVa 和 Project Euler 等网站找出简单问题(在线提供简单问题列表)并解决它们。在解决问题时,还要阅读算法和计算机科学的基础知识。 TopCoder 是一个很好的资源,因为他们有很多教程和文章,并且还允许您查看其他人的解决方案。
恕我直言,成为一名更好的程序员通常需要大量的练习和学习。没有捷径。你不能假设你是某种英雄程序员,可以直接介入并解决所有问题。你只需要接受还有很长的路要走,并从头开始。
It is a big mistake to start from hard problems. Many World Finals problems are too hard for lots of experienced programmers, so it is no surprise that it is also too hard for someone new.
As others have said, start with much easier problems. I am assuming you know the basics of programming and can write code in at least one programming language. Try problems from Division-2 problemsets on TopCoder, and Regional/Qualifying rounds of ACM ICPC. Find out the easy problems from sites like SPOJ, UVa and Project Euler (there are lists of easy problems available online) and solve them. As you solve, also read up on the basics of algorithms and computer science. TopCoder is a great resource since they have lots of tutorials and articles and also allow you to view other people's solutions.
IMHO, becoming a better programmer in general takes a lot of practice and study. There is no shortcut. You cannot assume that you are some sort of hero programmer who can just jump in and solve everything. You just have to accept that there is a long way to go, and start at the beginning.
你应该从更简单的问题开始。尝试寻找地区问题,甚至从当地学校竞赛中获取问题。
您需要对从数据结构到算法的通用编程有一个广泛的了解。掌握一门基本的编程语言,一种答案被接受的语言。
You should start with much easier problems. Try looking for regionals, or even get the problems from the local schools contest.
You need to have a large view of general programming, from data structures to algorithms. Master a basic programming language, one that the answers are accepted.
你不能通过参加比赛来开始学习编程。如果您根本不懂任何编程,那么您将编写的第一个程序就是“hello world”、斐波那契和阿克曼之类的东西。从 TopCoder 之类的东西开始就像学习驾驶一级方程式赛车一样。事实并非如此。
You cannot start learning programming by doing competitions. If you don't know any programming at all, the first programs you will write are things like "hello world", fibonacci and ackermann. Starting with things like TopCoder is like learning to drive using a formula one car. It doesn't work that way.
简而言之,您必须了解一些用于解决此类问题的基本技术。了解动态规划、回溯算法、搜索等对你解决问题有很大帮助。
Google Code Jam 中的这一题实际上相当难,并且涉及计算几何算法。此处详细介绍了如何解决此问题:http: //code.google.com/codejam/contest/dashboard?c=311101#s=a&a=5
In short, you have to know some basic techniques that are used to develop this kinds of problems. Knowing dynamic programming, backtracking algorithms, searching, etc, helps you a lot when solving the problems.
This one from Google Code Jam is actually pretty hard, and involves computational geometry algorithms. How to solve it is detailed here: http://code.google.com/codejam/contest/dashboard?c=311101#s=a&a=5
过去一周左右,我一直在处理 Google Code Jam 问题,我认为它们是很好的练习。关键是要找到能够稍微拓展你的能力但又不会让你想要放弃的问题。 Google Code Jam 问题难度范围广泛!
我建议从“我应该从哪里开始”下的问题开始:
http://code.google.com/codejam/contests.html
然后探索第一轮比赛的所有问题。如果这些太容易,则进入其他回合。
我真正喜欢 Code Jam 的一点是,你几乎可以使用任何你想要的语言,并且你可以从他们的自动判断中获得反馈。如果您遇到了 Code Jam 问题,请查看其他人提到的其他一些网站。
I've been working Google Code Jam problems for the past week or so, and I think they are great exercises. The key is to find problems that stretch your abilities a little, but aren't the ones that make you want to give up. Google Code Jam problems range widely in difficulty!
I recommend starting with the ones under "Where should I start" here:
http://code.google.com/codejam/contests.html
And then explore all of the competition round 1 problems. If those are too easy move up to the other rounds.
The thing I really like about code jam is that you can use pretty much any language you want, and you can get feedback from their automated judge. If you run out of Code Jam problems check out some of the other sites that others have mentioned.
JesperE 你说得很对。 JPRO,回到基础并从那里解决它。您参与并赢得编程竞赛的能力仅取决于两件事:
You are very right JesperE. JPRO, go back to the basics and get it settled from there. Your ability to compete and win programming contests depends on just two things: