Problem 1097. USC Fall 2012 ACM Question A : Read Input File
This Challenge is to read the Question A input text file of the USC ACM Fall 2012 Contest.
The text format is: Number of sets,RowsSet1 ColsSet1,Array1, Vector1, RowsSet2 ColsSet2, Array2, Vector2
eg:Two data sets of arrays 3x3 and 2x4
2 3 3 000 111 110 010 2 4 1010 1100 0001
The USC input file has 17 data sets.
Input: [ url_filename, k], k= array data set to return
Output: Selected data set Array
Example: [ http://contest.usc.edu/index.php/Fall12/Home?action=download&upname=codes.in.txt, 1]
Output: [0 0 0; 1 1 1; 1 1 0]
How will the Pros read and process the text file?
Follow up Challenge will be solving the actual ACM question.
Solution Stats
Solution Comments
Show commentsProblem Recent Solvers9
Suggested Problems
-
the fly, the train, the second train, and their Zeno's paradox
68 Solvers
-
Create a function handle that reverses the input arguments of another function handle
147 Solvers
-
Convert a vector into a number
594 Solvers
-
Vector Linear sum: (p1-m1)V1+(p2-m2)V2+...(pK-mk)Vk
54 Solvers
-
Find third Side of a right triangle given hypotenuse and a side. No * - or other functions allowed
178 Solvers
More from this Author308
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!