Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

0

Share

Download to read offline

ACPC2016Day3:D問題

Download to read offline

ACPC2016Day3:D問題

Related Books

Free with a 30 day trial from Scribd

See all
  • Be the first to like this

ACPC2016Day3:D問題

  1. 1. 2016 Day3 D:
  2. 2. • [si, ti] N • T • • : 1≤T≤1015 , 1≤N≤105 , 0≤si<ti≤1015
  3. 3. • T = 9, N = 3 • [1,5] [9,11] [13,20] • 4 0 201 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
  4. 4. • T = 9, N = 3 • [1,5] [9,11] [13,20] • 7 ← 0 201 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
  5. 5. • • 1 1 ( ±0) • (N ) 0 201 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 +1 -1
  6. 6. : • • T • • • • T-si l,r +4 sum = 4
  7. 7. : • • T • • • • T-si l r +1 sum = 5
  8. 8. : • • T • • • • T-si l,r +1-4 sum = 2
  9. 9. : • • T • • • • T-si l r +7 sum = 9
  10. 10. : • • l, r N 
 → O(N) • l r l r +7 sum = 9
  11. 11. • (Java) : 37 • (C++) : 24 • (C++) : 28 • (python) : 22
  12. 12. • AC / • 24 / 36 (66.7%) • First Acceptance • on-line: TKT29 (00:12) • on-site: UkonThePower (00:40)

ACPC2016Day3:D問題

Views

Total views

250

On Slideshare

0

From embeds

0

Number of embeds

1

Actions

Downloads

5

Shares

0

Comments

0

Likes

0

×