HomeVolumesContestsSectionsForumsUsersPrintHelpAbout

Sections > Unsorted > problem:


50059 - Passengers in the Train

Section problems

• Coins
• Primes
• Providers
• 2-10
• 50006 - Division
• 50030 - Exam Averages
• 50034 - Profit or Loss
• 50057 - Parkside's Other Triangle
• 50059 - Passengers in the Train
• 50061 - Cinema Tickets
• 50065 - Page "Like" Ave...
• 50076 - Zero Padding
• 50085 - Calculating Weekly Pay
• 50086 - Calculating Sales
• 50087 - Three Times
• 50088 - ATM
• 50093 - Pattern with stars

Feedback

If you notice incorrect translations in Contester, please let author know.

Time limit 2000/4000/4000/4000 ms. Memory limit 65000/65000/65000/65000 Kb.
Prepared by Osman Ay. Difficulty Alpha

Pasagjere ne Tren

English

Nje tren e le stacionin e pare me N pasagjere dhe viziton K stacione para se te arrije ne stacionin e fundit. Ne cdo stacion disa pasagjere zbresin nga treni dhe disa te tjere hipin ne tren. Te gjithe njerezit qe jane ende ne tren zbresin ne stacionin e fundit.

Pyetja:
Gjeni sa pasagjere zbresin ne stacionin e fundit.

Specifikimi i te dhenave:
Ne rreshtin e pare te te dhenave ndodhen dy numra te plote K dhe N ku 0 ≤ (K and N) ≤ 1000. Ne secilin nga K rreshtat ndodhen dy numra te plote (midis 0 dhe 1000), i pari tregon numrin e pasagjereve qe zbresin dhe i dyti tregon numrin e pasagjereve qe hipin ne tren ne stacion.

Specifikimi i rezultatit:
Rezultati duhet te jete nje numer i plote i cili tregon numrin e pasagjereve qe zbresin nga treni ne stacionin e fundit.

Shembulli I i te Dhenave
5 10
10 17
15 6
6 6
8 10
5 2
Shembulli II i te Dhenave
8 4
3 7
8 6
4 2
1 3
4 5
4 5
8 6
6 5
Rezultati I
7
Rezultati II
5


Для отправки решений необходимо выполнить вход.

www.contester.ru