Some of the algorithms getting started should understand something

Source: Internet
Author: User

Floor (x) returns the integer portion of x General usage for floor (x + 0.5)

sprintf means that the output to a string fprintf is output to a file,

printf ("%d", clock ()/clocks_per_sec) outputs the time at which the program runs;

IsDigit (x) determines whether x is an integer;

ASSERT.T assert (x>=0) means that the program terminates abnormally when X>=0 is not established.

When you write a recursive algorithm, remember to pay attention to the termination condition

Keyboard dislocation You can define a constant array

Cycle string Highlights word[j] = word[j%i];

Ask 1000! The exact value of f[0] = 1 for (i = 2;i < n;i++)

{

for (j = 0;j < maxn;j++)

{

int s = i * f[j] + C;

F[H] = s% 10;

c = S/10;

}

}

Some of the algorithms getting started should understand something

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.