Draft saved on this device
▤ Description
ConcurrencyEasy
Count Condition Variable Notifications
A debugger records N notification calls as ONE or ALL.
A debugger records N notification calls as ONE or ALL. Count how many notify_one and notify_all operations occurred. Notifications do not imply successful wakeups; this exercise analyzes log events only.
Input format
First line N; next N lines ONE or ALL.
Output format
Print the number of ONE events followed by the number of ALL events.
Examples
Example 1
Input
5 ONE ALL ONE ONE ALL
Expected output
3 2
Constraints
- 0 ≤ N ≤ 100000
Related concepts
This early-access exercise uses standard input/output. More advanced concurrency challenges will use specialized class interfaces, instrumentation, and stress tests once the judging infrastructure is ready.
⌘ Code
Loading Monaco C++ editor…
Checking judge...
Checking whether the external C++ judge is available.
⌁ Test cases & resultsPublic samples: 1
Input
5 ONE ALL ONE ONE ALL
Expected output
3 2