從迷戀電子遊戲,到迷戀電腦編程
我的外孫子Aaron參加了灣區許多城市為喜歡編程(Coding)的中學生舉辦的Codeforces 課程和升級考試。它是一種「ITMO Academy:
pilot course」。 The course will contain a set of
lessons on various topics related to competitive programming. Lessons are
prepared by teachers of ITMO University.The top rated有十個等級,最高一級獲得者名為Beng,考分3783.
Aaron 今年才上高一。他從小就被認為是個患「多動症」的孩子,每時每刻,無論在家裡,還是在學校,都要搞出些怪事,鬧出些動靜。學校好幾次打電話要家長到校長室去把Aaron領回來。其實也沒什麼了不起的事,凈是些雞毛蒜皮的小事,譬如課堂上老師正講著課,他會突然打個驚天動地的「嗝」,引得哄堂大笑。在家裡,他的姐姐正在作功課,他會冷不丁地悄然把檯燈給關上。惹得姐姐追他,打他,他卻高興極了,一邊抵擋,一邊哈哈大笑。後來諮詢了醫生
,醫生說Aaron這樣的小男孩兒,不能算「多動症」,只能算是喜歡吸引人注意,愛出風頭,表現欲強,好勝心強,這種性格具有兩面性,引導不好就會凈幹壞事,引導的好會出類拔萃。
初中開始,Aaron迷上了電子遊戲,你看他埋頭幾個小時在電腦上,以為他在做作業,哪知竟然一有空就在電腦上玩兒電子遊戲,甚至上課時也玩兒。他媽媽給他的電腦上加了個軟體時間鎖,限制他每天玩遊戲時間。哪知這小子竟在網上學習到如何把鎖打開。
有了手機,就更是如魚得水,晚上躺在被窩裡把頭蒙上,一玩兒就幾個小時。
Aaron的媽媽和朋友們交流時,朋友建議她還不如試試把他的興趣引導到編程方面來。於是給他報了個coding的業餘課程,誰知他一下子就迷上了,整天廢寢忘食,還自己到處找coding的題目加強練習。受coding課上的朋友引導,後來參加到Codeforces學校,這可是正規的大學入門課程。最近一次考試,竟能和高三同學媲美,受到學校表彰,還採訪了他們母子,錄製了一檔節目「如何把你的孩子從迷戀電子遊戲引導到迷戀電腦編程」,迷戀電子遊戲可是個困擾了許多家庭的大問題。
幾天前,Aaron在Codeforce網站上,發表了他的第一篇博客,談Codeforce初學者的Tips,全文如下,后附Chat
GTP的中文譯文供參考:
AlwaysAcing's blog
Motivation and Tips for
Beginners!
By AlwaysAcing, 5 days ago
Are you a beginner in the exciting world of competitive
programming? Are you just learning the basics and foundations of competitive
programming? Are you ready to face the exciting yet challenging obstacles of
competitive programming? Look no further! In this blog post, we shall dive into
some valuable tips and tricks in order to help you get started on Codeforces.
Whether you're aiming to improve your problem-solving skills or climb up the
ranks and surpass Benq, these tips will set you on the right path for success.
First and foremost, practice is key! Regular activity on Codeforces
will improve your coding abilities significantly and expose you to unique
algorithms and data structures. Start with simpler problems and gradually
progress to more challenging ones. It is always important to understand the
logic behind each solution and analyze the efficiency of your code.
Next, familiarize yourself with common algorithms and data
structures. Algorithms like binary search, sorting, and dynamic programming,
along with data structures such as arrays, maps/dictionaries, and graphs, form
the building blocks of competitive programming. Study their properties, time
complexities, and implementation details. This could be done by going out of
your comfort zone to look for problems while also learning new algorithm and
data structures that associate with problems that are challenging for you.
Understanding problem statements thoroughly is a very crucial step to solving a
problem. Read them multiple times to learn the requirements accurately.
Identify the input and output constraints, edge cases, and potential traps that
come your way >:D. Break down complex problems into smaller subproblems (yes
this is a dynamic programming reference), and consider writing pseudocode before
diving into the implementation. Developing a structured approach will help you
avoid common mistakes and save time debugging (ew!).
During contests, time management plays an extremely vital role.
Spend sufficient time on each problem based on their difficulty. If you're
stuck on a problem, don't waste too much time on that problem. Move onto
unattempted problems and come back later in order to gain new insights to help
you solve them.
Sometimes, solving more straightforward problems first can boost
your confidence, provide valuable hints for other tougher problems, and build a
basic foundation for your coding path. Actively participate in the Codeforces
community.
Interacting with fellow programmers through discussions, forums,
and virtual contests can accelerate your learning. Analyze the solutions of top
performers in contests to understand their strategies and techniques. Don't
hesitate to ask questions to the awesome (and supportive!) community or seek
help when you're stuck on challenging problems :c. Remember, learning from
others is an key part of your coding journey.
Lastly, maintain a positive and growth mindset. Competitive
programming can be challenging (extremely at times!), and obstacles are
inevitable. Use failure as opportunities in order to further learn, improve,
and enhance your coding skills. Celebrate your successes, no matter how small
they may seem (even after solving a problem!). Consistency and perseverance are
key to long-term progress and improvement. Believe in yourself and keep pushing
your boundaries for improvement. As you embark on your competitive programming
journey on Codeforces and other platforms, remember that it's a marathon, not a
sprint (metaphor!). Embrace the learning process, practice diligently, and stay
motivated. With time, lots of dedication, and these tips in your mind, you'll
gradually unlock new levels of proficiency and achieve your goals! Good luck on
your competitive programming career, and make sure to reach out to me if this
either helped or motivated you!
ChatGPT
AlwaysAcing's
blog
Motivation and Tips for
Beginners!
By AlwaysAcing, 5 days ago
你是競技編程世界里的新手嗎?你剛開始學習競技編程的基礎知識嗎?你準備迎接競技編程中激動人心卻具有挑戰性的障礙嗎?別再尋找了!在這篇博文中,我們將深入探討一些寶貴的技巧,幫助你在Codeforces上入門。無論你是想提高問題解決能力,還是衝刺排行榜超越Benq,這些技巧都會為你成功奠定正確的道路。
首先,實踐至關重要!在Codeforces上的定期活動將大大提升你的編碼能力,並使你接觸到獨特的演演算法和數據結構。從簡單的問題開始,逐漸進階到更具挑戰性的問題。了解每個解決方案背後的邏輯以及分析你的代碼的效率都非常重要。
接下來,熟悉常見的演演算法和數據結構。二分查找、排序、動態規劃等演演算法,以及數組、映射/字典和圖等數據結構,構成競技編程的基石。研究它們的特性、時間複雜度和實現細節。通過走出舒適區尋找問題,同時學習與你挑戰性問題相關的新演演算法和數據結構來實現這一點。
徹底理解問題陳述對於解決問題來說是非常關鍵的一步。多次閱讀問題陳述以準確了解要求。確定輸入和輸出限制、邊界情況以及可能遇到的陷阱
>:D。將複雜的問題分解為較小的子問題(是的,這是動態規劃的參考),在實現之前考慮編寫偽代碼。制定一種有結構的方法將幫助你避免常見錯誤,並節省調試時間(呃!)。
在比賽中,時間管理起著極其重要的作用。根據問題的難度,給每個問題足夠的時間。如果卡在一個問題上,不要在那個問題上浪費太多時間。轉而去嘗試未解決的問題,並在稍後回來獲取解決問題的新見解。有時,先解決一些較簡單的問題可以增加你的信心,為其他更困難的問題提供有價值的提示,並為你的編碼之路打下基礎。
積極參與Codeforces社區。通過討論、論壇和虛擬比賽與其他程序員互動