ผลต่างระหว่างรุ่นของ "Algo lab/running times"

จาก Theory Wiki
ไปยังการนำทาง ไปยังการค้นหา
(หน้าที่ถูกสร้างด้วย ': ''This is part of ske algo lab'' == Task 1: Closest pairs == == Task 2: Sorting == == Test data ==')
 
แถว 2: แถว 2:
  
 
== Task 1: Closest pairs ==
 
== Task 1: Closest pairs ==
 +
 +
{{กล่องสี|#e0e0e0|
 +
'''Task statement'''
 +
 +
You are given a list of '''n''' integers.  You want to find the minimum difference between pairs of these integers.
 +
 +
'''Input'''
 +
 +
* First line: integer '''n'''
 +
* Next '''n''' lines: each line contains one integer (ranging from 1 to 1,000,000,000)
 +
 +
'''Output'''
 +
 +
* One line: the minimum difference between pairs of these integers.
 +
 +
}}
  
 
== Task 2: Sorting ==
 
== Task 2: Sorting ==
  
 
== Test data ==
 
== Test data ==

รุ่นแก้ไขเมื่อ 00:45, 3 กันยายน 2561

This is part of ske algo lab

Task 1: Closest pairs

Task statement

You are given a list of n integers. You want to find the minimum difference between pairs of these integers.

Input

  • First line: integer n
  • Next n lines: each line contains one integer (ranging from 1 to 1,000,000,000)

Output

  • One line: the minimum difference between pairs of these integers.


Task 2: Sorting

Test data