1 of 24

ACM ICPC 2017 - Kolkata Kanpur Regional

Problem Discussion

2 of 24

  • Reached Safely Or Not
  • Triangle Count
  • Appearance Count
  • Club of Riders
  • Get The Gold
  • Password Riddle
  • Raw Power
  • Huge Number of Trees
  • Secrets
  • Palace of King
  • Unpredictable Array

Easy

Easy

Easy - Medium

Easy - Medium

Medium

Medium

Medium

Medium - Hard

Medium - Hard

Hard

Super Easy

3 of 24

Reached Safely Or Not

  • Accepted: 160
  • First Solve: lastTry
  • First Solution Time: 00:07:22

Author: Kazi Hasan Zubaer

4 of 24

Reached Safely Or Not

Analysis

�Just keep track of the position and check the end position if it’s dangerous, or relative’s home, or something else.

5 of 24

Triangle Count

  • Accepted: 156
  • First Solve: SSH, JGEC
  • First Solution Time: 00:10:02

Author: Kazi Hasan Zubaer

6 of 24

Triangle Count

Analysis:

The answer is 1 + 2  + 3 + … + (L-K+1). That’s it, plain as simple. Use the summation formula if you wish.

7 of 24

Appearance Count

  • Accepted: 119
  • First Solve: WeAreNoobs, IIT Dhanbad
  • First Solution Time: 00:08:43

Author: F. A. Rezaur Rahman Choudhury

8 of 24

Appearance Count

Analysis:

  • Number of occurrence of a string in all possible string of length n doesn’t depend on the content of the string. It only depends on the length of the string.
  • xxxyyyxxxx
  • Any string of length m appears in all possible strings of length n exactly �(n-m+1)*26n-m times.

9 of 24

Club of Riders

  • Accepted: 109
  • First Solve: weakMind, BITS Pilani
  • First Solution Time: 00:34:13

Author: Sheikh Shakib Ahmed

10 of 24

Club of Riders

Analysis� 1 5

� 1 2 5 6�� 12 2 1 1�

11 of 24

Get The Gold

  • Accepted: 32
  • First Solve: Supercalifragilistic - IITM
  • First Solution Time: 00:45:03

Author: Dr. Md. Kaykobad

12 of 24

Get The Gold

Analysis�

13 of 24

Password Riddle

  • Accepted: 8
  • First Solve: NeverSettle
  • First Solution Time: 03:02:09

Author: Kazi Hasan Zubaer

14 of 24

Password Riddle

Analysis

  • All the characters represented by a segments are the same
  • The literals will be simply multiplied
  • Only 4 primes to consider

two odd three six matches with C = 666…��len(C) = 2 * {1,3,5,7} * 3

15 of 24

Raw Power

  • Accepted: 4
  • First Solve: TooLazyToPropagate, IITV
  • First Solution Time: 02:25:53

Author: Archit Karandikar

16 of 24

Raw Power

Analysis�

  • Binary search on the answer, q
  • S : all the intervals sorted according to start point. �E : all the intervals sorted according to end point.
  • Claim:�There exist an optimal way where at least one interval remains stationary

��

17 of 24

Huge Number of Trees

  • Accepted: 1
  • First Solve: egglet, IITB
  • First Solution Time: 04:51:53

Author: Anindya Das

18 of 24

Huge Number of Trees

Analysis

  • K nodes in previous level

  • N nodes remaining
  • D is the minimum degree
  • Sn (n, k, d) = k * Sn (n-1, k, d) � + C (n-1, d-1) * Sn (n-d, k-1, d)

1

2

3

k

19 of 24

Secrets

  • Accepted: 0
  • First Solve: --
  • First Solution Time: --

Author: Kazi Hasan Zubaer & Zi Song

20 of 24

Secrets

Analysis

  • Your envelope and your best friends envelope are identical
  • Number of states: 10!/(2^5)

21 of 24

Palace of King

  • Accepted: 0
  • First Solve: --
  • First Solution Time: --

Author: Kazi Hasan Zubaer

22 of 24

Palace of King

Analysis��

23 of 24

Unpredictable Array

  • Accepted: 0
  • First Solve: --
  • First Solution Time: --

Author: Repon Kumar Roy

24 of 24

Unpredictable Array