Location:
Search - 1001 p
Search list
Description: pku acm 1001 代码,求数的高精度n次方。-pku acm 1001 code, and the number of high-precision n-th power.
Platform: |
Size: 1024 |
Author: lyd |
Hits:
Description: acm.pku.edu.cn/JudgeOnline上的题目1001到1010的十道题的代码,都是已经通过的,贴到.txt文件中的。-acm.pku.edu.cn/JudgeOnline on the topic of the 1001-1010 title 10 of the code, are already adopted and put into. txt files.
Platform: |
Size: 7168 |
Author: captain |
Hits:
Description: T=[1 0 0 1 0 0 1 0 0
0 1 0 0 1 0 0 1 0
0 0 1 0 0 1 0 0 1]
输入向量的最大值和最小值
threshold=[0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1]
net=newff(threshold,[31 3],{ tansig , logsig }, trainlm )
训练次数为1000,训练目标为0.01,学习速率为0.1
net.trainParam.epochs=1000
net.trainParam.goal=0.01
LP.lr=0.1
net = train(net,P,T)
测试数据,和训练数据不一致
P_test=[0.2101 0.0950 0.1298 0.1359 0.2601 0.1001 0.0753 0.0890 0.0389 0.1451 0.0128 0.1590 0.2452 0.0512 0.1319
0.2593 0.1800 0.0711 0.2801 0.1501 0.1298 0.1001 0.1891 0.2531 0.0875 0.0058 0.1803 0.0992 0.0802 0.1002 -T = [1 0 0 1 0 0 1 0 0 0 1 0 0 1 0 0 1 0 0 0 1 0 0 1 0 0 1] ' of the maximum and minimum input vector threshold = [0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1] net = newff (threshold, [31 3], {' tansig' , ' logsig' }, ' trainlm' ) training times for the 1000 target of 0.01 training, learning rate of 0.1 net.trainParam.epochs = 1000 net. trainParam.goal = 0.01 LP.lr = 0.1 net = train (net, P, T) test data, and training data inconsistencies P_test = [0.2101 0.0950 0.1298 0.1359 0.2601 0.1001 0.0753 0.0890 0.0389 0.1451 0.0128 0.1590 0.2452 0.0512 0.1319 0.2593 0.1800 0.0711 0.2801 0.1501 0.1298 0.1001 0.1891 0.2531 0.0875 0.0058 0.1803 0.0992 0.0802 0.1002
Platform: |
Size: 1024 |
Author: 王飞 |
Hits:
Description: 对一篇由英文字母、空格、标点符号构成的文档,进行Huffman编码
数据输入:
由文件input.txt给出输入数据。
输入文件示例
input.txt
A priority queue is a queue where each element has a priority and the element with the highest
priority is at the front of the queue and will be the first element to be removed.
输出文件示例
output.txt
各字符对应的哈夫曼编码为:
A:0101001 空格:01 句号:0101000 a:11010 b:011001 c:0101100 d:010101 e: 111
f:010111 g:0101101 h:1000 i: 1001 l:01000 m:01101 n:10110 o:11011 p:101000
q:101001 r:0111 s:01001 t:1100 u:10111 v:011000 w:101010 y:101011
原文档的哈夫曼编码输出:0101001011010000111100111011011110011100101011(太长了,后面
就不输了。。。)-On the one by the English letters, spaces, punctuation marks consisting of documents, Huffman coding data input: the file input.txt given input data. Sample input file input.txt A priority queue is a queue where each element has a priority and the element with the highest priority is at the front of the queue and will be the first element to be removed. Example output file output.txt each character corresponding Huffman is: A: 0101001 space: 01 period: 0101000 a: 11010 b: 011001 c: 0101100 d: 010101 e: 111 f: 010111 g: 0101101 h: 1000 i: 1001 l: 01000 m: 01101 n: 10110 o: 11011 p: 101000 q: 101001 r: 0111 s: 01001 t: 1100 u: 10111 v: 011000 w: 101010 y: 101011 original document Huffman coding output: 0101001011010000111100111011011110011100101011 (too long, back on the do not lose ..)
Platform: |
Size: 259072 |
Author: miyor |
Hits: