1895 - I2P(I)2019_Yang_makeup Scoreboard

Time

2020/01/17 14:30:00 2020/01/17 16:30:00

Clarification

# Problem Asker Description Reply Replier Reply Time For all team

# Problem Pass Rate (passed user / total user)
12099 String sorting
12568 Reverse Linked List ver 2
12584 The Beauty of Distributing

12099 - String sorting   

Description

Given several strings, please output them in alphabetical order.

 

Input

Input consists of several lines, each of them is a string.


It is guaranteed that

  • # of strings won't exceed 200000
  • Length of each string won't exceed 100

Output

Print out strings in alphabetical order, one string per line.

 

Sample Input  Download

Sample Output  Download

Tags




Discuss




12568 - Reverse Linked List ver 2   

Description

Given several operations, push xpopprintreverse, create a linked list dynamicly.

  • push x: Add one Node (with data = x) at the front of linked list.
  • pop: Delete the Node at the front of linked list.
  • reverse: reverse the current linked list
  • print: output the linked list in given format.

You have to implement 3 functions:

1. void Push(Node** ptr_head,int x)
2. void Pop(Node** ptr_head)
3. void Reverse_List(Node** ptr_head)

Note: Modify the Node* head by Node** ptr_head

Input

There’re operations on several lines.
All operations are one of push xpopprintreverse.
It’s guaranteed that:

  • Number of operations is less than 5,000,000
  • Integer x is in [1000,1000]
  • The maximum length of linked list is less than 10,000.

Output

Output the linked list for every print.

 

Sample Input  Download

Sample Output  Download

Partial Judge Code

12568.c

Partial Judge Header

12568.h

Tags




Discuss




12584 - The Beauty of Distributing   

Description

Little brick is once playing a RPG game.
In this game, there are some magical reels(魔法卷軸) that can increase your skill level.
As a serious OCD patient (強迫症患者),
he can only accept that every skill he has is at the same level.

At the beginning, every skill is at level 0,
and he has N magical reels,
the ith reel can increase one of his skill by Xi levels.
LittleBrick wants to have as many skills as possible,
and he also want to use all N reels.

Tell LittleBrick what is the maximum number of skills he may have.

ouo.

 

For Example 1: 
6
1 1 2 2 3 3
The answer is 4, since you can make 4 skills to reach the same level 3,
by distributing the reels like (1, 2), (3), (1, 2), (3)

For Example 2: 
5
1 1 2 5 3
The answer is 2, since you can make 2 skills to reach the same level 6,
by distributing the reels like (1, 5), (1, 2, 3)

For Example 3
3
1 2 4
The answer is 1, since you can make only 1 skill to reach the same level 7,
by distributing the reels like (1, 2, 4)

Input

The first line contains an integer T, represent the number of test cases.
For each test case, the first line is an integer N,
which represents the number of reels LittleBrick has.
The next lines contain N number Xseparated by spaces,
which represents the number of levels the ith reels can increase to a single skill.

It is guarantee that:
1 <= T <= 10,
1 <= N <= 10,
1 <= Xi <= 100

Output

For each test case,
output the maximum number of skills LittleBrick can learn,
and a newline character after the answer.

Sample Input  Download

Sample Output  Download

Tags




Discuss