文件名称:find-sum
-
所属分类:
- 标签属性:
- 上传时间:2015-02-04
-
文件大小:23.5kb
-
已下载:0次
-
提 供 者:
-
相关连接:无下载说明:别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容来自于网络,使用问题请自行百度
1. Find Sum.
Given a set of n integers (in sorted order) and another integer x.
The algorithm has been designed that verifies whether there exist pairs of integers a and b such that
a + b = x,
Algorithm should output all such pair of integers.
our program takes as input a sequence of numbers in sorted order (in first line), the integer x (in second line) and outputs the resulting pairs as a,b (each pair on a separate line).
Note: Order of occurrence in output file among these resulting pairs should be maintained.
eg.
Input file (input.txt)
15 19 20 23 27 31 40 45
60
Output file (output.txt)
15,45
20,40
It assumes that our program is compiled into findSum.out executable and takes input.txt file as input and output.txt file as output.
./findSum.out input.txt output.txt-1. Find Sum.
Given a set of n integers (in sorted order) and another integer x.
The algorithm has been designed that verifies whether there exist pairs of integers a and b such that
a + b = x,
Algorithm should output all such pair of integers.
our program takes as input a sequence of numbers in sorted order (in first line), the integer x (in second line) and outputs the resulting pairs as a,b (each pair on a separate line).
Note: Order of occurrence in output file among these resulting pairs should be maintained.
eg.
Input file (input.txt)
15 19 20 23 27 31 40 45
60
Output file (output.txt)
15,45
20,40
It assumes that our program is compiled into findSum.out executable and takes input.txt file as input and output.txt file as output.
./findSum.out input.txt output.txt
Given a set of n integers (in sorted order) and another integer x.
The algorithm has been designed that verifies whether there exist pairs of integers a and b such that
a + b = x,
Algorithm should output all such pair of integers.
our program takes as input a sequence of numbers in sorted order (in first line), the integer x (in second line) and outputs the resulting pairs as a,b (each pair on a separate line).
Note: Order of occurrence in output file among these resulting pairs should be maintained.
eg.
Input file (input.txt)
15 19 20 23 27 31 40 45
60
Output file (output.txt)
15,45
20,40
It assumes that our program is compiled into findSum.out executable and takes input.txt file as input and output.txt file as output.
./findSum.out input.txt output.txt-1. Find Sum.
Given a set of n integers (in sorted order) and another integer x.
The algorithm has been designed that verifies whether there exist pairs of integers a and b such that
a + b = x,
Algorithm should output all such pair of integers.
our program takes as input a sequence of numbers in sorted order (in first line), the integer x (in second line) and outputs the resulting pairs as a,b (each pair on a separate line).
Note: Order of occurrence in output file among these resulting pairs should be maintained.
eg.
Input file (input.txt)
15 19 20 23 27 31 40 45
60
Output file (output.txt)
15,45
20,40
It assumes that our program is compiled into findSum.out executable and takes input.txt file as input and output.txt file as output.
./findSum.out input.txt output.txt
(系统自动生成,下载前可以参看下载内容)
下载文件列表
find sum/assignmentada2.docx
find sum/q1 findsum.docx
find sum/q1.cpp
find sum
find sum/q1 findsum.docx
find sum/q1.cpp
find sum
本网站为编程资源及源代码搜集、介绍的搜索网站,版权归原作者所有! 粤ICP备11031372号
1999-2046 搜珍网 All Rights Reserved.