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 |
398
|
Codeforces Round 233 (Div. 1) |
FINISHED |
False |
7200 |
338135399 |
March 1, 2014, 3:30 p.m. |
Problems
B'User ainta decided to make a new instant messenger called "aintalk". With aintalk, each user can chat with other people. User ainta made the prototype of some functions to implement this thing. Because the messenger is being tested by some users numbered from 1 to n, there is no register method. This means, at the beginning, some users may be online, and some users may have friends. User ainta is going to make these functions, but before making the messenger public, he wants to know whether he is correct. Help ainta verify his code. The first line contains three space-separated integers n, m and q (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89n xe2 x80 x89 xe2 x89 xa4 xe2 x80 x8950000; 1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89m xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89150000; 1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89q xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89250000) -- the number of users, the number of pairs of friends, and the number of queries. The second line contains an integer o (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89o xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89n) -- the number of online users at the beginning. The third line contains o space-separated integers x1, xe2 x80 x89x2, xe2 x80 x89..., xe2 x80 x89xo (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89xi xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89n) -- the ids of the online users. It is guaranteed that these values are distinct. Each of the next m lines contains two space-separated integers ai and bi (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89ai, xe2 x80 x89bi xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89n; ai xe2 x80 x89 xe2 x89 xa0 xe2 x80 x89bi) -- the ids of two users who are friends at the beginning. It is guaranteed there are no multiple friendship given in the input. Note that the friendship is bidirectional. Next q lines describe the q queries in the format: For each count_online_friends(u) query, print the required answer in a single line. '... |
Tutorials
Submissions
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
6821085 |
SanSiroWaltz |
D |
June 5, 2014, 1:24 p.m. |
OK |
FPC |
TESTS |
90 |
1575 |
13414400 |
|
|
42012198 |
Scut82 |
D |
Aug. 24, 2018, 2:16 a.m. |
OK |
GNU C++ |
TESTS |
90 |
139 |
4198400 |
|
|
42107225 |
Scut82 |
D |
Aug. 26, 2018, 2:17 a.m. |
OK |
GNU C++ |
TESTS |
90 |
139 |
14336000 |
|
|
6255967 |
JasonHsiao |
D |
April 4, 2014, 6:06 a.m. |
OK |
GNU C++ |
TESTS |
90 |
171 |
4710400 |
|
|
5946477 |
mislav_bradac |
D |
March 5, 2014, 10:03 p.m. |
OK |
GNU C++ |
TESTS |
90 |
187 |
4300800 |
|
|
5946459 |
mislav_bradac |
D |
March 5, 2014, 9:58 p.m. |
OK |
GNU C++ |
TESTS |
90 |
187 |
4915200 |
|
|
5992733 |
yyf |
D |
March 11, 2014, 4:40 a.m. |
OK |
GNU C++ |
TESTS |
90 |
202 |
4198400 |
|
|
40988990 |
ReaLNero1 |
D |
July 30, 2018, 10:31 p.m. |
OK |
GNU C++ |
TESTS |
90 |
202 |
4710400 |
|
|
10914981 |
Gyosh |
D |
April 28, 2015, 4:11 a.m. |
OK |
GNU C++ |
TESTS |
90 |
202 |
6348800 |
|
|
10910352 |
shuuna |
D |
April 27, 2015, 2:55 p.m. |
OK |
GNU C++ |
TESTS |
90 |
202 |
6451200 |
|
|
19973931 |
RNS3 |
D |
Aug. 20, 2016, 2:43 a.m. |
OK |
GNU C++ |
TESTS |
90 |
202 |
6963200 |
|
|
10038955 |
FizzyDavid |
D |
Feb. 27, 2015, 12:57 a.m. |
OK |
GNU C++0x |
TESTS |
90 |
187 |
4096000 |
|
|
10031091 |
FizzyDavid |
D |
Feb. 26, 2015, 10:48 a.m. |
OK |
GNU C++0x |
TESTS |
90 |
202 |
4096000 |
|
|
10033099 |
ohweonfire |
D |
Feb. 26, 2015, 1:55 p.m. |
OK |
GNU C++0x |
TESTS |
90 |
218 |
4198400 |
|
|
10201177 |
FizzyDavid |
D |
March 8, 2015, 6:33 a.m. |
OK |
GNU C++0x |
TESTS |
90 |
312 |
13414400 |
|
|
5928980 |
kennethsnow |
D |
March 5, 2014, 6:25 a.m. |
OK |
GNU C++0x |
TESTS |
90 |
530 |
18432000 |
|
|
9822541 |
DiegoCR |
D |
Feb. 14, 2015, 2:34 a.m. |
OK |
GNU C++0x |
TESTS |
90 |
639 |
24268800 |
|
|
5947994 |
diego_v1 |
D |
March 6, 2014, 4:43 a.m. |
OK |
GNU C++0x |
TESTS |
90 |
670 |
13721600 |
|
|
5972227 |
CyberZHG |
D |
March 10, 2014, 2:51 a.m. |
OK |
GNU C++0x |
TESTS |
90 |
686 |
9420800 |
|
|
5928919 |
kennethsnow |
D |
March 5, 2014, 6:10 a.m. |
OK |
GNU C++0x |
TESTS |
90 |
733 |
31232000 |
|
|
9445997 |
aliasadiiii |
D |
Jan. 16, 2015, 7:37 p.m. |
OK |
GNU C++0x |
TESTS |
90 |
748 |
9216000 |
|
|
55232334 |
SoiMae |
D |
June 7, 2019, 6:27 a.m. |
OK |
GNU C++11 |
TESTS |
90 |
124 |
4198400 |
|
|
55232304 |
SoiMae |
D |
June 7, 2019, 6:26 a.m. |
OK |
GNU C++11 |
TESTS |
90 |
124 |
4198400 |
|
|
15983409 |
Bekmyrat.A |
D |
Feb. 13, 2016, 7:51 a.m. |
OK |
GNU C++11 |
TESTS |
90 |
187 |
3993600 |
|
|
60997546 |
tyf0530 |
D |
Sept. 21, 2019, 8:58 a.m. |
OK |
GNU C++11 |
TESTS |
90 |
187 |
7987200 |
|
|
11119410 |
tonkosi |
D |
May 16, 2015, 5:18 p.m. |
OK |
GNU C++11 |
TESTS |
90 |
202 |
4608000 |
|
|
11119384 |
IvL |
D |
May 16, 2015, 5:14 p.m. |
OK |
GNU C++11 |
TESTS |
90 |
217 |
3993600 |
|
|
11119365 |
DBradac |
D |
May 16, 2015, 5:13 p.m. |
OK |
GNU C++11 |
TESTS |
90 |
218 |
4198400 |
|
|
11119326 |
Mihaell |
D |
May 16, 2015, 5:10 p.m. |
OK |
GNU C++11 |
TESTS |
90 |
218 |
4403200 |
|
|
15834735 |
tom |
D |
Feb. 5, 2016, 11:32 p.m. |
OK |
GNU C++11 |
TESTS |
90 |
249 |
4198400 |
|
|
25798515 |
vjudge2 |
D |
March 25, 2017, 1:16 p.m. |
OK |
GNU C++11 |
TESTS |
90 |
249 |
6348800 |
|
|
55232755 |
PK_PRANTO |
D |
June 7, 2019, 6:40 a.m. |
OK |
GNU C++14 |
TESTS |
90 |
218 |
4198400 |
|
|
29718109 |
Dalgerok |
D |
Aug. 23, 2017, 9:59 p.m. |
OK |
GNU C++14 |
TESTS |
90 |
218 |
4198400 |
|
|
55232587 |
PK_PRANTO |
D |
June 7, 2019, 6:35 a.m. |
OK |
GNU C++14 |
TESTS |
90 |
249 |
4198400 |
|
|
25125475 |
jonathanirvings |
D |
March 1, 2017, 2:12 p.m. |
OK |
GNU C++14 |
TESTS |
90 |
249 |
6041600 |
|
|
32638514 |
MAGRANT |
D |
Nov. 25, 2017, 6:29 a.m. |
OK |
GNU C++14 |
TESTS |
90 |
265 |
6451200 |
|
|
29718091 |
Dalgerok |
D |
Aug. 23, 2017, 9:58 p.m. |
OK |
GNU C++14 |
TESTS |
90 |
280 |
4198400 |
|
|
34576620 |
cnnfls_csy |
D |
Jan. 26, 2018, 1:20 p.m. |
OK |
GNU C++14 |
TESTS |
90 |
280 |
6963200 |
|
|
29853246 |
vjudge5 |
D |
Aug. 28, 2017, 7:34 p.m. |
OK |
GNU C++14 |
TESTS |
90 |
280 |
13312000 |
|
|
55232730 |
PK_PRANTO |
D |
June 7, 2019, 6:39 a.m. |
OK |
GNU C++14 |
TESTS |
90 |
296 |
4198400 |
|
|
55232683 |
PK_PRANTO |
D |
June 7, 2019, 6:38 a.m. |
OK |
GNU C++14 |
TESTS |
90 |
296 |
4198400 |
|
|
69553711 |
AlexLuchianov |
D |
Jan. 26, 2020, 7:44 a.m. |
OK |
GNU C++17 |
TESTS |
90 |
405 |
18227200 |
|
|
58409291 |
vjudge1 |
D |
Aug. 7, 2019, 12:09 a.m. |
OK |
GNU C++17 |
TESTS |
90 |
529 |
18227200 |
|
|
58409257 |
vjudge1 |
D |
Aug. 7, 2019, 12:07 a.m. |
OK |
GNU C++17 |
TESTS |
90 |
561 |
18329600 |
|
|
65059512 |
AliShahali1382 |
D |
Nov. 15, 2019, 4:23 p.m. |
OK |
GNU C++17 |
TESTS |
90 |
716 |
9728000 |
|
|
58409252 |
vjudge2 |
D |
Aug. 7, 2019, 12:07 a.m. |
OK |
GNU C++17 |
TESTS |
90 |
732 |
18329600 |
|
|
58409260 |
vjudge2 |
D |
Aug. 7, 2019, 12:08 a.m. |
OK |
GNU C++17 |
TESTS |
90 |
733 |
18329600 |
|
|
50505421 |
redotter |
D |
Feb. 25, 2019, 7:24 p.m. |
OK |
GNU C++17 |
TESTS |
90 |
795 |
19353600 |
|
|
50291839 |
redotter |
D |
Feb. 21, 2019, 5:53 p.m. |
OK |
GNU C++17 |
TESTS |
90 |
811 |
19353600 |
|
|
65917714 |
WizWalnut |
D |
Nov. 28, 2019, 3:13 p.m. |
OK |
GNU C++17 |
TESTS |
90 |
857 |
147046400 |
|
|
50291870 |
redotter |
D |
Feb. 21, 2019, 5:54 p.m. |
OK |
GNU C++17 |
TESTS |
90 |
904 |
19353600 |
|
|
6092249 |
Sabelan |
D |
March 20, 2014, 3:15 p.m. |
OK |
Java 7 |
TESTS |
90 |
1372 |
13926400 |
|
|
6092234 |
Sabelan |
D |
March 20, 2014, 3:13 p.m. |
OK |
Java 7 |
TESTS |
90 |
1465 |
14028800 |
|
|
7888699 |
PlayLikeNeverB4 |
D |
Sept. 20, 2014, 10:33 p.m. |
OK |
Java 7 |
TESTS |
90 |
1528 |
75980800 |
|
|
7888702 |
PlayLikeNeverB4 |
D |
Sept. 20, 2014, 10:34 p.m. |
OK |
Java 7 |
TESTS |
90 |
1731 |
76083200 |
|
|
7888649 |
PlayLikeNeverB4 |
D |
Sept. 20, 2014, 10:24 p.m. |
OK |
Java 7 |
TESTS |
90 |
1856 |
75980800 |
|
|
19758377 |
stacy992 |
D |
Aug. 10, 2016, 4:36 a.m. |
OK |
Java 8 |
TESTS |
90 |
1465 |
57651200 |
|
|
19758311 |
mkirsche |
D |
Aug. 10, 2016, 4:30 a.m. |
OK |
Java 8 |
TESTS |
90 |
1653 |
64512000 |
|
|
5992751 |
yyf |
D |
March 11, 2014, 4:43 a.m. |
OK |
MS C++ |
TESTS |
90 |
202 |
3993600 |
|
|
5930325 |
_TMB_ |
D |
March 5, 2014, 10:09 a.m. |
OK |
MS C++ |
TESTS |
90 |
904 |
10752000 |
|
|
5928075 |
blueseen |
D |
March 5, 2014, 3:32 a.m. |
OK |
MS C++ |
TESTS |
90 |
1247 |
79769600 |
|
|
5929633 |
caustique |
D |
March 5, 2014, 8:28 a.m. |
OK |
MS C++ |
TESTS |
90 |
1934 |
41267200 |
|
|
5948922 |
RiKang |
D |
March 6, 2014, 7:45 a.m. |
OK |
MS C++ |
TESTS |
90 |
1965 |
195072000 |
|
|
remove filters
Back to search problems