SWERC 2022-2023 - Online Mirror (Unrated, ICPC Rules, Teams Preferred)

Solutions are presented as using the least memory and the fastest execution time. It also takes the top 10 most recent solutions from each language. If you want to limit to a specific index, click the "Solved" button and go to that problem.

ContestId
Name
Phase
Frozen
Duration (Seconds)
Relative Time
Start Time
1776 SWERC 2022-2023 - Online Mirror (Unrated, ICPC Rules, Teams Preferred) FINISHED False 18000 99600923 Feb. 19, 2023, 11:05 a.m.

Problems

Solved
Index
Name
Type
Tags
Community Tag
Rating
( 7521 ) H Beppa and SwerChat PROGRAMMING two pointers

Beppa and her circle of geek friends keep up to date on a group chat in the instant messaging app SwerChat(^{\text{TM}}). The group has (n) members, excluding Beppa. Each of those members has a unique ID between (1) and (n). When a user opens a group chat, SwerChat(^{\text{TM}}) displays the list of other members of that group, sorted by decreasing times of last seen online (so the member who opened the chat most recently is the first of the list). However, the times of last seen are not displayed. Today, Beppa has been busy all day: she has only opened the group chat twice, once at 9:00 and once at 22:00. Both times, she wrote down the list of members in the order they appeared at that time. Now she wonders: what is the minimum number of other members that must have been online at least once between 9:00 and 22:00? Beppa is sure that no two members are ever online at the same time and no members are online when Beppa opens the group chat at 9:00 and 22:00. Each test contains multiple test cases. The first line contains an integer (t) ((1 \leq t \leq 10\,000)) — the number of test cases. The descriptions of the (t) test cases follow. The first line of each test case contains an integer (n) ((1 \leq n \leq 10^5)) — the number of members of the group excluding Beppa. The second line contains (n) integers (a_1, \, a_2, \, \dots, \, a_n) ((1 \le a_i \le n)) — the list of IDs of the members, sorted by decreasing times of last seen online at 9:00. The third line contains (n) integers (b_1, \, b_2, \, \dots, \, b_n) ((1 \le b_i \le n)) — the list of IDs of the members, sorted by decreasing times of last seen online at 22:00. For all (1\le i < j\le n), it is guaranteed that (a_i \ne a_j) and (b_i \ne b_j). It is also guaranteed that the sum of the values of (n) over all test cases does not exceed (10^5). For each test case, print the minimum number of members that must have been on

Tutorials

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
194236034 VectorASD gujik Liswiera H Feb. 19, 2023, 1:43 p.m. OK C# 10 TESTS 6 108 9728000
194216139 ruban H Feb. 19, 2023, 11:25 a.m. OK FPC TESTS 6 62 16179200
194225094 Xu_Hongxi H Feb. 19, 2023, 12:21 p.m. OK GNU C++14 TESTS 6 31 1228800
194216872 azra_gonul H Feb. 19, 2023, 11:29 a.m. OK GNU C++14 TESTS 6 31 2662400
194238666 Gao_Zixuan H Feb. 19, 2023, 2:03 p.m. OK GNU C++14 TESTS 6 46 819200
194231536 hanyh H Feb. 19, 2023, 1:07 p.m. OK GNU C++14 TESTS 6 46 819200
194225064 Unreal29 trandat130101 H Feb. 19, 2023, 12:21 p.m. OK GNU C++14 TESTS 6 46 819200
194225045 Pompeii Illumina_ H Feb. 19, 2023, 12:21 p.m. OK GNU C++14 TESTS 6 46 819200
194223757 Amsiam moursalinme H Feb. 19, 2023, 12:11 p.m. OK GNU C++14 TESTS 6 46 819200
194223261 AhmedEzzatG MahmoudAshour Abo_Samrah H Feb. 19, 2023, 12:07 p.m. OK GNU C++14 TESTS 6 46 819200
194222934 as_luffy rajatsingh072002 suiiiiiiiiiiii H Feb. 19, 2023, 12:05 p.m. OK GNU C++14 TESTS 6 46 819200
194222223 XCEsupremacy IcMtr icyM3tra H Feb. 19, 2023, noon OK GNU C++14 TESTS 6 46 819200

remove filters

Back to search problems