SCIENCE LEAGUE代写、代做rectangular grid、代写Java,c/c++,Python编程语言帮做C/C++编程|帮做Ha

AMERICAN COMPUTER SCIENCE LEAGUEIntermediate Division - StretchContest #3PROBLEM: Given a rectangular grid and the 3 types of pieces shown below, the object of Stretch is toplace pieces in the grid so that they form a connected path from the left side to the right side or from theright side to the left side. If the initial piece is in the leftmost column, the path goes to the rightmostcolumn. If the initial piece is in the rightmost column, the path goes to the leftmost column. Regardlessof which direction the path is created, the output is always from left to right.● A piece cannot be rotated or flipped.● A piece can only connect to the last piece that was placed and one column to the right of thatpiece if the path is left-to-right OR one column to the left of that piece if the path is right-to-left.● A piece can connect only at a tile with a circle and the tiles with the circles are the only tiles thatare allowed to touch.● All tiles of the connecting piece must be to the right (if left-to-right) or to the left (if right-to-left)of all previously placed pieces.● A piece cannot be placed in the grid such that it would cover any part of another piece, cover ablocked cell, or extend beyond the grid.● The one and only tile allowed to touch the starting side is a circle tile.● The one and only tile allowed to touch the opposite side is a circle tile.● Pieces are placed in alphabetical order. If a piece does not fit, skip it and use the next piece thatfits. When Piece C is either used or skipped, then begin again with Piece A.● GriSCIENCE LEAGUE作业代写、代做rectangular grid作业、代写Java,c/c++,Python编d cells are numbered consecutively starting with 1 in the upper left corner and continue fromleft to right and from top to bottom.● We guarantee that if a piece can be placed, then that will be the only location it can be placed.2018-2019AMERICAN COMPUTER SCIENCE LEAGUEIntermediate Division - StretchContest #3EXAMPLE: The following example is a 6 x 10 grid with a starting cell of 11. There are blocked cells atcells 23 and 37. Piece A is placed at 11. Piece B can only be placed at 14. The next piece must connectat 26. Piece C cannot be placed at 26 because there is a blocked cell at 37. Therefore, Piece C is skipped.Piece A is placed at Location 26. The next piece must connect at 29. Piece B is placed at 29 and touchesthe right side at 40. Therefore, the path is ABAB.INPUT: There will be 5 lines of data. Each line will contain the numbers: r , c , s, n , followed by nnumbers. r indicates the number of rows in the grid. c indicates the number of columns in the grid. sindicates the starting cell number for the first piece. n indicates the number of blocked cells. The next nnumbers are the cells that are designated as blocked.OUTPUT: Form a path from the starting cell to the opposite edge of the grid using the algorithm above.Print the sequence of pieces that were used to form the path from left to right.SAMPLE INPUT http://www.datafiles.acsl.org/2019/contest3/int-sample-input.txt6 10 11 2 23 374 9 10 2 23 265 9 1 2 13 264 10 40 2 13 265 15 75 1 40SAMPLE OUTPUT1. ABAB2. AAA3. ACBB4. ABCA5. ACBABA转自:http://www.7daixie.com/2019030729243705.html

你可能感兴趣的:(SCIENCE LEAGUE代写、代做rectangular grid、代写Java,c/c++,Python编程语言帮做C/C++编程|帮做Ha)