NxN sliding作业代写、代写c/c++程序设计作业、代做c++课程作业、代做program课程作业代做Python程序|帮做Haskell程序

Assignment1 - Untitled Wikihttps://wiki.cse.unsw.edu.au/cs9024cgi/19T2/Assignment1 1/3Assignment 1: Solvability of the NxN slidingtile puzzleThe sliding tile puzzle is a game that requires you to move tiles on a board. The board is NxN,and there are N-1 tiles numbered from 1..N-1 that occupy the board. There is hence 1 location onthe board that is empty (referred to as a blank).There is some (arbitrary) start configuration of the numbered tiles on the board. Starting with thisconfiguration, the aim is to move tiles until some chosen goal configuration is reached, and to dothis in the least possible number of moves. You may only move a tile into the blank if the tileneighbours the blank. Moves can be only be in the horizontal and vertical directions (notdiagonal).The sliding-tile puzzle also has other names, such as the 8 Puzzle (for the special case of a 3x3board) or 15 Puzzle (a 4x4 board) and so on. Sometimes the name N Puzzle is used (indicating anNxN board).You can play the game online at:sliding-tile puzzleIn this assignment you are asked to write a C program that determines whether a given puzzle issolvable. (Note that you do not have to actually solve the puzzle.)There are some conditions that you should strictly adhere to:1. the program reads text from stdin with a format described below (we will be auto-testingyour program with our input so you must conform to this format)2. your program should be able to handle any sized board, starting with 2x2note that the size of the board is determined by the number of tiles on the input3. if the input is correct and the goal configuration is:reachable from the start configuration, your program should generate the output textsolvable (to stdout)not reachable from the start configuration, your program should generate the outputtext unsolvable (to stdout)09/06/2019 Assignment1 - Untitled Wikihttps://wiki.cse.unsw.edu.au/cs9024cgi/19T2/Assignment1 2/34. if the input is not correct, your program should generate an error message (to stdout)5. if a system call fails in your program, the program should generate an error message (tostderr)6. design and programming restrictions:you are not allowed to use any arraysyou are not allowed to use linked lists/trees/graphsyou should use an ADT to represent the board and operations on the boardInput formatTwo lines of text on stdin specifies the start and goal configurations, read from left to right, top tobottom. Each line consists of a sequence of integers, separated by any number (>0) of blanksand/or tabs, that represent the tile numbers, and a single letter b to represent the blank space onthe board. These integers should of course be in the range 1..N-1 where the board is of size NxN.The first line specifies the start board, the second line the goal board. For example:9 12 5 4 2 b 7 11 3 6 10 13 14 1 8 151 2 3 4 5 6 7 8 9 10 11 12 13 14 b 15represents a sliding-tile puzzle on a 4x4 board with the tiles initially placed on the board as shownin the image at the top of page. The goal configuration has the tiles ordered row by row.In the case of incorrect inputChecking the correctness of each configuration is vital. For example, an input line may notrepresent an NxN board, or the blank may be missing, or one or more of the tile numbers 1..Nmay be missing, or the 2 boards may not be the same size or the input contains something otherthan a number or b. There may be more possibilities.If the configuration is erroneous, your program must generate an appropriate error message (tostdout). Note that it is possible to have more than one error, and in that case you only need togenerate a single error message. For example, consider the configuration 1 2 b 1. There are 2errors in this configuration: the tile 3 is missing, and the tile 1 is duplicated. It does not matterwhich error is detected by your program, just as long as the error is correct. When an error isdetected and reported, your program should exit gracefully, with status EXIT_FAILURE. The textyou use in error messages should be informative, but please keep it brief.In the case of correct inputIf the input is correct, the program should write the following 3 lines to stdout:the text start: followed by the start configurationthe text goal: followed by the goal configurationthe text solvable or unsolvable as appropriateThe output for the 4x4 game above is for example:start: 9 12 5 4 2 b 7 11 3 6 10 13 14 1 8 15goal: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 b 15solvableThe output for a game on a 2x2 board that happens to be unsolvable is:09/06/2019 Assignment1 - Untitled Wikihttps://wiki.cse.unsw.edu.au/cs9024cgi/19T2/Assignment1 3/3Assignment1 (2019-06-08 17:12:33由AlbertNymeyer编辑)start: 2 1 3 bgoal: 1 2 3 bunsolvableIf the input is correct the program should exit with EXIT_SUCCESS.DesignYou should make an ADT to implement the puzzle. The client, which is the main program, callsfunctions in the ADT to read the input, check for correctness and determine solvability. Theinterface between the client and the ADT is a header file.MarkingMarks will be deducted if you fail any of our tests for incorrect input, or incorrectly determine thesolvability of the puzzle. Marks will also be deducted for poor design (e.g. not using an ADT),poor programming practice or violating any of the rules above.The assignment is worth 10 marks.SubmissionYou should submit exactly 4 files:1. a Makefile that generates the executable puzzle (you should use the dcc compiler)2. the C source code of the ADT (call it boardADT.c)3. the header file of the ADT (boardADT.h)4. the main program (puzzle.c)To submit the assignment, use the command:~cs9024/bin/classrun -give assign1 Makefile boardADT.c boardADT.hpuzzle.c本团队核心人员组成主要包括BAT一线工程师,精通德英语!我们主要业务范围是代做编程大作业、课程设计等等。我们的方向领域:window编程 数值算法 AI人工智能 金融统计 计量分析 大数据 网络编程 WEB编程 通讯编程 游戏编程多媒体linux 外挂编程 程序API图像处理 嵌入式/单片机 数据库编程 控制台 进程与线程 网络安全 汇编语言 硬件编程 软件设计 工程标准规等。其中代写编程、代写程序、代写留学生程序作业语言或工具包括但不限于以下范围:C/C++/C#代写Java代写IT代写Python代写辅导编程作业Matlab代写Haskell代写Processing代写Linux环境搭建Rust代写Data Structure Assginment 数据结构代写MIPS代写Machine Learning 作业 代写Oracle/SQL/PostgreSQL/Pig 数据库代写/代做/辅导Web开发、网站开发、网站作业ASP.NET网站开发Finance Insurace Statistics统计、回归、迭代Prolog代写Computer Computational method代做因为专业,所以值得信赖。如有需要,请加QQ:99515681 或邮箱:[email protected] 微信:codehelp QQ:99515681 或邮箱:[email protected] 微信:codehelp

你可能感兴趣的:(NxN sliding作业代写、代写c/c++程序设计作业、代做c++课程作业、代做program课程作业代做Python程序|帮做Haskell程序)