1113 - I2P CS 2016 Lee HW Week 15 Scoreboard

Time

2016/12/22 15:00:00 2016/12/26 15:20:00

Clarification

# Problem Asker Description Reply Replier Reply Time For all team

# Problem Pass Rate (passed user / total user)
11270 reverse linked list
11277 sort linked list

11270 - reverse linked list   

Description

Given a link list structure named Node.

 

typedef struct _Node {

    int data;

    struct _Node *next;

} Node;

Use this structure to implement a reversing linked list.

 

You will be provided with main.c and function.h, and asked to implement function.c.

For OJ submission:

       Step 1. Submit only your function.c into the submission block. (Please choose c compiler) 

       Step 2. Check the results and debug your program if necessary.

Input

The input contains a sequence of positive integers as the linklist and the order, except the last one, which is -1, indicating the end of the sequence. 

Output

The output contains the sequence of resulting linklist.

Sample Input  Download

Sample Output  Download

Partial Judge Code

11270.c

Partial Judge Header

11270.h

Tags




Discuss




11277 - sort linked list   

Description

Given a link list structure named Node.

typedef struct _Node {
    int data;
    struct _Node *next;
} Node;

Use this structure to implement a linked list sorting.


You will be provided with main.c and function.h, and asked to implement function.c.

For OJ submission:

       Step 1. Submit only your function.c into the submission block. (Please choose c compiler) 

       Step 2. Check the results and debug your program if necessary.

Input

The input contains a sequence of positive integers as the linked list in order.

The first line is an integer n as the number of elements in the linked list. (n<=100)

The second line contains n integers as the elements of the linked list.

Output

The output contains the sequence of resulting linklist.

Sample Input  Download

Sample Output  Download

Partial Judge Code

11277.cpp

Partial Judge Header

11277.h

Tags




Discuss