Universal Cup Judging System

Universal Cup

Süre Sınırı: 1.0 s Bellek Sınırı: 1024 MB Toplam puan: 100
İstatistikler

אתמול בשעה 9:00 החלו הפעילויות החובה הקשורות לתחרות AMPPZ. לוח הזמנים כלל $n$ פעילויות שהתקיימו זו אחר זו, ונמשכו $t_1, t_2, \dots, t_n$ דקות בהתאמה. אתמול בשעה 19:00 התקיימה גם תחרות ההאקינג המפורסמת, ועד לשעה זו המשתתפים רצו כבר להיות במלון.

קבעו כמה זמן נותר למשתתפים כדי לחזור למלון לאחר הפעילות האחרונה, בהנחה שהכול התנהל אתמול לפי התוכנית.

קלט

השורה הראשונה מכילה מספר שלם $n$ ($1 \le n \le 100$), המציין את מספר הפעילויות.

השורה השנייה מכילה סדרה של $n$ מספרים שלמים $t_1, t_2, \dots, t_n$ ($1 \le t_i \le 500$), המציינים את משכי הפעילויות העוקבות בדקות.

ניתן להניח שהמארגנים דאגו לכך שכל הפעילויות בלוח הזמנים יסתיימו לא יאוחר מאתמול בשעה 18:59, כך שלמשתתפים נותר פרק זמן חיובי לחזור למלון.

פלט

הדפיסו מספר שלם יחיד — מספר הדקות שנותרו למשתתפים כדי לחזור למלון.

דוגמה

קלט

10
45 15 180 60 30 15 105 15 30 45

פלט

60

הערה

הפעילויות העוקבות בלוח הזמנים היו כדלקמן:

שעות פעילות
09:00–09:45 פתיחה
09:45–10:00 הפסקה
10:00–13:00 מושב הרצאות
13:00–14:00 ארוחת צהריים
14:00–14:30 כללי ארגון התחרות
14:30–14:45 הפסקה
14:45–16:30 תחרות תרגול
16:30–16:45 הפסקה
16:45–17:15 דיון בתחרות התרגול
17:15–18:00 ארוחת ערב

נותרו בדיוק 60 דקות לחזור למלון לפני השעה 19:00.

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.