lab1spr12.001

lab1spr12.001 - CSE 2320-001 Lab Assignment 1 Due February...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
CSE 2320-001 Lab Assignment 1 Due February 14, 2012 Goals: 1. Application of sorting. 2. Application of binary search. Requirements: 1. Design, code, and test a C program to perform range queries for two dimensional point data. The first line of the input will be n , the number of integer coordinate pairs in the next n input lines. n will not exceed 5000. Each of the remaining lines will have four values giving the coordinates of the lower left point and upper right point of a bounding box . The last input line will be -1 -1 -1 -1 . All input point coordinates will be in the range 0 . . 1000 , inclusive. The input should be read from standard input ( stdin ). Your code should preprocess (sort) the points and use O( m + log n ) time to process each query, where m is the the number of points in the smaller of the horizontal and vertical “slabs”. For each query you should output 1) m , 2) the coordinates of the points in the answer, and 3) the number of points in the answer. 2.
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 3

lab1spr12.001 - CSE 2320-001 Lab Assignment 1 Due February...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online