## Battle Positions

View as PDF

Points: 7
Time limit: 0.1s
Java 0.6s
Python 0.6s
Memory limit: 128M

Author:
Problem type
Allowed languages
Ada, Assembly, Awk, Brain****, C, C#, C++, COBOL, CommonLisp, D, Dart, F#, Forth, Fortran, Go, Groovy, Haskell, Intercal, Java, JS, Kotlin, Lisp, Lua, Nim, ObjC, OCaml, Octave, Pascal, Perl, PHP, Pike, Prolog, Python, Racket, Ruby, Rust, Scala, Scheme, Sed, Swift, TCL, Text, Turing, VB, Zig

The ZAFT are attacking the Orb Union! There are stations, numbered from (), that need to be defended. For it to be secure, the Orb Union needs to have at least troops at each station. Unfortunately, due to the radar-jamming effects of the Neutron Jammer, the Orb Union cannot order their troops to move between stations. The Orb Union will send waves of troops, each of which sends troops to each of the stations (). All stations start with troops.

The Orb Union wants you to help them find the number of stations that are not secure.

#### Input Specification

The first line will contain the integer (), the number of stations.

The second line will contain the integer (), the minimum number of troops required to defend a station.

The third line will contain the integer (), the number of waves of troops.

The next lines will contain 3 space-separated integers. These integers will be in the order , , .

#### Output Specification

Output the total number of stations that have less than troops.

#### Sample Input

4
1
3
1 3 1
2 3 2
3 3 2

#### Output for Sample Input

1

#### Explanation of Output for Sample Input

Station 1 has 1 troop, station 2 has 3 troops, station 3 has 5 troops and station 4 has 0 troops. Station 4 is the only station with less than 1 troop, so the output is 1.

• commented on Feb. 5, 2020, 7:31 p.m.

This comment is hidden due to too much negative feedback. Click here to view it.

• commented on March 18, 2017, 10:56 a.m.

This comment is hidden due to too much negative feedback. Click here to view it.

• commented on April 17, 2016, 10:35 p.m. edited

This comment is hidden due to too much negative feedback. Click here to view it.

• commented on Jan. 7, 2015, 3:03 p.m.

This comment is hidden due to too much negative feedback. Click here to view it.

• commented on Jan. 7, 2015, 3:50 p.m.

This comment is hidden due to too much negative feedback. Click here to view it.

• commented on Jan. 7, 2015, 3:32 p.m.

This comment is hidden due to too much negative feedback. Click here to view it.

• commented on Dec. 31, 2014, 9:34 p.m.

This comment is hidden due to too much negative feedback. Click here to view it.

• commented on Dec. 31, 2014, 9:38 p.m.

This comment is hidden due to too much negative feedback. Click here to view it.

• commented on Dec. 31, 2014, 9:42 p.m.

This comment is hidden due to too much negative feedback. Click here to view it.

• commented on Dec. 31, 2014, 9:35 p.m.

This comment is hidden due to too much negative feedback. Click here to view it.

• commented on Dec. 31, 2014, 9:16 p.m.

This comment is hidden due to too much negative feedback. Click here to view it.

• commented on Dec. 31, 2014, 10:14 p.m.

This comment is hidden due to too much negative feedback. Click here to view it.

• commented on Dec. 31, 2014, 9:24 p.m.

This comment is hidden due to too much negative feedback. Click here to view it.

• commented on Dec. 31, 2014, 9:30 p.m.

This comment is hidden due to too much negative feedback. Click here to view it.

• commented on Dec. 31, 2014, 9:49 p.m.

This comment is hidden due to too much negative feedback. Click here to view it.

• commented on Dec. 31, 2014, 10:50 p.m.

This comment is hidden due to too much negative feedback. Click here to view it.