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

3 3
2 4

The USC input file has 17 data sets.

Input: [ url_filename, k], k= array data set to return

Output: Selected data set Array

Example: [, 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

75.0% Correct | 25.0% Incorrect
Last solution submitted on Dec 11, 2015

Problem Comments

Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

MATLAB Academy

New to MATLAB?

Learn MATLAB today!

Join the 15-year community celebration.

Play games and win prizes!

Learn more