How to find a solution to a problem

Source: Internet
Author: User

How to find a solution to the problem TopCoder PYALG statement

This article is a translation report of how to Find a solution. The original author is Dumitru.

Brief introduction

Many problems of TopCoder can be answered directly by reading questions. The reason is that many topics have similar patterns in some way. Most skilled coder have mastered the corresponding patterns found in the topic. This pattern can be some sort of algorithmic data structure, or it can be some kind of abstract modeling.
The purpose of this article is to enable everyone to have the ability to observe the internal patterns of the subject.

A simple question of solving methods

Most SRM 250points topics belong to this type. In this type of problem, the main answer is to translate the description of the topic into code . This type of topic does not examine the algorithm, examines the problem solving speed and the correctness.

BUSINESSTASKS–SRM 236 Div 1:
N tasks is written the form of a circular list, so the first task was adjacent to the last one. A number n is also given. Starting with the first task, move clockwise (from element 1 in the list to element 2 in the list and so on), counting fro M 1 to N. When your count reaches N, remove this task from the list and start counting from the next available task. Repeat This procedure until one task remains. Return it.

Test

How to find a problem solution

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.