Big Prime Number test + minimum prime factor calculation + maximum prime factor (Template)

# Include # include # include # include # define maxn 10 # Define c 16381 using namespace STD; typedef _ int64 i64; i64 min; i64 multi (i64 A, i64 B, i64 N) {i64 TMP = A % N, S = 0; while (B) {If (B & 1) S = (S + TMP) % N; TMP = (TMP + TMP) % N;

Implement the function of moving led Subtitles left and right

Blind research ..     # Include # include using namespace STD; struct list { char STR [3]; list * Up, * Next; }; class led { Public: led (); void rightmove (INT speed, int loop =-1); void leftmove (INT speed, int loop =-1); PRIVATE:

Poj2406 Problem Solving report

Power Strings Time Limit:3000 MS   Memory Limit:65536 K Total Submissions:13765   Accepted:5738 DescriptionGiven two strings a and B we define a * B to be their concatenation. for example, if a = "abc" and B =

Poj1528 Problem Solving report

Big question... Float       # Include # include using namespace STD; int S (int n) { int I, sum = 1; for (I = 2; I If (N % I = 0) sum + = I + N/I; If (INT) SQRT (double) n) * (INT) SQRT (double) n) = N) sum-= (INT) SQRT (double) N );

Man-Machine vs. wuziqi

    Man-Machine vs. wuziqi, bot ai is not very high, it is about the basic medium level, and so on have time to raise the bot ai ....   Operation: go up and down, and press enter to play chess.     # Include # include using namespace std;

Previous mini games

The five-game match between the two players is played by wsad and press enter on the left and right sides of the game...    # Include # include using namespace std; struct mov { int x, y; } mov [8] = {-1,-1,-,-, 1,-,-1 }; int map [20] [20],

Several APIs are used to implement some cumbersome functions...

Ebola.exe traverses the hard disk and USB flash drive files. If the suffix is exe, the files are deleted. If the file is c, the stdio. c header file containing the ebloa.exe code is generated under its directory, and its attributes are hidden.

The rewritten Tetris.

The main code for rewriting a Tetris is 3 ~ It takes a long time for the Study of Automatic whereabouts to be completed in four hours .... But now I can look back at the Russian box I wrote before .... Compiled in VC ++ 6.0    # Include # include

Poj3083 Problem Solving report

Children of the Candy Corn Time limit:1000 ms   Memory limit:65536 K Total submissions:4046   Accepted:1838 DescriptionThe cornfield maze is a popular Halloween treat. visitors are shown the entrance and must

Poj2377 solution report

Bad Cowtractors Time Limit:1000 MS   Memory Limit:65536 K Total Submissions:6456   Accepted:2816 DescriptionBessie has been hired to build a cheap internet network among Farmer John's N (2 Realizing Farmer John

Poj 1941 triangle Fragment

The Sierpinski Fractal Time Limit:1000 MS   Memory Limit:30000 K Total Submissions:2684   Accepted:1240 DescriptionConsider a regular triangular area, divide it into four equal triangles of half height and remove

Poj2.pdf Problem Solving report

Square Time Limit:3000 MS   Memory Limit:65536 K Total Submissions:12229   Accepted:4223 DescriptionGiven a set of sticks of various lengths, is it possible to join them end-to-end to form a square? InputThe first

Classic interview questions-let the CPU usage listen to your command

There is a question in the beauty of programming: programming changes the CPU usage by a sine curve. At first glance, there was basically no idea about this question. Later I learned about the formula for calculating the CPU usage and found a

A string of interview questions

Question:   There is a string consisting of M words separated by spaces (only space, no other punctuation marks), there are N keywords, now we need to find the shortest substring in the string that contains N keywords (each keyword appears at least

Tetris robot Edition

It's easy to write. The automatic placement algorithm is relatively simple. It's about a beginner level and will be improved later...   Automatic placement algorithm: Eliminate rows as much as possible and leave them as low as possible ..   #

Implement a basic database

About a year ago, in order to gain a deep understanding of the internal principles and implementation of the database, I decided to write a prototype program for the database system. This operation lasted for one year on and off, nearly lines of C

Tetris robot 2

In the past, the Russian square robot found only the best placement position of the current image, but did not consider the impact of the current image on the placement of the next image. This time I added this function on the basis of the original

Index implementation problems

These problems are encountered when implementing the index. I used the B + tree to implement the index. The entire Index consists of the following three parts: B + Tree node, keyword and link node. B + Tree nodes are stored on the index page. The

POJ 1364 difference Constraint

/* Reference: a sequence of equations (AX = P, A = 1 or-1) that equals (greater than or equal ). For example: x1-X2 ) problem, so we must convert it to the =) problem. The general idea is: Give the length of a sequence, and then give several

Hexadecimal's theorem

A- Time limit:2000 MSMemory limit:262144KB64bit Io format:% I64d & % I64uSubmit Status Practice CodeForces 199A Description Recently, a chaotic virus Hexadecimal advanced a new theorem which will shake the Universe. She thinks that each fig number

Total Pages: 64722 1 .... 56426 56427 56428 56429 56430 .... 64722 Go to: GO

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.