2162 - IP_2020_YOU_MID Scoreboard

Time

2020/11/10 15:30:00 2020/11/10 18:00:00

Clarification

# Problem Asker Description Reply Replier Reply Time For all team

# Problem Pass Rate (passed user / total user)
12982 Easy Eight Queens Puzzle
12983 Implement Set Using Linked List II

12982 - Easy Eight Queens Puzzle   

Description

The eight queens puzzle is the problem of placing eight chess queens on an 8 times 8 chessboard so that no two queens threaten each other; thus, a solution requires that no two queens share the same row, column, or diagonal.

One possible solution is shown as the figure below.

Given where you place the first chess queen in column 0.

Please write a C program to tell how many possible solutions in this situation.

Input

One integer R.

Note:

  1. 7 >= R >= 0.

Output

Output should follow below format:

n

Note:

  1. Need to have a return value('\n') at the end of your output.
  2. n is the total number of solutions.
 

Sample Input  Download

Sample Output  Download

Tags




Discuss




12983 - Implement Set Using Linked List II   

Description

Please use the provided two files, main.c and function.h, to implement a set. Includes following functions:

  1. Insert N: insert an element which value is N into a set.
  2. Erase N: remove the element which value is N from a set.
  3. Check N: check if the element which value is N is inside a set.
  4. Traversal: traversal the set.

Note:

  1. A Set data structure shold never have a same element inside.
  2. Elements inside a set should be arranged from large to small.

Go download function.c, and only need to submit function.c.

Input

Legal commands:

  1. “insert N”: Insert an element which value is N into the set.
  2. “erase N”: Remove the element which value is N and return its pointer. Remove nothing is there is no element which value is N.
  3. “check N”: Check if the element which value is N is inside a set. Print “true\n” if it’s inside, print “false\n” if it’s not.
  4. “print”: Traversal the set, and print every element in ordered. Print “Set is empty\n” if set is empty.

Output

No need to handle output. Please use function.c above.

Sample Input  Download

Sample Output  Download

Partial Judge Code

12983.c

Partial Judge Header

12983.h

Tags




Discuss