abel Tool Sample
Requires: Visual Basic 6 and MapObjects 2.x
Data: redlands.shp (Redlands sample data set from MO 2.x)
Interactive Labeling Tool
If the check box is checked, then the mouse down location will search for the closest LINE, and label it with the street name. If the check box is not checked, then the mouse down will turn into a pan/zoom tool.
There is a slider bar to control the search tolerance in screen pixels for the labeling.
數(shù)字運(yùn)算,判斷一個(gè)數(shù)是否接近素?cái)?shù)
A Niven number is a number such that the sum of its digits divides itself. For example, 111 is a Niven number because the sum of its digits is 3, which divides 111. We can also specify a number in another base b, and a number in base b is a Niven number if the sum of its digits divides its value.
Given b (2 <= b <= 10) and a number in base b, determine whether it is a Niven number or not.
Input
Each LINE of input contains the base b, followed by a string of digits representing a positive integer in that base. There are no leading zeroes. The input is terminated by a LINE consisting of 0 alone.
Output
For each case, print "yes" on a LINE if the given number is a Niven number, and "no" otherwise.
Sample Input
10 111
2 110
10 123
6 1000
8 2314
0
Sample Output
yes
yes
no
yes
no
2^x mod n = 1 acm競賽題 Give a number n, find the minimum x that satisfies 2^x mod n = 1.
Input
One positive integer on each LINE, the value of n.
Output
If the minimum x exists, print a LINE with 2^x mod n = 1.
Print 2^? mod n = 1 otherwise.
You should replace x and n with specific numbers.
Sample Input
2
5
Sample Output
2^? mod 2 = 1
2^4 mod 5 = 1
Implemented BFS, DFS and A*
To compile this project, use the following command:
g++ -o search main.cpp
Then you can run it:
./search
The input is loaded from a input file in.txt
Here is the format of the input file:
The first LINE of the input file shoud contain two chars indicate the source and destination city for breadth first and depth first algorithm.
The second LINE of input file shoud be an integer m indicate the number of connections for the map.
Following m LINEs describe the map, each LINE represents to one connection in this form: dist city1 city2, which means there is a connection between city1 and city2 with the distance dist.
The following input are for A*
The following LINE contains two chars indicate the source and destination city for A* algorithm.
Then there is an integer h indicate the number of heuristic.
The following h LINEs is in the form: city dist which means the straight-LINE distance from the city to B is dist.
Predefined Style options define the style by setting several other options. If other options are also used, the placement of the predefined style option in the command LINE is important. If the predefined style option is placed first, the other options may override the predefined style. If placed last, the predefined style will override the other options.
For example the style --style=ansi sets the option --brackets=break . If the command LINE specifies "--style=ansi --brackets=attach", the brackets will be attached and the style will not be ansi style. If the order on the command LINE is reversed to "--brackets=attach --style=ansi ", the brackets will be broken (ansi style) and the attach option will be ignored.
For the options set by each style check the parseOption function in astyle_main.cpp
AutoSummary contains the JWords Java Interface for WordNet, and you will need to edit the JWords configuration file to provide a path to the WordNet command LINE interface.