QOJ.ac

QOJ

Límite de tiempo: 2 s Límite de memoria: 256 MB Puntuación total: 100

#22751. أرصدة البنك

Estadísticas

فتحت Alice وBetsy وCorinne وDebra حسابات. البنك يسجل مركزيًا الإيداع (مال داخل) والسحب (خارج). هن مسؤولات ولا يسحبن أكثر مما لديهن.

من السجل (الصيغة أدناه) اطبع الأرصدة بعد كل المعاملات. البداية 0 لكل منهن؛ الأعداد ضمن صحيحات 32 بت.

الإدخال

  • السطر 1: الصحيح $N$، عدد المعاملات.

  • الأسطر $2$ إلى $N+1$: معاملة بحقلين، اسم وعدد؛ الموجب إيداع والسالب سحب.

الإخراج

  • الأسطر $1..4$: اسم ورصيد، الأسماء أبجديًا.

أمثلة

الإدخال 1

6
Alice +100
Corinne +100
Betsy +200
Alice -10
Debra +10
Betsy -100

الإخراج 1

Alice 90
Betsy 100
Corinne 100
Debra 10

ملاحظة

تفاصيل الإدخال

Alice تودع 100 وCorrinne كذلك وBetsy 200. Alice تسحب 10 وDebra تودع 10 وBetsy تسحب 100. الأسماء فقط Alice وBetsy وCorinne وDebra.

المؤلف: Rob Kolstad، 2004

Discussions

About Discussions

The discussion section is only for posting: General Discussions (problem-solving strategies, alternative approaches), and Off-topic conversations.

This is NOT for reporting issues! If you want to report bugs or errors, please use the Issues section below.

Open Discussions 0
No discussions in this category.

Issues

About Issues

If you find any issues with the problem (statement, scoring, time/memory limits, test cases, etc.), you may submit an issue here. A problem moderator will review your issue.

Guidelines:

  1. This is not a place to publish discussions, editorials, or requests to debug your code. Issues are only visible to you and problem moderators.
  2. Do not submit duplicated issues.
  3. Issues must be filed in English or Chinese only.
Active Issues 0
No issues in this category.
Closed/Resolved Issues 0
No issues in this category.