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.
Problems
B"Berkomnadzor -- Federal Service for Supervision of Communications, Information Technology and Mass Media -- is a Berland federal executive body that protects ordinary residents of Berland from the threats of modern internet. Berkomnadzor maintains a list of prohibited IPv4 subnets (blacklist) and a list of allowed IPv4 subnets (whitelist). All Internet Service Providers (ISPs) in Berland must configure the network equipment to block access to all IPv4 addresses matching the blacklist. Also ISPs must provide access (that is, do not block) to all IPv4 addresses matching the whitelist. If an IPv4 address does not match either of those lists, it's up to the ISP to decide whether to block it or not. An IPv4 address matches the blacklist (whitelist) if and only if it matches some subnet from the blacklist (whitelist). An IPv4 address can belong to a whitelist and to a blacklist at the same time, this situation leads to a contradiction (see no solution case in the output description). An IPv4 address is a 32-bit unsigned integer written in the form a.b.c.d , where each of the values a,b,c,d is called an octet and is an integer from 0 to 255 written in decimal notation. For example, IPv4 address 192.168.0.1 can be converted to a 32-bit number using the following expression 192 cdot 2^{24} + 168 cdot 2^{16} + 0 cdot 2^8 + 1 cdot 2^0 . First octet a encodes the most significant (leftmost) 8 bits, the octets b and c -- the following blocks of 8 bits (in this order), and the octet d encodes the least significant (rightmost) 8 bits. The IPv4 network in Berland is slightly different from the rest of the world. There are no reserved or internal addresses in Berland and use all 2^{32} possible values. An IPv4 subnet is represented either as a.b.c.d or as a.b.c.d/x (where 0 <= x <= 32 ). A subnet a.b.c.d contains a single address a.b.c.d . A subnet a"... |
Tutorials
Submissions
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
53581149 |
Dilute |
B |
April 30, 2019, 3:45 p.m. |
OK |
GNU C++11 |
TESTS |
251 |
187 |
79155200 |
|
2500 |
53581224 |
Dilute |
B |
April 30, 2019, 3:48 p.m. |
OK |
GNU C++11 |
TESTS |
251 |
202 |
79155200 |
|
2500 |
45493377 |
_smhx |
B |
Nov. 9, 2018, 8:47 p.m. |
OK |
GNU C++11 |
TESTS |
251 |
218 |
7475200 |
|
2500 |
46002107 |
krijgertje |
B |
Nov. 20, 2018, 3:01 p.m. |
OK |
GNU C++11 |
TESTS |
251 |
218 |
107417600 |
|
2500 |
48657254 |
ReaLNero1 |
B |
Jan. 21, 2019, 3:37 a.m. |
OK |
GNU C++11 |
TESTS |
251 |
233 |
107417600 |
|
2500 |
44595864 |
ytc020306 MarkF zx2003 |
B |
Oct. 20, 2018, 12:30 p.m. |
OK |
GNU C++11 |
TESTS |
251 |
233 |
187392000 |
|
2500 |
45145710 |
FoolMike |
B |
Oct. 31, 2018, 4:45 p.m. |
OK |
GNU C++11 |
TESTS |
251 |
234 |
143462400 |
|
2500 |
44586515 |
wxh010910 sagitta_luminis jiangIy |
B |
Oct. 20, 2018, 9:44 a.m. |
OK |
GNU C++11 |
TESTS |
251 |
264 |
83353600 |
|
2500 |
44990183 |
function348 |
B |
Oct. 28, 2018, 12:26 p.m. |
OK |
GNU C++11 |
TESTS |
251 |
264 |
161996800 |
|
2500 |
47434029 |
forest |
B |
Dec. 23, 2018, 5:42 p.m. |
OK |
GNU C++11 |
TESTS |
251 |
265 |
6860800 |
|
2500 |
44751225 |
ReaLNero1 |
B |
Oct. 23, 2018, 8:03 p.m. |
OK |
GNU C++14 |
TESTS |
251 |
233 |
202547200 |
|
2500 |
44727348 |
Star_Feel |
B |
Oct. 23, 2018, 8:39 a.m. |
OK |
GNU C++14 |
TESTS |
251 |
233 |
202547200 |
|
2500 |
44586099 |
TLE apiadu whzzt |
B |
Oct. 20, 2018, 9:37 a.m. |
OK |
GNU C++14 |
TESTS |
251 |
280 |
119603200 |
|
2500 |
44598208 |
zhouzhendong |
B |
Oct. 20, 2018, 1:09 p.m. |
OK |
GNU C++14 |
TESTS |
251 |
295 |
84172800 |
|
2500 |
44731763 |
wiwitrifai |
B |
Oct. 23, 2018, 10:57 a.m. |
OK |
GNU C++14 |
TESTS |
251 |
296 |
66662400 |
|
2500 |
44664121 |
Anadi |
B |
Oct. 21, 2018, 4:53 p.m. |
OK |
GNU C++14 |
TESTS |
251 |
311 |
15155200 |
|
2500 |
44756502 |
Chuzyh jhdjames37 applese |
B |
Oct. 24, 2018, 2:20 a.m. |
OK |
GNU C++14 |
TESTS |
251 |
311 |
83251200 |
|
2500 |
44590611 |
I_love_Y_UME fblogy iaojnh |
B |
Oct. 20, 2018, 10:56 a.m. |
OK |
GNU C++14 |
TESTS |
251 |
311 |
175616000 |
|
2500 |
45076240 |
mjhun |
B |
Oct. 30, 2018, 12:51 a.m. |
OK |
GNU C++14 |
TESTS |
251 |
326 |
107212800 |
|
2500 |
44718675 |
dwt |
B |
Oct. 23, 2018, 1:24 a.m. |
OK |
GNU C++14 |
TESTS |
251 |
327 |
211558400 |
|
2500 |
44673706 |
animeshf |
B |
Oct. 22, 2018, 12:49 a.m. |
OK |
GNU C++17 |
TESTS |
251 |
234 |
19251200 |
|
2500 |
46100368 |
despair |
B |
Nov. 23, 2018, 5:16 a.m. |
OK |
GNU C++17 |
TESTS |
251 |
249 |
15360000 |
|
2500 |
44619570 |
icebound |
B |
Oct. 21, 2018, 5:24 a.m. |
OK |
GNU C++17 |
TESTS |
251 |
280 |
92364800 |
|
2500 |
45701091 |
vjudge5 |
B |
Nov. 14, 2018, 8:19 a.m. |
OK |
GNU C++17 |
TESTS |
251 |
296 |
112435200 |
|
2500 |
45087537 |
TooDumbToWin DeshiBasara |
B |
Oct. 30, 2018, 8:09 a.m. |
OK |
GNU C++17 |
TESTS |
251 |
311 |
16486400 |
|
2500 |
44688125 |
shenyunhan xzm2020 |
B |
Oct. 22, 2018, 10:44 a.m. |
OK |
GNU C++17 |
TESTS |
251 |
311 |
80384000 |
|
2500 |
46031137 |
lixinyue |
B |
Nov. 21, 2018, 1:48 p.m. |
OK |
GNU C++17 |
TESTS |
251 |
312 |
69529600 |
|
2500 |
44705390 |
albeXL yagamiL BlackTools |
B |
Oct. 22, 2018, 4:34 p.m. |
OK |
GNU C++17 |
TESTS |
251 |
327 |
39833600 |
|
2500 |
44596323 |
chengjian |
B |
Oct. 20, 2018, 12:37 p.m. |
OK |
GNU C++17 |
TESTS |
251 |
327 |
69529600 |
|
2500 |
44619386 |
icebound |
B |
Oct. 21, 2018, 5:14 a.m. |
OK |
GNU C++17 |
TESTS |
251 |
327 |
107827200 |
|
2500 |
45298793 |
Shadow377 |
B |
Nov. 4, 2018, 7:30 p.m. |
OK |
Go |
TESTS |
251 |
733 |
18841600 |
|
2500 |
51446504 |
mashinist |
B |
March 18, 2019, 12:45 p.m. |
OK |
Java 8 |
TESTS |
251 |
1933 |
151756800 |
|
2500 |
45127064 |
aabdelzaher |
B |
Oct. 31, 2018, 8:34 a.m. |
OK |
Java 8 |
TESTS |
251 |
1965 |
258969600 |
|
2500 |
45075186 |
aabdelzaher |
B |
Oct. 29, 2018, 11:14 p.m. |
OK |
Java 8 |
TESTS |
251 |
2214 |
258969600 |
|
2500 |
44701908 |
shiyan12 |
B |
Oct. 22, 2018, 3:08 p.m. |
OK |
MS C++ |
TESTS |
251 |
514 |
99430400 |
|
2500 |
44702041 |
shiyan12 |
B |
Oct. 22, 2018, 3:11 p.m. |
OK |
MS C++ |
TESTS |
251 |
561 |
99430400 |
|
2500 |
44620544 |
shiyan12 |
B |
Oct. 21, 2018, 6:03 a.m. |
OK |
MS C++ |
TESTS |
251 |
561 |
99430400 |
|
2500 |
44702150 |
shiyan12 |
B |
Oct. 22, 2018, 3:14 p.m. |
OK |
MS C++ |
TESTS |
251 |
592 |
99430400 |
|
2500 |
44589238 |
lucyanna2018 ShadowSong |
B |
Oct. 20, 2018, 10:33 a.m. |
OK |
MS C++ |
TESTS |
251 |
1497 |
112640000 |
|
2500 |
44721993 |
shiyan12 |
B |
Oct. 23, 2018, 5:50 a.m. |
OK |
MS C++ |
TESTS |
251 |
1560 |
99430400 |
|
2500 |
44713527 |
qb2008 |
B |
Oct. 22, 2018, 8:05 p.m. |
OK |
PyPy 3 |
TESTS |
251 |
2386 |
160358400 |
|
2500 |
44577783 |
|
B |
Oct. 20, 2018, 7:34 a.m. |
OK |
Unknown |
TESTS |
0 |
0 |
0 |
|
2500 |
44577765 |
|
B |
Oct. 20, 2018, 7:34 a.m. |
OK |
Unknown |
TESTS |
0 |
0 |
0 |
|
2500 |
44577762 |
|
B |
Oct. 20, 2018, 7:34 a.m. |
OK |
Unknown |
TESTS |
0 |
0 |
0 |
|
2500 |
44577703 |
|
B |
Oct. 20, 2018, 7:34 a.m. |
OK |
Unknown |
TESTS |
0 |
0 |
0 |
|
2500 |
44577672 |
|
B |
Oct. 20, 2018, 7:34 a.m. |
OK |
Unknown |
TESTS |
0 |
0 |
0 |
|
2500 |
44577538 |
|
B |
Oct. 20, 2018, 7:33 a.m. |
OK |
Unknown |
TESTS |
0 |
0 |
0 |
|
2500 |
44577406 |
|
B |
Oct. 20, 2018, 7:33 a.m. |
OK |
Unknown |
TESTS |
0 |
0 |
0 |
|
2500 |
44577293 |
|
B |
Oct. 20, 2018, 7:33 a.m. |
OK |
Unknown |
TESTS |
0 |
0 |
0 |
|
2500 |
remove filters
Back to search problems