diff --git a/resource/runner/problem/.gitignore b/resource/runner/problem/.gitignore index 9ec52b8..a82daa9 100644 --- a/resource/runner/problem/.gitignore +++ b/resource/runner/problem/.gitignore @@ -2,3 +2,5 @@ !.gitignore !example !example/* +!book +!book/**/* diff --git a/resource/runner/problem/book/ch1/1. factorial/config.json b/resource/runner/problem/book/ch1/1. factorial/config.json new file mode 100644 index 0000000..2bc2544 --- /dev/null +++ b/resource/runner/problem/book/ch1/1. factorial/config.json @@ -0,0 +1,43 @@ +{ + "Runtime": { + "TimeLimit": 1000, + "MemoryLimit": 16, + "NProcLimit": 1 + }, + "Languages": [ + { + "Lang": "c", + "Type": "default", + "Script": "", + "Cmp": "HCMP" + }, + { + "Lang": "cpp", + "Type": "default", + "Script": "", + "Cmp": "HCMP" + } + ], + "Tasks": [ + { + "Id": 1, + "Points": 20 + }, + { + "Id": 2, + "Points": 20 + }, + { + "Id": 3, + "Points": 20 + }, + { + "Id": 4, + "Points": 20 + }, + { + "Id": 5, + "Points": 20 + } + ] +} \ No newline at end of file diff --git a/resource/runner/problem/book/ch1/1. factorial/data/input/1.input b/resource/runner/problem/book/ch1/1. factorial/data/input/1.input new file mode 100644 index 0000000..209e3ef --- /dev/null +++ b/resource/runner/problem/book/ch1/1. factorial/data/input/1.input @@ -0,0 +1 @@ +20 diff --git a/resource/runner/problem/book/ch1/1. factorial/data/input/2.input b/resource/runner/problem/book/ch1/1. factorial/data/input/2.input new file mode 100644 index 0000000..c3f407c --- /dev/null +++ b/resource/runner/problem/book/ch1/1. factorial/data/input/2.input @@ -0,0 +1 @@ +55 diff --git a/resource/runner/problem/book/ch1/1. factorial/data/input/3.input b/resource/runner/problem/book/ch1/1. factorial/data/input/3.input new file mode 100644 index 0000000..d22307c --- /dev/null +++ b/resource/runner/problem/book/ch1/1. factorial/data/input/3.input @@ -0,0 +1 @@ +88 diff --git a/resource/runner/problem/book/ch1/1. factorial/data/input/4.input b/resource/runner/problem/book/ch1/1. factorial/data/input/4.input new file mode 100644 index 0000000..6a4573e --- /dev/null +++ b/resource/runner/problem/book/ch1/1. factorial/data/input/4.input @@ -0,0 +1 @@ +133 diff --git a/resource/runner/problem/book/ch1/1. factorial/data/input/5.input b/resource/runner/problem/book/ch1/1. factorial/data/input/5.input new file mode 100644 index 0000000..51b4008 --- /dev/null +++ b/resource/runner/problem/book/ch1/1. factorial/data/input/5.input @@ -0,0 +1 @@ +345 diff --git a/resource/runner/problem/book/ch1/1. factorial/data/output/1.output b/resource/runner/problem/book/ch1/1. factorial/data/output/1.output new file mode 100644 index 0000000..c2f08cb --- /dev/null +++ b/resource/runner/problem/book/ch1/1. factorial/data/output/1.output @@ -0,0 +1 @@ +2432902008176640000 diff --git a/resource/runner/problem/book/ch1/1. factorial/data/output/2.output b/resource/runner/problem/book/ch1/1. factorial/data/output/2.output new file mode 100644 index 0000000..1c6f9f8 --- /dev/null +++ b/resource/runner/problem/book/ch1/1. factorial/data/output/2.output @@ -0,0 +1 @@ +12696403353658275925965100847566516959580321051449436762275840000000000000 diff --git a/resource/runner/problem/book/ch1/1. factorial/data/output/3.output b/resource/runner/problem/book/ch1/1. factorial/data/output/3.output new file mode 100644 index 0000000..3602271 --- /dev/null +++ b/resource/runner/problem/book/ch1/1. factorial/data/output/3.output @@ -0,0 +1 @@ +185482642257398439114796845645546284380220968949399346684421580986889562184028199319100141244804501828416633516851200000000000000000000 diff --git a/resource/runner/problem/book/ch1/1. factorial/data/output/4.output b/resource/runner/problem/book/ch1/1. factorial/data/output/4.output new file mode 100644 index 0000000..1f28ff5 --- /dev/null +++ b/resource/runner/problem/book/ch1/1. factorial/data/output/4.output @@ -0,0 +1 @@ +14872707060906857289084508911813048098675809251055070300508818286592035566485075754388082124671571841702793317081960037166525246368924700537538282948117301741317436012998958826217903503076596121600000000000000000000000000000000 diff --git a/resource/runner/problem/book/ch1/1. factorial/data/output/5.output b/resource/runner/problem/book/ch1/1. factorial/data/output/5.output new file mode 100644 index 0000000..eed4369 --- /dev/null +++ b/resource/runner/problem/book/ch1/1. factorial/data/output/5.output @@ -0,0 +1 @@ +24215638650792346558700053691985855570120556040258652734839783267039961720178323593174739047913617079695531502689473012213820889134885853992818438056445080201482863675240494802269823110125881000284687377104376400792200165127855908498047507347955446603093964326987087311394274684237308398502911304969719715098068025497504900730580217016573270011698467378924291550780873605154736879542602554635558428265690302091342359471863508627516511203478353542187151045838267239168928747525890559708487655213488727530884968558716385000436989129479527833010340517760688345368715729020015336862534353876914871201776699205878662858555857265544230999178449256448000000000000000000000000000000000000000000000000000000000000000000000000000000000000 diff --git a/resource/runner/problem/book/ch1/1. factorial/description.md b/resource/runner/problem/book/ch1/1. factorial/description.md new file mode 100644 index 0000000..c362f85 --- /dev/null +++ b/resource/runner/problem/book/ch1/1. factorial/description.md @@ -0,0 +1,26 @@ +# 求 N! 的值 + +## Tags + +- C++一本通 +- 高精度 + +## Description + +用高精度方法,求$N!$的精确值($N$以一般整数输入) + +## Example Cases + +### Case 1 + +#### Input + +``` +10 +``` + +#### Output + +``` +3628800 +``` diff --git a/resource/runner/problem/book/ch1/2. divide/config.json b/resource/runner/problem/book/ch1/2. divide/config.json new file mode 100644 index 0000000..264d4a4 --- /dev/null +++ b/resource/runner/problem/book/ch1/2. divide/config.json @@ -0,0 +1,47 @@ +{ + "Runtime": { + "TimeLimit": 1000, + "MemoryLimit": 16, + "NProcLimit": 1 + }, + "Languages": [ + { + "Lang": "c", + "Type": "default", + "Script": "", + "Cmp": "FCMP" + }, + { + "Lang": "cpp", + "Type": "default", + "Script": "", + "Cmp": "FCMP" + } + ], + "Tasks": [ + { + "Id": 1, + "Points": 10 + }, + { + "Id": 2, + "Points": 10 + }, + { + "Id": 3, + "Points": 10 + }, + { + "Id": 4, + "Points": 23 + }, + { + "Id": 5, + "Points": 22 + }, + { + "Id": 6, + "Points": 25 + } + ] +} \ No newline at end of file diff --git a/resource/runner/problem/book/ch1/2. divide/data/input/1.input b/resource/runner/problem/book/ch1/2. divide/data/input/1.input new file mode 100644 index 0000000..6ee96c1 --- /dev/null +++ b/resource/runner/problem/book/ch1/2. divide/data/input/1.input @@ -0,0 +1 @@ +6 5 \ No newline at end of file diff --git a/resource/runner/problem/book/ch1/2. divide/data/input/2.input b/resource/runner/problem/book/ch1/2. divide/data/input/2.input new file mode 100644 index 0000000..f37d2f8 --- /dev/null +++ b/resource/runner/problem/book/ch1/2. divide/data/input/2.input @@ -0,0 +1 @@ +30 6 \ No newline at end of file diff --git a/resource/runner/problem/book/ch1/2. divide/data/input/3.input b/resource/runner/problem/book/ch1/2. divide/data/input/3.input new file mode 100644 index 0000000..e1bb4a2 --- /dev/null +++ b/resource/runner/problem/book/ch1/2. divide/data/input/3.input @@ -0,0 +1 @@ +18 5 \ No newline at end of file diff --git a/resource/runner/problem/book/ch1/2. divide/data/input/4.input b/resource/runner/problem/book/ch1/2. divide/data/input/4.input new file mode 100644 index 0000000..2637872 --- /dev/null +++ b/resource/runner/problem/book/ch1/2. divide/data/input/4.input @@ -0,0 +1 @@ +12 7 diff --git a/resource/runner/problem/book/ch1/2. divide/data/input/5.input b/resource/runner/problem/book/ch1/2. divide/data/input/5.input new file mode 100644 index 0000000..110498e --- /dev/null +++ b/resource/runner/problem/book/ch1/2. divide/data/input/5.input @@ -0,0 +1 @@ +8 3 diff --git a/resource/runner/problem/book/ch1/2. divide/data/input/6.input b/resource/runner/problem/book/ch1/2. divide/data/input/6.input new file mode 100644 index 0000000..b3e0c03 --- /dev/null +++ b/resource/runner/problem/book/ch1/2. divide/data/input/6.input @@ -0,0 +1 @@ +1034 1033 \ No newline at end of file diff --git a/resource/runner/problem/book/ch1/2. divide/data/output/1.output b/resource/runner/problem/book/ch1/2. divide/data/output/1.output new file mode 100644 index 0000000..dfaf698 --- /dev/null +++ b/resource/runner/problem/book/ch1/2. divide/data/output/1.output @@ -0,0 +1 @@ +6/5=1.2 diff --git a/resource/runner/problem/book/ch1/2. divide/data/output/2.output b/resource/runner/problem/book/ch1/2. divide/data/output/2.output new file mode 100644 index 0000000..6d113d4 --- /dev/null +++ b/resource/runner/problem/book/ch1/2. divide/data/output/2.output @@ -0,0 +1 @@ +30/6=5.0 diff --git a/resource/runner/problem/book/ch1/2. divide/data/output/3.output b/resource/runner/problem/book/ch1/2. divide/data/output/3.output new file mode 100644 index 0000000..f550a37 --- /dev/null +++ b/resource/runner/problem/book/ch1/2. divide/data/output/3.output @@ -0,0 +1 @@ +18/5=3.6 diff --git a/resource/runner/problem/book/ch1/2. divide/data/output/4.output b/resource/runner/problem/book/ch1/2. divide/data/output/4.output new file mode 100644 index 0000000..dbb739e --- /dev/null +++ b/resource/runner/problem/book/ch1/2. divide/data/output/4.output @@ -0,0 +1 @@ +12/7=1.71428571428571428571 diff --git a/resource/runner/problem/book/ch1/2. divide/data/output/5.output b/resource/runner/problem/book/ch1/2. divide/data/output/5.output new file mode 100644 index 0000000..bfc9b8e --- /dev/null +++ b/resource/runner/problem/book/ch1/2. divide/data/output/5.output @@ -0,0 +1 @@ +8/3=2.66666666666666666666 diff --git a/resource/runner/problem/book/ch1/2. divide/data/output/6.output b/resource/runner/problem/book/ch1/2. divide/data/output/6.output new file mode 100644 index 0000000..84112b7 --- /dev/null +++ b/resource/runner/problem/book/ch1/2. divide/data/output/6.output @@ -0,0 +1 @@ +1034/1033=1.000968054211035818 diff --git a/resource/runner/problem/book/ch1/2. divide/description.md b/resource/runner/problem/book/ch1/2. divide/description.md new file mode 100644 index 0000000..7cef5e3 --- /dev/null +++ b/resource/runner/problem/book/ch1/2. divide/description.md @@ -0,0 +1,42 @@ +# 求A/B高精度值 + +## Tags + +- C++一本通 +- 高精度 + +## Description + +计算$\frac AB$的精确值,设$A$,$B$是以一般整数输入,计算结果精确小数后$20$位 + +(若不足$20$位,末尾不用补$0$) + +## Example Cases + +### Case 1 + +#### Input + +``` +4 3 +``` + +#### Output + +``` +4/3=1.33333333333333333333 +``` + +### Case 2 + +#### Input + +``` +6 5 +``` + +#### Output + +``` +6/5=1.2 +``` diff --git a/resource/runner/problem/book/ch1/3. acc_sum/config.json b/resource/runner/problem/book/ch1/3. acc_sum/config.json new file mode 100644 index 0000000..808439f --- /dev/null +++ b/resource/runner/problem/book/ch1/3. acc_sum/config.json @@ -0,0 +1,43 @@ +{ + "Runtime": { + "TimeLimit": 1000, + "MemoryLimit": 16, + "NProcLimit": 1 + }, + "Languages": [ + { + "Lang": "c", + "Type": "default", + "Script": "", + "Cmp": "NCMP" + }, + { + "Lang": "cpp", + "Type": "default", + "Script": "", + "Cmp": "NCMP" + } + ], + "Tasks": [ + { + "Id": 1, + "Points": 20 + }, + { + "Id": 2, + "Points": 20 + }, + { + "Id": 3, + "Points": 20 + }, + { + "Id": 4, + "Points": 20 + }, + { + "Id": 5, + "Points": 20 + } + ] +} \ No newline at end of file diff --git a/resource/runner/problem/book/ch1/3. acc_sum/data/input/1.input b/resource/runner/problem/book/ch1/3. acc_sum/data/input/1.input new file mode 100644 index 0000000..190a180 --- /dev/null +++ b/resource/runner/problem/book/ch1/3. acc_sum/data/input/1.input @@ -0,0 +1 @@ +123 diff --git a/resource/runner/problem/book/ch1/3. acc_sum/data/input/2.input b/resource/runner/problem/book/ch1/3. acc_sum/data/input/2.input new file mode 100644 index 0000000..08839f6 --- /dev/null +++ b/resource/runner/problem/book/ch1/3. acc_sum/data/input/2.input @@ -0,0 +1 @@ +200 diff --git a/resource/runner/problem/book/ch1/3. acc_sum/data/input/3.input b/resource/runner/problem/book/ch1/3. acc_sum/data/input/3.input new file mode 100644 index 0000000..51b4008 --- /dev/null +++ b/resource/runner/problem/book/ch1/3. acc_sum/data/input/3.input @@ -0,0 +1 @@ +345 diff --git a/resource/runner/problem/book/ch1/3. acc_sum/data/input/4.input b/resource/runner/problem/book/ch1/3. acc_sum/data/input/4.input new file mode 100644 index 0000000..d71f7cf --- /dev/null +++ b/resource/runner/problem/book/ch1/3. acc_sum/data/input/4.input @@ -0,0 +1 @@ +888888 diff --git a/resource/runner/problem/book/ch1/3. acc_sum/data/input/5.input b/resource/runner/problem/book/ch1/3. acc_sum/data/input/5.input new file mode 100644 index 0000000..8694f40 --- /dev/null +++ b/resource/runner/problem/book/ch1/3. acc_sum/data/input/5.input @@ -0,0 +1 @@ +999999 diff --git a/resource/runner/problem/book/ch1/3. acc_sum/data/output/1.output b/resource/runner/problem/book/ch1/3. acc_sum/data/output/1.output new file mode 100644 index 0000000..41cfde4 --- /dev/null +++ b/resource/runner/problem/book/ch1/3. acc_sum/data/output/1.output @@ -0,0 +1 @@ +7626 diff --git a/resource/runner/problem/book/ch1/3. acc_sum/data/output/2.output b/resource/runner/problem/book/ch1/3. acc_sum/data/output/2.output new file mode 100644 index 0000000..503deb9 --- /dev/null +++ b/resource/runner/problem/book/ch1/3. acc_sum/data/output/2.output @@ -0,0 +1 @@ +20100 diff --git a/resource/runner/problem/book/ch1/3. acc_sum/data/output/3.output b/resource/runner/problem/book/ch1/3. acc_sum/data/output/3.output new file mode 100644 index 0000000..bac74af --- /dev/null +++ b/resource/runner/problem/book/ch1/3. acc_sum/data/output/3.output @@ -0,0 +1 @@ +59685 diff --git a/resource/runner/problem/book/ch1/3. acc_sum/data/output/4.output b/resource/runner/problem/book/ch1/3. acc_sum/data/output/4.output new file mode 100644 index 0000000..1c288bb --- /dev/null +++ b/resource/runner/problem/book/ch1/3. acc_sum/data/output/4.output @@ -0,0 +1 @@ +61382716 diff --git a/resource/runner/problem/book/ch1/3. acc_sum/data/output/5.output b/resource/runner/problem/book/ch1/3. acc_sum/data/output/5.output new file mode 100644 index 0000000..ad629e2 --- /dev/null +++ b/resource/runner/problem/book/ch1/3. acc_sum/data/output/5.output @@ -0,0 +1 @@ +499999500000 diff --git a/resource/runner/problem/book/ch1/3. acc_sum/description.md b/resource/runner/problem/book/ch1/3. acc_sum/description.md new file mode 100644 index 0000000..8c52d19 --- /dev/null +++ b/resource/runner/problem/book/ch1/3. acc_sum/description.md @@ -0,0 +1,28 @@ +# 求n累加和 + +## Tags + +- C++一本通 +- 高精度 + +## Description + +用高精度方法,求 $s=1+2+3+\cdots+n$的精确值 + +($n$以一般整数输入) + +## Example Cases + +### Case 1 + +#### Input + +``` +10 +``` + +#### Output + +``` +55 +``` diff --git a/resource/runner/problem/book/ch1/4. f_sum/config.json b/resource/runner/problem/book/ch1/4. f_sum/config.json new file mode 100644 index 0000000..f5b3106 --- /dev/null +++ b/resource/runner/problem/book/ch1/4. f_sum/config.json @@ -0,0 +1,63 @@ +{ + "Runtime": { + "TimeLimit": 1000, + "MemoryLimit": 16, + "NProcLimit": 1 + }, + "Languages": [ + { + "Lang": "c", + "Type": "default", + "Script": "", + "Cmp": "HCMP" + }, + { + "Lang": "cpp", + "Type": "default", + "Script": "", + "Cmp": "HCMP" + } + ], + "Tasks": [ + { + "Id": 1, + "Points": 10 + }, + { + "Id": 2, + "Points": 10 + }, + { + "Id": 3, + "Points": 10 + }, + { + "Id": 4, + "Points": 10 + }, + { + "Id": 5, + "Points": 10 + }, + { + "Id": 6, + "Points": 10 + }, + { + "Id": 7, + "Points": 10 + }, + { + "Id": 8, + "Points": 10 + }, + { + "Id": 9, + "Points": 10 + }, + { + "Id": 10, + "Points": 10 + } + ] +} \ No newline at end of file diff --git a/resource/runner/problem/book/ch1/4. f_sum/data/input/1.input b/resource/runner/problem/book/ch1/4. f_sum/data/input/1.input new file mode 100644 index 0000000..5442e3d --- /dev/null +++ b/resource/runner/problem/book/ch1/4. f_sum/data/input/1.input @@ -0,0 +1,2 @@ +6 + diff --git a/resource/runner/problem/book/ch1/4. f_sum/data/input/10.input b/resource/runner/problem/book/ch1/4. f_sum/data/input/10.input new file mode 100644 index 0000000..de8febe --- /dev/null +++ b/resource/runner/problem/book/ch1/4. f_sum/data/input/10.input @@ -0,0 +1 @@ +168 diff --git a/resource/runner/problem/book/ch1/4. f_sum/data/input/2.input b/resource/runner/problem/book/ch1/4. f_sum/data/input/2.input new file mode 100644 index 0000000..021ea30 --- /dev/null +++ b/resource/runner/problem/book/ch1/4. f_sum/data/input/2.input @@ -0,0 +1,2 @@ +10 + diff --git a/resource/runner/problem/book/ch1/4. f_sum/data/input/3.input b/resource/runner/problem/book/ch1/4. f_sum/data/input/3.input new file mode 100644 index 0000000..f5d273e --- /dev/null +++ b/resource/runner/problem/book/ch1/4. f_sum/data/input/3.input @@ -0,0 +1,2 @@ +12 + diff --git a/resource/runner/problem/book/ch1/4. f_sum/data/input/4.input b/resource/runner/problem/book/ch1/4. f_sum/data/input/4.input new file mode 100644 index 0000000..94c800e --- /dev/null +++ b/resource/runner/problem/book/ch1/4. f_sum/data/input/4.input @@ -0,0 +1,2 @@ +25 + diff --git a/resource/runner/problem/book/ch1/4. f_sum/data/input/5.input b/resource/runner/problem/book/ch1/4. f_sum/data/input/5.input new file mode 100644 index 0000000..e522732 --- /dev/null +++ b/resource/runner/problem/book/ch1/4. f_sum/data/input/5.input @@ -0,0 +1 @@ +38 diff --git a/resource/runner/problem/book/ch1/4. f_sum/data/input/6.input b/resource/runner/problem/book/ch1/4. f_sum/data/input/6.input new file mode 100644 index 0000000..a80efbc --- /dev/null +++ b/resource/runner/problem/book/ch1/4. f_sum/data/input/6.input @@ -0,0 +1,2 @@ +50 + diff --git a/resource/runner/problem/book/ch1/4. f_sum/data/input/7.input b/resource/runner/problem/book/ch1/4. f_sum/data/input/7.input new file mode 100644 index 0000000..afe6a2b --- /dev/null +++ b/resource/runner/problem/book/ch1/4. f_sum/data/input/7.input @@ -0,0 +1,3 @@ +100 + + diff --git a/resource/runner/problem/book/ch1/4. f_sum/data/input/8.input b/resource/runner/problem/book/ch1/4. f_sum/data/input/8.input new file mode 100644 index 0000000..f6b91e0 --- /dev/null +++ b/resource/runner/problem/book/ch1/4. f_sum/data/input/8.input @@ -0,0 +1 @@ +56 diff --git a/resource/runner/problem/book/ch1/4. f_sum/data/input/9.input b/resource/runner/problem/book/ch1/4. f_sum/data/input/9.input new file mode 100644 index 0000000..d22307c --- /dev/null +++ b/resource/runner/problem/book/ch1/4. f_sum/data/input/9.input @@ -0,0 +1 @@ +88 diff --git a/resource/runner/problem/book/ch1/4. f_sum/data/output/1.output b/resource/runner/problem/book/ch1/4. f_sum/data/output/1.output new file mode 100644 index 0000000..d6cf73b --- /dev/null +++ b/resource/runner/problem/book/ch1/4. f_sum/data/output/1.output @@ -0,0 +1 @@ +873 diff --git a/resource/runner/problem/book/ch1/4. f_sum/data/output/10.output b/resource/runner/problem/book/ch1/4. f_sum/data/output/10.output new file mode 100644 index 0000000..3b4f52f --- /dev/null +++ b/resource/runner/problem/book/ch1/4. f_sum/data/output/10.output @@ -0,0 +1 @@ +254120249273735911000907888640119535236287907165951916892565760428653068358394812028951886899362211706573251799059144977163198350579476833315404394194273776708617756335498155452476066616083404064569523579235001013208442504120594016095732334057618307254825831235764323593105039052556442336528920420940313 \ No newline at end of file diff --git a/resource/runner/problem/book/ch1/4. f_sum/data/output/2.output b/resource/runner/problem/book/ch1/4. f_sum/data/output/2.output new file mode 100644 index 0000000..c62ff37 --- /dev/null +++ b/resource/runner/problem/book/ch1/4. f_sum/data/output/2.output @@ -0,0 +1 @@ +4037913 diff --git a/resource/runner/problem/book/ch1/4. f_sum/data/output/3.output b/resource/runner/problem/book/ch1/4. f_sum/data/output/3.output new file mode 100644 index 0000000..6e63ca0 --- /dev/null +++ b/resource/runner/problem/book/ch1/4. f_sum/data/output/3.output @@ -0,0 +1 @@ +522956313 diff --git a/resource/runner/problem/book/ch1/4. f_sum/data/output/4.output b/resource/runner/problem/book/ch1/4. f_sum/data/output/4.output new file mode 100644 index 0000000..2b78855 --- /dev/null +++ b/resource/runner/problem/book/ch1/4. f_sum/data/output/4.output @@ -0,0 +1 @@ +16158688114800553828940313 \ No newline at end of file diff --git a/resource/runner/problem/book/ch1/4. f_sum/data/output/5.output b/resource/runner/problem/book/ch1/4. f_sum/data/output/5.output new file mode 100644 index 0000000..01b9f20 --- /dev/null +++ b/resource/runner/problem/book/ch1/4. f_sum/data/output/5.output @@ -0,0 +1 @@ +537169001220328488991089808037100875620940313 \ No newline at end of file diff --git a/resource/runner/problem/book/ch1/4. f_sum/data/output/6.output b/resource/runner/problem/book/ch1/4. f_sum/data/output/6.output new file mode 100644 index 0000000..da32b4f --- /dev/null +++ b/resource/runner/problem/book/ch1/4. f_sum/data/output/6.output @@ -0,0 +1 @@ +31035053229546199656252032972759319953190362094566672920420940313 diff --git a/resource/runner/problem/book/ch1/4. f_sum/data/output/7.output b/resource/runner/problem/book/ch1/4. f_sum/data/output/7.output new file mode 100644 index 0000000..ce30601 --- /dev/null +++ b/resource/runner/problem/book/ch1/4. f_sum/data/output/7.output @@ -0,0 +1 @@ +94269001683709979260859834124473539872070722613982672442938359305624678223479506023400294093599136466986609124347432647622826870038220556442336528920420940313 diff --git a/resource/runner/problem/book/ch1/4. f_sum/data/output/8.output b/resource/runner/problem/book/ch1/4. f_sum/data/output/8.output new file mode 100644 index 0000000..ea37b1a --- /dev/null +++ b/resource/runner/problem/book/ch1/4. f_sum/data/output/8.output @@ -0,0 +1 @@ +723930191979474006646854190608859789522640775146933593199410448920420940313 \ No newline at end of file diff --git a/resource/runner/problem/book/ch1/4. f_sum/data/output/9.output b/resource/runner/problem/book/ch1/4. f_sum/data/output/9.output new file mode 100644 index 0000000..b54992d --- /dev/null +++ b/resource/runner/problem/book/ch1/4. f_sum/data/output/9.output @@ -0,0 +1 @@ +187614911715749685817248425941004050893848927079322281432389628090868928026359770825810501448242006058427610137151642336528920420940313 \ No newline at end of file diff --git a/resource/runner/problem/book/ch1/4. f_sum/description.md b/resource/runner/problem/book/ch1/4. f_sum/description.md new file mode 100644 index 0000000..c51f844 --- /dev/null +++ b/resource/runner/problem/book/ch1/4. f_sum/description.md @@ -0,0 +1,32 @@ +# 阶乘和 + +## Tags + +- C++一本通 +- 高精度 + +## Description + +已知正整数 $N (N\le100)$,设$S=1!+2!+3!+\cdots+N!$ + +其中 "!" 表示阶乘,即$N!=1\times 2\times 3\times\cdots\times (N-1)\times N$ + +如:$3!=1\times 2\times 3=6$ + +请编程实现:输入正整数$N$,输出计算结果$S$的值 + +## Example Cases + +### Case 1 + +#### Input + +``` +4 +``` + +#### Output + +``` +33 +``` diff --git a/resource/runner/problem/book/ch1/5. multiply/config.json b/resource/runner/problem/book/ch1/5. multiply/config.json new file mode 100644 index 0000000..f5b3106 --- /dev/null +++ b/resource/runner/problem/book/ch1/5. multiply/config.json @@ -0,0 +1,63 @@ +{ + "Runtime": { + "TimeLimit": 1000, + "MemoryLimit": 16, + "NProcLimit": 1 + }, + "Languages": [ + { + "Lang": "c", + "Type": "default", + "Script": "", + "Cmp": "HCMP" + }, + { + "Lang": "cpp", + "Type": "default", + "Script": "", + "Cmp": "HCMP" + } + ], + "Tasks": [ + { + "Id": 1, + "Points": 10 + }, + { + "Id": 2, + "Points": 10 + }, + { + "Id": 3, + "Points": 10 + }, + { + "Id": 4, + "Points": 10 + }, + { + "Id": 5, + "Points": 10 + }, + { + "Id": 6, + "Points": 10 + }, + { + "Id": 7, + "Points": 10 + }, + { + "Id": 8, + "Points": 10 + }, + { + "Id": 9, + "Points": 10 + }, + { + "Id": 10, + "Points": 10 + } + ] +} \ No newline at end of file diff --git a/resource/runner/problem/book/ch1/5. multiply/data/input/1.input b/resource/runner/problem/book/ch1/5. multiply/data/input/1.input new file mode 100644 index 0000000..43a8ace --- /dev/null +++ b/resource/runner/problem/book/ch1/5. multiply/data/input/1.input @@ -0,0 +1,2 @@ +36 +3 diff --git a/resource/runner/problem/book/ch1/5. multiply/data/input/10.input b/resource/runner/problem/book/ch1/5. multiply/data/input/10.input new file mode 100644 index 0000000..1616f12 --- /dev/null +++ b/resource/runner/problem/book/ch1/5. multiply/data/input/10.input @@ -0,0 +1,2 @@ +3636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636 +3636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636 diff --git a/resource/runner/problem/book/ch1/5. multiply/data/input/2.input b/resource/runner/problem/book/ch1/5. multiply/data/input/2.input new file mode 100644 index 0000000..ac0e5d5 --- /dev/null +++ b/resource/runner/problem/book/ch1/5. multiply/data/input/2.input @@ -0,0 +1,2 @@ +223132 +546493 \ No newline at end of file diff --git a/resource/runner/problem/book/ch1/5. multiply/data/input/3.input b/resource/runner/problem/book/ch1/5. multiply/data/input/3.input new file mode 100644 index 0000000..c0dd5e6 --- /dev/null +++ b/resource/runner/problem/book/ch1/5. multiply/data/input/3.input @@ -0,0 +1,2 @@ +3575123464611135 +1546681346823682 \ No newline at end of file diff --git a/resource/runner/problem/book/ch1/5. multiply/data/input/4.input b/resource/runner/problem/book/ch1/5. multiply/data/input/4.input new file mode 100644 index 0000000..dd45677 --- /dev/null +++ b/resource/runner/problem/book/ch1/5. multiply/data/input/4.input @@ -0,0 +1,2 @@ +1612303134360325403163115126153055453123651679781687421670 +87325901875974681619759111095656 \ No newline at end of file diff --git a/resource/runner/problem/book/ch1/5. multiply/data/input/5.input b/resource/runner/problem/book/ch1/5. multiply/data/input/5.input new file mode 100644 index 0000000..e9e1538 --- /dev/null +++ b/resource/runner/problem/book/ch1/5. multiply/data/input/5.input @@ -0,0 +1,2 @@ +1612303134360325403163115126153055453123651679781687421670 +0 \ No newline at end of file diff --git a/resource/runner/problem/book/ch1/5. multiply/data/input/6.input b/resource/runner/problem/book/ch1/5. multiply/data/input/6.input new file mode 100644 index 0000000..3a81a68 --- /dev/null +++ b/resource/runner/problem/book/ch1/5. multiply/data/input/6.input @@ -0,0 +1,2 @@ +87598475901847598759438109874591843275923875493817439085728 +298437928374982371598375498275192834579204187239084721390847293875498751908237491287349875923485 diff --git a/resource/runner/problem/book/ch1/5. multiply/data/input/7.input b/resource/runner/problem/book/ch1/5. multiply/data/input/7.input new file mode 100644 index 0000000..6ff0f69 --- /dev/null +++ b/resource/runner/problem/book/ch1/5. multiply/data/input/7.input @@ -0,0 +1,2 @@ +59837549827514646484846292834579204187239084721390847293875498751908237491287349875923485 +4236457456216386213857921746189264982365923612436823765023876109274091624865 diff --git a/resource/runner/problem/book/ch1/5. multiply/data/input/8.input b/resource/runner/problem/book/ch1/5. multiply/data/input/8.input new file mode 100644 index 0000000..c7b07eb --- /dev/null +++ b/resource/runner/problem/book/ch1/5. multiply/data/input/8.input @@ -0,0 +1,2 @@ +10000000000100000000000000100000000000001000000000000001000000 +10000000000000000000000000000000000000000000000000001 \ No newline at end of file diff --git a/resource/runner/problem/book/ch1/5. multiply/data/input/9.input b/resource/runner/problem/book/ch1/5. multiply/data/input/9.input new file mode 100644 index 0000000..b213e05 --- /dev/null +++ b/resource/runner/problem/book/ch1/5. multiply/data/input/9.input @@ -0,0 +1,2 @@ +1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111 +1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111 \ No newline at end of file diff --git a/resource/runner/problem/book/ch1/5. multiply/data/output/1.output b/resource/runner/problem/book/ch1/5. multiply/data/output/1.output new file mode 100644 index 0000000..615088b --- /dev/null +++ b/resource/runner/problem/book/ch1/5. multiply/data/output/1.output @@ -0,0 +1 @@ +108 \ No newline at end of file diff --git a/resource/runner/problem/book/ch1/5. multiply/data/output/10.output b/resource/runner/problem/book/ch1/5. multiply/data/output/10.output new file mode 100644 index 0000000..719d8c5 --- /dev/null +++ b/resource/runner/problem/book/ch1/5. multiply/data/output/10.output @@ -0,0 +1 @@ +13223140495867768595041322314049586776859504132231404958677685950413223140495867768595041322314049584132231404958677685950413223140495867768595041322314049586776859504132231404958677685950413223140496 \ No newline at end of file diff --git a/resource/runner/problem/book/ch1/5. multiply/data/output/2.output b/resource/runner/problem/book/ch1/5. multiply/data/output/2.output new file mode 100644 index 0000000..0c22234 --- /dev/null +++ b/resource/runner/problem/book/ch1/5. multiply/data/output/2.output @@ -0,0 +1 @@ +121940076076 \ No newline at end of file diff --git a/resource/runner/problem/book/ch1/5. multiply/data/output/3.output b/resource/runner/problem/book/ch1/5. multiply/data/output/3.output new file mode 100644 index 0000000..8288d62 --- /dev/null +++ b/resource/runner/problem/book/ch1/5. multiply/data/output/3.output @@ -0,0 +1 @@ +5529576775305698493965538899070 \ No newline at end of file diff --git a/resource/runner/problem/book/ch1/5. multiply/data/output/4.output b/resource/runner/problem/book/ch1/5. multiply/data/output/4.output new file mode 100644 index 0000000..8368237 --- /dev/null +++ b/resource/runner/problem/book/ch1/5. multiply/data/output/4.output @@ -0,0 +1 @@ +140795825305476199280233019817945689100643760412642009218490674068242032885278427377265520 \ No newline at end of file diff --git a/resource/runner/problem/book/ch1/5. multiply/data/output/5.output b/resource/runner/problem/book/ch1/5. multiply/data/output/5.output new file mode 100644 index 0000000..c227083 --- /dev/null +++ b/resource/runner/problem/book/ch1/5. multiply/data/output/5.output @@ -0,0 +1 @@ +0 \ No newline at end of file diff --git a/resource/runner/problem/book/ch1/5. multiply/data/output/6.output b/resource/runner/problem/book/ch1/5. multiply/data/output/6.output new file mode 100644 index 0000000..d3e866e --- /dev/null +++ b/resource/runner/problem/book/ch1/5. multiply/data/output/6.output @@ -0,0 +1 @@ +26142707676953212987620037484595819537530927510175652292771194988691770152906902796401039019311293198642505699704116000272347333325497182960052818083522080 \ No newline at end of file diff --git a/resource/runner/problem/book/ch1/5. multiply/data/output/7.output b/resource/runner/problem/book/ch1/5. multiply/data/output/7.output new file mode 100644 index 0000000..370af6f --- /dev/null +++ b/resource/runner/problem/book/ch1/5. multiply/data/output/7.output @@ -0,0 +1 @@ +253499234128493958903641901083610612560915799119395223324551028991082209611772242406659851469816572287755335937238553052013586988763671218944971611631489146063454525 \ No newline at end of file diff --git a/resource/runner/problem/book/ch1/5. multiply/data/output/8.output b/resource/runner/problem/book/ch1/5. multiply/data/output/8.output new file mode 100644 index 0000000..fe78464 --- /dev/null +++ b/resource/runner/problem/book/ch1/5. multiply/data/output/8.output @@ -0,0 +1 @@ +100000000001000000000000001000000000000010000000000010010000000100000000000000100000000000001000000000000001000000 \ No newline at end of file diff --git a/resource/runner/problem/book/ch1/5. multiply/data/output/9.output b/resource/runner/problem/book/ch1/5. multiply/data/output/9.output new file mode 100644 index 0000000..35cbf0d --- /dev/null +++ b/resource/runner/problem/book/ch1/5. multiply/data/output/9.output @@ -0,0 +1 @@ +1234567901234567901234567901234567901234567901234567901234567901234567901234567901234567901234567900987654320987654320987654320987654320987654320987654320987654320987654320987654320987654320987654321 \ No newline at end of file diff --git a/resource/runner/problem/book/ch1/5. multiply/description.md b/resource/runner/problem/book/ch1/5. multiply/description.md new file mode 100644 index 0000000..1f9146b --- /dev/null +++ b/resource/runner/problem/book/ch1/5. multiply/description.md @@ -0,0 +1,29 @@ +# 高精度求积 + +## Tags + +- C++一本通 +- 高精度 + +## Description + +输入两个高精度正整数 $M$ 和 $N$,求这两个高精度数的积 + +$M$ 和 $N$ 的长度均不超过 $100$ 位 + +## Example Cases + +### Case 1 + +#### Input + +``` +36 +3 +``` + +#### Output + +``` +108 +``` diff --git a/resource/runner/problem/book/ch1/6. yubikili/config.json b/resource/runner/problem/book/ch1/6. yubikili/config.json new file mode 100644 index 0000000..2bc2544 --- /dev/null +++ b/resource/runner/problem/book/ch1/6. yubikili/config.json @@ -0,0 +1,43 @@ +{ + "Runtime": { + "TimeLimit": 1000, + "MemoryLimit": 16, + "NProcLimit": 1 + }, + "Languages": [ + { + "Lang": "c", + "Type": "default", + "Script": "", + "Cmp": "HCMP" + }, + { + "Lang": "cpp", + "Type": "default", + "Script": "", + "Cmp": "HCMP" + } + ], + "Tasks": [ + { + "Id": 1, + "Points": 20 + }, + { + "Id": 2, + "Points": 20 + }, + { + "Id": 3, + "Points": 20 + }, + { + "Id": 4, + "Points": 20 + }, + { + "Id": 5, + "Points": 20 + } + ] +} \ No newline at end of file diff --git a/resource/runner/problem/book/ch1/6. yubikili/data/input/1.input b/resource/runner/problem/book/ch1/6. yubikili/data/input/1.input new file mode 100644 index 0000000..a106ba9 --- /dev/null +++ b/resource/runner/problem/book/ch1/6. yubikili/data/input/1.input @@ -0,0 +1,2 @@ +100000000 +100000000 \ No newline at end of file diff --git a/resource/runner/problem/book/ch1/6. yubikili/data/input/2.input b/resource/runner/problem/book/ch1/6. yubikili/data/input/2.input new file mode 100644 index 0000000..3618e37 --- /dev/null +++ b/resource/runner/problem/book/ch1/6. yubikili/data/input/2.input @@ -0,0 +1,2 @@ +2 +10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 diff --git a/resource/runner/problem/book/ch1/6. yubikili/data/input/3.input b/resource/runner/problem/book/ch1/6. yubikili/data/input/3.input new file mode 100644 index 0000000..e2b9610 --- /dev/null +++ b/resource/runner/problem/book/ch1/6. yubikili/data/input/3.input @@ -0,0 +1,2 @@ +99999998 +999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999 diff --git a/resource/runner/problem/book/ch1/6. yubikili/data/input/4.input b/resource/runner/problem/book/ch1/6. yubikili/data/input/4.input new file mode 100644 index 0000000..8d787c4 --- /dev/null +++ b/resource/runner/problem/book/ch1/6. yubikili/data/input/4.input @@ -0,0 +1,2 @@ +78473894 +8832642155044461583633521151059046808380316819087922379199216144844110044475286140264269480045782367488340711385240603755560939835449389707668393596666480539349109912048952407927989145796526660075388287655767729367758137928804351855885380612250804521010640230030418229812131164123374405932678978283787530097871142365255501388028475919498849058576972886072525825813503267718742788775281292481653779061581598551804801133220045042902022990853255810018261540212631194061936354464303529020438340782931310944202250699768949283822881610851252447956198072207623233351880835374018432914309747383494561340381382855505119144758342284895771684516810235299056643006506285537174406899939854605247954380949404660 diff --git a/resource/runner/problem/book/ch1/6. yubikili/data/input/5.input b/resource/runner/problem/book/ch1/6. yubikili/data/input/5.input new file mode 100644 index 0000000..e724c4c --- /dev/null +++ b/resource/runner/problem/book/ch1/6. yubikili/data/input/5.input @@ -0,0 +1,2 @@ +98958803 +46316352910004734907421326642197611293802488819028164931506889205608228484290221354555986671742341485141366998247659187339552422096919272288456733738241017226523138391088992977710919015718505888485687323537448338970015142859393238209157721680190159121244910531619541478566450974177489441364332015982060447095058616346664961714391925154205804036168170645848616377245804315624727505388419398686380200127825376561563556879340843598133207243520556767223710814004242249055015120353624557509680858533192180976735843960724846606479072845778040065332407800521770085355743210692776052159103107 diff --git a/resource/runner/problem/book/ch1/6. yubikili/data/output/1.output b/resource/runner/problem/book/ch1/6. yubikili/data/output/1.output new file mode 100644 index 0000000..e2095ce --- /dev/null +++ b/resource/runner/problem/book/ch1/6. yubikili/data/output/1.output @@ -0,0 +1 @@ +100000000 \ No newline at end of file diff --git a/resource/runner/problem/book/ch1/6. yubikili/data/output/2.output b/resource/runner/problem/book/ch1/6. yubikili/data/output/2.output new file mode 100644 index 0000000..d8263ee --- /dev/null +++ b/resource/runner/problem/book/ch1/6. yubikili/data/output/2.output @@ -0,0 +1 @@ +2 \ No newline at end of file diff --git a/resource/runner/problem/book/ch1/6. yubikili/data/output/3.output b/resource/runner/problem/book/ch1/6. yubikili/data/output/3.output new file mode 100644 index 0000000..14fbb11 --- /dev/null +++ b/resource/runner/problem/book/ch1/6. yubikili/data/output/3.output @@ -0,0 +1 @@ +30444475 diff --git a/resource/runner/problem/book/ch1/6. yubikili/data/output/4.output b/resource/runner/problem/book/ch1/6. yubikili/data/output/4.output new file mode 100644 index 0000000..8464799 --- /dev/null +++ b/resource/runner/problem/book/ch1/6. yubikili/data/output/4.output @@ -0,0 +1 @@ +28646624 diff --git a/resource/runner/problem/book/ch1/6. yubikili/data/output/5.output b/resource/runner/problem/book/ch1/6. yubikili/data/output/5.output new file mode 100644 index 0000000..67e408d --- /dev/null +++ b/resource/runner/problem/book/ch1/6. yubikili/data/output/5.output @@ -0,0 +1 @@ +15535418 diff --git a/resource/runner/problem/book/ch1/6. yubikili/description.md b/resource/runner/problem/book/ch1/6. yubikili/description.md new file mode 100644 index 0000000..2c43d97 --- /dev/null +++ b/resource/runner/problem/book/ch1/6. yubikili/description.md @@ -0,0 +1,55 @@ +# 天使的起誓 + +## Tags + +- C++一本通 +- 高精度 + +## Description + +TENSHI 非常幸运的被选为掌管智慧之匙的天使。 +在正式任职之前,她必须和其他新当选的天使一样,要宣誓。 +宣誓仪式是每位天使各自表述自己的使命,她们的发言稿被放在N个呈圆形排列的宝盒中。 +这些宝盒按顺时针方向被编上号码$1, 2, 3, \cdots, N$。 +一开始天使们站在编号为$N$的宝盒旁。 +她们各自手上都有一个数字,代表她们自己的发言稿所在的盒子是从$1$号盒子开始按顺时针方向的第几个。 +例如:有$7$个盒子,那么如果TENSHI手上的数字为$9$,那么她的发言稿所在盒子就是第$2$个。 +现在天使们开始按照自己手上的数字来找发言稿,先找到的就可以先发言。 +TENSHI一下子就找到了,于是她最先上台宣誓:“我将带领大家开启NOI之门……” TENSHI宣誓结束以后,陆续有天使上台宣誓。 +可是有一位天使找了好久都找不到她的发言稿,原来她手上的数字$M$非常大,她转了好久都找不到她想找的宝盒。 + +请帮助这位天使找到她想找的宝盒的编号 + +输入: 两个数 $N$,$M$,满足 $2\le N\le 10^8$ 和 $2\le M\le 10^{1000}$ + +## Example Cases + +### Case 1 + +#### Input + +``` +7 +9 +``` + +#### Output + +``` +2 +``` + +### Case 2 + +#### Input + +``` +11 +108 +``` + +#### Output + +``` +9 +``` diff --git a/resource/runner/problem/book/ch1/7. hanoi/config.json b/resource/runner/problem/book/ch1/7. hanoi/config.json new file mode 100644 index 0000000..f5b3106 --- /dev/null +++ b/resource/runner/problem/book/ch1/7. hanoi/config.json @@ -0,0 +1,63 @@ +{ + "Runtime": { + "TimeLimit": 1000, + "MemoryLimit": 16, + "NProcLimit": 1 + }, + "Languages": [ + { + "Lang": "c", + "Type": "default", + "Script": "", + "Cmp": "HCMP" + }, + { + "Lang": "cpp", + "Type": "default", + "Script": "", + "Cmp": "HCMP" + } + ], + "Tasks": [ + { + "Id": 1, + "Points": 10 + }, + { + "Id": 2, + "Points": 10 + }, + { + "Id": 3, + "Points": 10 + }, + { + "Id": 4, + "Points": 10 + }, + { + "Id": 5, + "Points": 10 + }, + { + "Id": 6, + "Points": 10 + }, + { + "Id": 7, + "Points": 10 + }, + { + "Id": 8, + "Points": 10 + }, + { + "Id": 9, + "Points": 10 + }, + { + "Id": 10, + "Points": 10 + } + ] +} \ No newline at end of file diff --git a/resource/runner/problem/book/ch1/7. hanoi/data/input/1.input b/resource/runner/problem/book/ch1/7. hanoi/data/input/1.input new file mode 100644 index 0000000..45a4fb7 --- /dev/null +++ b/resource/runner/problem/book/ch1/7. hanoi/data/input/1.input @@ -0,0 +1 @@ +8 diff --git a/resource/runner/problem/book/ch1/7. hanoi/data/input/10.input b/resource/runner/problem/book/ch1/7. hanoi/data/input/10.input new file mode 100644 index 0000000..e440e5c --- /dev/null +++ b/resource/runner/problem/book/ch1/7. hanoi/data/input/10.input @@ -0,0 +1 @@ +3 \ No newline at end of file diff --git a/resource/runner/problem/book/ch1/7. hanoi/data/input/2.input b/resource/runner/problem/book/ch1/7. hanoi/data/input/2.input new file mode 100644 index 0000000..60d3b2f --- /dev/null +++ b/resource/runner/problem/book/ch1/7. hanoi/data/input/2.input @@ -0,0 +1 @@ +15 diff --git a/resource/runner/problem/book/ch1/7. hanoi/data/input/3.input b/resource/runner/problem/book/ch1/7. hanoi/data/input/3.input new file mode 100644 index 0000000..3c03207 --- /dev/null +++ b/resource/runner/problem/book/ch1/7. hanoi/data/input/3.input @@ -0,0 +1 @@ +18 diff --git a/resource/runner/problem/book/ch1/7. hanoi/data/input/4.input b/resource/runner/problem/book/ch1/7. hanoi/data/input/4.input new file mode 100644 index 0000000..410b14d --- /dev/null +++ b/resource/runner/problem/book/ch1/7. hanoi/data/input/4.input @@ -0,0 +1 @@ +25 \ No newline at end of file diff --git a/resource/runner/problem/book/ch1/7. hanoi/data/input/5.input b/resource/runner/problem/book/ch1/7. hanoi/data/input/5.input new file mode 100644 index 0000000..425151f --- /dev/null +++ b/resource/runner/problem/book/ch1/7. hanoi/data/input/5.input @@ -0,0 +1 @@ +40 diff --git a/resource/runner/problem/book/ch1/7. hanoi/data/input/6.input b/resource/runner/problem/book/ch1/7. hanoi/data/input/6.input new file mode 100644 index 0000000..abdfb05 --- /dev/null +++ b/resource/runner/problem/book/ch1/7. hanoi/data/input/6.input @@ -0,0 +1 @@ +60 diff --git a/resource/runner/problem/book/ch1/7. hanoi/data/input/7.input b/resource/runner/problem/book/ch1/7. hanoi/data/input/7.input new file mode 100644 index 0000000..d61f00d --- /dev/null +++ b/resource/runner/problem/book/ch1/7. hanoi/data/input/7.input @@ -0,0 +1 @@ +90 diff --git a/resource/runner/problem/book/ch1/7. hanoi/data/input/8.input b/resource/runner/problem/book/ch1/7. hanoi/data/input/8.input new file mode 100644 index 0000000..da6b646 --- /dev/null +++ b/resource/runner/problem/book/ch1/7. hanoi/data/input/8.input @@ -0,0 +1,2 @@ +150 + diff --git a/resource/runner/problem/book/ch1/7. hanoi/data/input/9.input b/resource/runner/problem/book/ch1/7. hanoi/data/input/9.input new file mode 100644 index 0000000..f12ec2a --- /dev/null +++ b/resource/runner/problem/book/ch1/7. hanoi/data/input/9.input @@ -0,0 +1,2 @@ +190 + diff --git a/resource/runner/problem/book/ch1/7. hanoi/data/output/1.output b/resource/runner/problem/book/ch1/7. hanoi/data/output/1.output new file mode 100644 index 0000000..2bc4cd6 --- /dev/null +++ b/resource/runner/problem/book/ch1/7. hanoi/data/output/1.output @@ -0,0 +1 @@ +510 diff --git a/resource/runner/problem/book/ch1/7. hanoi/data/output/10.output b/resource/runner/problem/book/ch1/7. hanoi/data/output/10.output new file mode 100644 index 0000000..8351c19 --- /dev/null +++ b/resource/runner/problem/book/ch1/7. hanoi/data/output/10.output @@ -0,0 +1 @@ +14 diff --git a/resource/runner/problem/book/ch1/7. hanoi/data/output/2.output b/resource/runner/problem/book/ch1/7. hanoi/data/output/2.output new file mode 100644 index 0000000..e8f3792 --- /dev/null +++ b/resource/runner/problem/book/ch1/7. hanoi/data/output/2.output @@ -0,0 +1 @@ +65534 diff --git a/resource/runner/problem/book/ch1/7. hanoi/data/output/3.output b/resource/runner/problem/book/ch1/7. hanoi/data/output/3.output new file mode 100644 index 0000000..34946e8 --- /dev/null +++ b/resource/runner/problem/book/ch1/7. hanoi/data/output/3.output @@ -0,0 +1 @@ +524286 diff --git a/resource/runner/problem/book/ch1/7. hanoi/data/output/4.output b/resource/runner/problem/book/ch1/7. hanoi/data/output/4.output new file mode 100644 index 0000000..4caf035 --- /dev/null +++ b/resource/runner/problem/book/ch1/7. hanoi/data/output/4.output @@ -0,0 +1 @@ +67108862 diff --git a/resource/runner/problem/book/ch1/7. hanoi/data/output/5.output b/resource/runner/problem/book/ch1/7. hanoi/data/output/5.output new file mode 100644 index 0000000..ef098a1 --- /dev/null +++ b/resource/runner/problem/book/ch1/7. hanoi/data/output/5.output @@ -0,0 +1 @@ +2199023255550 diff --git a/resource/runner/problem/book/ch1/7. hanoi/data/output/6.output b/resource/runner/problem/book/ch1/7. hanoi/data/output/6.output new file mode 100644 index 0000000..459ee63 --- /dev/null +++ b/resource/runner/problem/book/ch1/7. hanoi/data/output/6.output @@ -0,0 +1 @@ +2305843009213693950 diff --git a/resource/runner/problem/book/ch1/7. hanoi/data/output/7.output b/resource/runner/problem/book/ch1/7. hanoi/data/output/7.output new file mode 100644 index 0000000..35210c1 --- /dev/null +++ b/resource/runner/problem/book/ch1/7. hanoi/data/output/7.output @@ -0,0 +1 @@ +2475880078570760549798248446 diff --git a/resource/runner/problem/book/ch1/7. hanoi/data/output/8.output b/resource/runner/problem/book/ch1/7. hanoi/data/output/8.output new file mode 100644 index 0000000..af61ee7 --- /dev/null +++ b/resource/runner/problem/book/ch1/7. hanoi/data/output/8.output @@ -0,0 +1 @@ +2854495385411919762116571938898990272765493246 diff --git a/resource/runner/problem/book/ch1/7. hanoi/data/output/9.output b/resource/runner/problem/book/ch1/7. hanoi/data/output/9.output new file mode 100644 index 0000000..ca1377a --- /dev/null +++ b/resource/runner/problem/book/ch1/7. hanoi/data/output/9.output @@ -0,0 +1 @@ +3138550867693340381917894711603833208051177722232017256446 diff --git a/resource/runner/problem/book/ch1/7. hanoi/description.md b/resource/runner/problem/book/ch1/7. hanoi/description.md new file mode 100644 index 0000000..ab43856 --- /dev/null +++ b/resource/runner/problem/book/ch1/7. hanoi/description.md @@ -0,0 +1,51 @@ +# Hanoi双塔问题 + +## Tags + +- C++一本通 +- 高精度 +- NOIP2007 + +## Description + +给定$A$、$B$、$C$三根足够长的细柱,在A柱上放有$2n$个中间有孔的圆盘,共有$n$个不同的尺寸,每个尺寸都有两个相同的圆盘,注意这两个圆盘是不加区分的。 +现要将这些圆盘移到$C$柱上,在移动过程中可放在$B$柱上暂存。 + +要求: + +1. 每次只能移动一个圆盘; +2. $A$、$B$、$C$三根细柱上的圆盘都要保持上小下大的顺序; + +任务:设$A_n$为$2n$个圆盘完成上述任务所需的最少移动次数,对于输入的$n$,输出$A_n$ + +输入一个正整数$n$,表示在$A$柱上放有$2n$个圆盘,其中 $n\le 200$ + +## Example Cases + +### Case 1 + +#### Input + +``` +1 +``` + +#### Output + +``` +2 +``` + +### Case 2 + +#### Input + +``` +2 +``` + +#### Output + +``` +6 +```