How to do this question in C language? Why is it not right anyway?

Updated on technology 2024-02-09
6 answers
  1. Anonymous users2024-02-06

    The procedure is as follows,You can paste your**,Everyone**There is a mistake there.,ACM's questions pay attention to formatting.,It's wrong to get the format wrong.。

    #include

    #include

    int main()

    int a,b,c;

    double p,s;

    p=(a+b+c)/;

    s=sqrt(p*(p-a)*(p-b)*(p-c));

    printf("%.2lf",s);

    return 0;

  2. Anonymous users2024-02-05

    Forehead.. You don't have to study C before you want to take the ACM? It's okay, take your time

    I participated in ACM during my college years and only won a bronze medal. Let's talk about my experience

    Learning a programming language is nothing more than reading books + practice.

    To learn C language, the entry point in China is Tan Haoqiang's book Green Book, study hard. If you don't have a good impression of domestic books, you can take a look at C Primer Plus. If you want to learn more comprehensively, you must look at the C programming language written by Brian and Denis.

    The above is the language part. But to play ACM, it's not enough.

    Computer science majors will take two courses, data structure and algorithm design, which are very important. So, if you want to improve your algorithmic skills, you must learn these two subjects well. I also recommend a few books, Yan Weimin's data structure in China and Wang Xiaodong's computer algorithm design and analysis.

    Data Structure and Algorithm Analysis by Mark Allen Weiss: Introduction to C Language Description and the Famous MIT Algorithm. Note that foreigners' books are more comprehensive and complex, whether it is the beginner stage or the later ability improvement, it will be helpful!

    If you get started, it's still domestic

    Learning the above content well just shows that your theoretical foundation is passing. It's all about coding. ACM is a combination of theory and practice.

    There will be a lot of tricks and rules in actual programming, and it's up to you to figure it out. Of course, there are many good books in China for specific ACM competitions, whether it is ACM rules, coding debugging skills or algorithm theory, such as Liu Rujia's book is very worth reading. I recommend Liu Rujia's black book "Algorithm Art and Informatics Competition" (later view) and his "Algorithm Art and Informatics Competition: Introductory Classics of Algorithm Competition" (available in the early stage).

    In addition, be sure to practice a lot, the major OJs, including ZOJ, POJ, etc., are all places to practice. Be sure to brush the questions diligently, ask if you don't understand, search more on the Internet, and someone will answer almost all the questions

    In the end, it was hard work to attend ACM. In addition to training, in the later stage, you have to learn to work together, after all, ACM is a team of three. To find what you are good at, a person is rarely the ACM all-rounder, whether you are good at searching, or dynamic programming, you must know very well.

    In addition, mathematical theories should be strengthened! Concrete mathematics, discrete mathematics, combinatorial mathematics, and purposefully refining your own mathematical theories according to your role and function in the team

    The order in which the above is not stated is not fixed. For example, after learning C language, you can brush water problems on OJ, and then you can learn algorithms and data structures at the same time, and do problems on OJ at the same time

    Having said that, one final word, welcome to ACM!

  3. Anonymous users2024-02-04

    1. The title says that it is impossible to meet and output impossible, why is there no output impossible in your **?

    For example, this set of data: 1 2 1 1 5, what will your ** output if you try it?

    2. The problem of ACM is not only to have the correct result, but also to be able to solve it within a certain period of time, usually 1 second.

    Try this set of data: 1 2000000000 2 1 200000000000 and see how long it will take to calculate, this is not the limit data in the case of a solution.

  4. Anonymous users2024-02-03

    You search the internet.

    Extend Euclidean's algorithm.

  5. Anonymous users2024-02-02

    Equal, both sides cancel out! Equal, hope!

  6. Anonymous users2024-02-01

    Data structures, stacks, queues, binary trees...

Related questions
4 answers2024-02-09

2. 1, True 2, False (there is only one program) 3, False (not necessarily) 4, True. >>>More

12 answers2024-02-09

An escape character is a special form of representation of characters in the C language. Escape characters are commonly used to represent non-printable control characters and function-specific characters in the ASCII character set, such as the one-apostrophe (which is used to represent character constants'), which is used to represent a double apostrophe (") and backslashes (etc. Escape characters are represented by a backslash followed by a character or an octal or hexadecimal number. >>>More

4 answers2024-02-09

It's not very hard that the tail node next points to null. >>>More

7 answers2024-02-09

#include

using namespace std; >>>More

5 answers2024-02-09

Question 1: Something is missing here:

if(aelse k=b%a; >>>More