建议网站练习 C/C++ 算法/拼图
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/11633548/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Suggest websites to practice C/C++ algorithms/puzzles
提问by Kaniks
I want to practice problem solving in C/C++. But I want to avoid writing the whole program from scratch. Is there any website where they give me puzzles and the code skeleton along with it and expect me to only fill a function or two to solve the problem at hand? This would save a lot of time and I can concentrate only on the problem solving part.
我想练习用 C/C++ 解决问题。但我想避免从头开始编写整个程序。有没有网站,他们给我谜题和代码框架,并希望我只填写一两个功能来解决手头的问题?这会节省很多时间,我可以只专注于解决问题的部分。
Thanks.
谢谢。
采纳答案by CrociDB
I don't know any website that works the way you said, but most of these is just simples. You just have to read from standard input and print to standard output.
我不知道有任何网站可以像您说的那样工作,但其中大部分都只是简单的。您只需要从标准输入读取并打印到标准输出。
Also, most of the problems of the same site will work the same way, so once you solve your first problem, you just have to use its skeleton to solve others.
此外,同一站点的大多数问题都会以相同的方式运行,因此一旦您解决了第一个问题,您只需使用其框架来解决其他问题。
回答by Code-Apprentice
Advent of Codeposts new problems every year starting on Dec 1. The problems have a Christmas-themed story, involving Santa Claus and his elves. There are leader boards so you can compete with your friends. You can also revisit previous years problems and solve them.
Advent of Code每年从 12 月 1 日开始发布新问题。这些问题有一个以圣诞节为主题的故事,涉及圣诞老人和他的精灵。有排行榜,所以你可以与你的朋友竞争。您还可以重新审视前几年的问题并解决它们。
Project Eulerhas almost 400 programming puzzles. There are no frameworks, but the first few puzzles are simple enough that this shouldn't be a problem.
Project Euler有近 400 个编程难题。没有框架,但前几个谜题很简单,这应该不是问题。
TopCoderIs an online coding competition site. You can open past problems in their competition arena applet for practice. All you need to do is write the one function described in the problem. However, the problems have a wide range of difficulty. Even the easiest ones are more difficult than the beginning ones at Project Euler.
TopCoder是一个在线编码竞赛网站。您可以在他们的比赛竞技场小程序中打开过去的问题进行练习。您需要做的就是编写问题中描述的一个函数。然而,这些问题具有广泛的难度。在 Project Euler 中,即使是最简单的也比开始时更难。