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 |
---|---|---|---|---|---|---|
229 | Codeforces Round 142 (Div. 1) | FINISHED | False | 7500 | 382717799 | Oct. 1, 2012, 3:30 p.m. |
Solved$ |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
---|---|---|---|---|---|---|
( 1626 ) | C | Triangles | PROGRAMMING | combinatorics graphs math | 2100 |
B'Alice and Bob don 't play games anymore. Now they study properties of all sorts of graphs together. Alice invented the following task: she takes a complete undirected graph with n vertices, chooses some m edges and keeps them. Bob gets the remaining edges. Alice and Bob are fond of "triangles" in graphs, that is, cycles of length 3. That 's why they wonder: what total number of triangles is there in the two graphs formed by Alice and Bob 's edges, correspondingly? The first line contains two space-separated integers n and m (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89n xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89106, xe2 x80 x890 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89m xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89106) -- the number of vertices in the initial complete graph and the number of edges in Alice 's graph, correspondingly. Then m lines follow: the i-th line contains two space-separated integers ai, 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 numbers of the two vertices connected by the i-th edge in Alice 's graph. It is guaranteed that Alice 's graph contains no multiple edges and self-loops. It is guaranteed that the initial complete graph also contains no multiple edges and self-loops. Consider the graph vertices to be indexed in some way from 1 to n. Print a single number -- the total number of cycles of length 3 in Alice and Bob 's graphs together. Please, do not use the %lld specifier to read or write 64-bit integers in xd0 xa1++. It is advised to use the cin, cout streams or the %I64d specifier. In the first sample Alice has 2 triangles: (1, 2, 3) and (2, 3, 4). Bob 's graph has only 1 triangle : (1, 4, 5). That 's why the two graphs in total contain 3 triangles. In the second sample Alice 's graph has only one triangle: (1, 2, 3). Bob 's graph has three triangles: (1, 4, 5), (2, 4, 5) and (3, 4, 5). In this case the answer to the problem is 4.'... |
Codeforces Round #142 Problem Analysis |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
---|---|---|---|---|---|---|---|---|---|---|---|
2310669 | AleksanderBalobanov | C | Oct. 7, 2012, 10:06 a.m. | OK | Delphi | TESTS | 52 | 296 | 4096000 | 2100 | |
2284995 | Golovanov399 | C | Oct. 1, 2012, 5:24 p.m. | OK | Delphi | TESTS | 52 | 328 | 3993600 | 2100 | |
2353171 | KaiZeR | C | Oct. 12, 2012, 7:15 p.m. | OK | Delphi | TESTS | 52 | 328 | 4096000 | 2100 | |
2300493 | romanychda | C | Oct. 4, 2012, 7:04 p.m. | OK | Delphi | TESTS | 52 | 406 | 4096000 | 2100 | |
2295802 | Oryshych | C | Oct. 3, 2012, 1:43 p.m. | OK | Delphi | TESTS | 52 | 468 | 7987200 | 2100 | |
2283729 | vlad107 | C | Oct. 1, 2012, 5:02 p.m. | OK | FPC | TESTS | 52 | 484 | 7987200 | 2100 | |
3992531 | Omelianenko | C | June 29, 2013, 3:50 p.m. | OK | FPC | TESTS | 52 | 515 | 7987200 | 2100 | |
2287939 | yermak0v | C | Oct. 1, 2012, 9:04 p.m. | OK | FPC | TESTS | 52 | 515 | 7987200 | 2100 | |
2293750 | Berezin | C | Oct. 2, 2012, 7:20 p.m. | OK | FPC | TESTS | 52 | 531 | 7987200 | 2100 | |
2291502 | nhandi | C | Oct. 2, 2012, 11:41 a.m. | OK | FPC | TESTS | 52 | 562 | 3993600 | 2100 | |
3992541 | Omelianenko | C | June 29, 2013, 3:52 p.m. | OK | FPC | TESTS | 52 | 562 | 7987200 | 2100 | |
3992528 | Omelianenko | C | June 29, 2013, 3:50 p.m. | OK | FPC | TESTS | 52 | 562 | 7987200 | 2100 | |
2294559 | zxh809444285 | C | Oct. 3, 2012, 5:23 a.m. | OK | FPC | TESTS | 52 | 578 | 3993600 | 2100 | |
2292608 | mxalbert1996 | C | Oct. 2, 2012, 2:43 p.m. | OK | FPC | TESTS | 52 | 578 | 7987200 | 2100 | |
3992526 | Omelianenko | C | June 29, 2013, 3:49 p.m. | OK | FPC | TESTS | 52 | 578 | 7987200 | 2100 | |
7747377 | behzad.nouri | C | Sept. 11, 2014, 10:19 p.m. | OK | GNU C | TESTS | 52 | 654 | 7987200 | 2100 | |
13227342 | armadillo | C | Sept. 26, 2015, 3:44 a.m. | OK | GNU C | TESTS | 52 | 686 | 3993600 | 2100 | |
2289424 | NoSoul | C | Oct. 2, 2012, 4:51 a.m. | OK | GNU C | TESTS | 52 | 734 | 3993600 | 2100 | |
2281470 | kawatea | C | Oct. 1, 2012, 4:32 p.m. | OK | GNU C | TESTS | 52 | 734 | 3993600 | 2100 | |
2290275 | warrior_c | C | Oct. 2, 2012, 7:23 a.m. | OK | GNU C++ | TESTS | 52 | 125 | 3993600 | 2100 | |
3081206 | __Wa_ff_ | C | Feb. 7, 2013, 2:10 p.m. | OK | GNU C++ | TESTS | 52 | 140 | 3993600 | 2100 | |
2754323 | kizuki | C | Dec. 12, 2012, 11:44 a.m. | OK | GNU C++ | TESTS | 52 | 140 | 3993600 | 2100 | |
2754327 | vjudge5 | C | Dec. 12, 2012, 11:44 a.m. | OK | GNU C++ | TESTS | 52 | 171 | 3993600 | 2100 | |
2306591 | ACMonster | C | Oct. 6, 2012, 12:04 p.m. | OK | GNU C++ | TESTS | 52 | 171 | 3993600 | 2100 | |
19439748 | vjudge1 | C | July 27, 2016, 10:47 a.m. | OK | GNU C++ | TESTS | 52 | 186 | 3788800 | 2100 | |
13178622 | kasumi_utako | C | Sept. 23, 2015, 5:36 a.m. | OK | GNU C++ | TESTS | 52 | 186 | 3993600 | 2100 | |
12786547 | jugal_sahu | C | Aug. 31, 2015, 9:34 a.m. | OK | GNU C++ | TESTS | 52 | 186 | 3993600 | 2100 | |
2290506 | baihacker | C | Oct. 2, 2012, 8 a.m. | OK | GNU C++ | TESTS | 52 | 203 | 8396800 | 2100 | |
40990681 | ReaLNero1 | C | July 31, 2018, 12:07 a.m. | OK | GNU C++ | TESTS | 52 | 218 | 3993600 | 2100 | |
2280023 | savinov | C | Oct. 1, 2012, 4:18 p.m. | OK | GNU C++0x | TESTS | 52 | 203 | 7987200 | 2100 | |
2279142 | MinakoKojima | C | Oct. 1, 2012, 4:10 p.m. | OK | GNU C++0x | TESTS | 52 | 281 | 7987200 | 2100 | |
4115882 | cska63 | C | July 20, 2013, 2:03 p.m. | OK | GNU C++0x | TESTS | 52 | 437 | 3993600 | 2100 | |
6334794 | marat.snowbear | C | April 13, 2014, 2:06 a.m. | OK | GNU C++0x | TESTS | 52 | 466 | 11980800 | 2100 | |
4901444 | FAU.gruen | C | Oct. 26, 2013, 10:03 a.m. | OK | GNU C++0x | TESTS | 52 | 468 | 3993600 | 2100 | |
4112050 | Toxic | C | July 20, 2013, 12:30 p.m. | OK | GNU C++0x | TESTS | 52 | 468 | 3993600 | 2100 | |
2277550 | mengpq | C | Oct. 1, 2012, 3:57 p.m. | OK | GNU C++0x | TESTS | 52 | 484 | 7987200 | 2100 | |
3269413 | EarlOfDitches | C | March 9, 2013, 10:42 a.m. | OK | GNU C++0x | TESTS | 52 | 578 | 3993600 | 2100 | |
2855825 | ArkChar | C | Dec. 30, 2012, 6:52 a.m. | OK | GNU C++0x | TESTS | 52 | 578 | 7987200 | 2100 | |
5598045 | JayYe | C | Jan. 1, 2014, 1 p.m. | OK | GNU C++0x | TESTS | 52 | 592 | 3993600 | 2100 | |
58868358 | rainboy | C | Aug. 15, 2019, 2:17 p.m. | OK | GNU C11 | TESTS | 52 | 590 | 3993600 | 2100 | |
54997882 | SoiMae | C | June 3, 2019, 1:37 a.m. | OK | GNU C++11 | TESTS | 52 | 154 | 3993600 | 2100 | |
12263882 | Might_Guy | C | July 29, 2015, 11:47 a.m. | OK | GNU C++11 | TESTS | 52 | 156 | 5222400 | 2100 | |
15390859 | bciobanu | C | Jan. 15, 2016, 3:02 p.m. | OK | GNU C++11 | TESTS | 52 | 186 | 3788800 | 2100 | |
57969155 | luogu_bot3 | C | July 30, 2019, 4:53 a.m. | OK | GNU C++11 | TESTS | 52 | 186 | 3993600 | 2100 | |
54996331 | SoiMae | C | June 3, 2019, 12:14 a.m. | OK | GNU C++11 | TESTS | 52 | 186 | 3993600 | 2100 | |
54825177 | yyyz04 | C | May 30, 2019, 6:03 a.m. | OK | GNU C++11 | TESTS | 52 | 186 | 3993600 | 2100 | |
57969177 | goodmorning200 | C | July 30, 2019, 4:54 a.m. | OK | GNU C++11 | TESTS | 52 | 186 | 3993600 | 2100 | |
62782744 | Morning_Glory | C | Oct. 17, 2019, 1:21 p.m. | OK | GNU C++11 | TESTS | 52 | 216 | 3788800 | 2100 | |
57840643 | lie_b | C | July 27, 2019, 9:10 a.m. | OK | GNU C++11 | TESTS | 52 | 218 | 3993600 | 2100 | |
11094092 | zxqfl | C | May 14, 2015, 1:16 a.m. | OK | GNU C++11 | TESTS | 52 | 248 | 3993600 | 2100 | |
30897099 | LiChenKoh | C | Oct. 1, 2017, 3 a.m. | OK | GNU C++14 | TESTS | 52 | 248 | 7987200 | 2100 | |
30861718 | mengxiang000 | C | Sept. 30, 2017, 10:07 a.m. | OK | GNU C++14 | TESTS | 52 | 686 | 11980800 | 2100 | |
58199476 | vjudge2 | C | Aug. 3, 2019, 3:09 a.m. | OK | GNU C++14 | TESTS | 52 | 840 | 3993600 | 2100 | |
45282078 | zuhiul | C | Nov. 4, 2018, 2:21 p.m. | OK | GNU C++14 | TESTS | 52 | 842 | 3993600 | 2100 | |
66403325 | Heart_Blue | C | Dec. 6, 2019, 12:56 p.m. | OK | GNU C++14 | TESTS | 52 | 872 | 3993600 | 2100 | |
59591679 | threepebbles | C | Aug. 27, 2019, 8:58 p.m. | OK | GNU C++14 | TESTS | 52 | 872 | 3993600 | 2100 | |
56982956 | Kerim.K | C | July 13, 2019, 2:40 p.m. | OK | GNU C++14 | TESTS | 52 | 872 | 3993600 | 2100 | |
33856926 | Flash-boy | C | Jan. 2, 2018, 2:27 a.m. | OK | GNU C++14 | TESTS | 52 | 872 | 5939200 | 2100 | |
23615853 | ICDI | C | Jan. 7, 2017, 3:19 a.m. | OK | GNU C++14 | TESTS | 52 | 872 | 5939200 | 2100 | |
42256537 | Emiso | C | Aug. 29, 2018, 9:56 p.m. | OK | GNU C++14 | TESTS | 52 | 904 | 3993600 | 2100 | |
46051519 | vjudge2 | C | Nov. 22, 2018, 7:47 a.m. | OK | GNU C++17 | TESTS | 52 | 622 | 20992000 | 2100 | |
50393282 | ruo | C | Feb. 23, 2019, 2:46 p.m. | OK | GNU C++17 | TESTS | 52 | 840 | 3993600 | 2100 | |
53731685 | DrSwad | C | May 4, 2019, 7:32 a.m. | OK | GNU C++17 | TESTS | 52 | 842 | 3993600 | 2100 | |
59626788 | acka1357 | C | Aug. 28, 2019, 4:18 p.m. | OK | GNU C++17 | TESTS | 52 | 872 | 3993600 | 2100 | |
47611561 | 1664988610 | C | Dec. 28, 2018, 8:24 a.m. | OK | GNU C++17 | TESTS | 52 | 904 | 7987200 | 2100 | |
56859320 | Oleksandr228 | C | July 11, 2019, 8:39 p.m. | OK | GNU C++17 | TESTS | 52 | 904 | 7987200 | 2100 | |
58312018 | vjudge1 | C | Aug. 5, 2019, 12:26 a.m. | OK | GNU C++17 | TESTS | 52 | 934 | 7987200 | 2100 | |
40514002 | Martin53 | C | July 18, 2018, 12:29 p.m. | OK | GNU C++17 | TESTS | 52 | 966 | 3993600 | 2100 | |
56246210 | ogo | C | June 28, 2019, 9:21 p.m. | OK | GNU C++17 | TESTS | 52 | 966 | 3993600 | 2100 | |
47704256 | dmkozyrev | C | Dec. 29, 2018, 7 p.m. | OK | GNU C++17 | TESTS | 52 | 966 | 11980800 | 2100 | |
2471998 | bsrkaditya | C | Oct. 30, 2012, 7:28 p.m. | OK | Java 6 | TESTS | 52 | 375 | 0 | 2100 | |
2275545 | Egor | C | Oct. 1, 2012, 3:44 p.m. | OK | Java 6 | TESTS | 52 | 421 | 0 | 2100 | |
2289499 | Azat_Yusupov | C | Oct. 2, 2012, 5:04 a.m. | OK | Java 6 | TESTS | 52 | 796 | 102400 | 2100 | |
2287375 | AlexErofeev | C | Oct. 1, 2012, 7:43 p.m. | OK | Java 6 | TESTS | 52 | 812 | 102400 | 2100 | |
2384068 | Wolfy | C | Oct. 18, 2012, 1:54 p.m. | OK | Java 6 | TESTS | 52 | 828 | 102400 | 2100 | |
2287363 | AlexErofeev | C | Oct. 1, 2012, 7:42 p.m. | OK | Java 6 | TESTS | 52 | 828 | 102400 | 2100 | |
2284150 | EriKKo | C | Oct. 1, 2012, 5:07 p.m. | OK | Java 6 | TESTS | 52 | 828 | 102400 | 2100 | |
2283481 | Aksenov239 | C | Oct. 1, 2012, 4:59 p.m. | OK | Java 6 | TESTS | 52 | 843 | 0 | 2100 | |
2580895 | pschuprikov | C | Nov. 17, 2012, 8:12 p.m. | OK | Java 6 | TESTS | 52 | 843 | 13926400 | 2100 | |
2285793 | antonkov | C | Oct. 1, 2012, 5:32 p.m. | OK | Java 6 | TESTS | 52 | 859 | 0 | 2100 | |
2300634 | MinakoKojima | C | Oct. 4, 2012, 8:07 p.m. | OK | Java 7 | TESTS | 52 | 343 | 0 | 2100 | |
4477043 | hama-du | C | Sept. 15, 2013, 11:41 a.m. | OK | Java 7 | TESTS | 52 | 374 | 0 | 2100 | |
2277376 | oimaster | C | Oct. 1, 2012, 3:56 p.m. | OK | Java 7 | TESTS | 52 | 375 | 0 | 2100 | |
2279615 | jiangzhijie | C | Oct. 1, 2012, 4:14 p.m. | OK | Java 7 | TESTS | 52 | 390 | 0 | 2100 | |
2298053 | trunghieu11 | C | Oct. 4, 2012, 7:16 a.m. | OK | Java 7 | TESTS | 52 | 421 | 0 | 2100 | |
6254786 | hama-du | C | April 4, 2014, 12:16 a.m. | OK | Java 7 | TESTS | 52 | 436 | 0 | 2100 | |
2300590 | MinakoKojima | C | Oct. 4, 2012, 7:47 p.m. | OK | Java 7 | TESTS | 52 | 437 | 0 | 2100 | |
2296556 | LovelyPenguin | C | Oct. 3, 2012, 5:06 p.m. | OK | Java 7 | TESTS | 52 | 812 | 0 | 2100 | |
2287383 | AlexErofeev | C | Oct. 1, 2012, 7:43 p.m. | OK | Java 7 | TESTS | 52 | 812 | 204800 | 2100 | |
2352188 | jjd5 | C | Oct. 12, 2012, 2:45 p.m. | OK | Java 7 | TESTS | 52 | 859 | 0 | 2100 | |
58868418 | Dukkha | C | Aug. 15, 2019, 2:18 p.m. | OK | Java 8 | TESTS | 52 | 404 | 0 | 2100 | |
61807025 | Ahmad | C | Oct. 3, 2019, 10:24 p.m. | OK | Java 8 | TESTS | 52 | 498 | 0 | 2100 | |
46887311 | flyman3046 | C | Dec. 11, 2018, 2:25 a.m. | OK | Java 8 | TESTS | 52 | 998 | 0 | 2100 | |
19969011 | marcose18 | C | Aug. 19, 2016, 6:09 p.m. | OK | Java 8 | TESTS | 52 | 1058 | 20582400 | 2100 | |
56862476 | 7dan | C | July 12, 2019, 12:18 a.m. | OK | Java 8 | TESTS | 52 | 1060 | 6348800 | 2100 | |
10210104 | AlexFetisov | C | March 8, 2015, 4:39 p.m. | OK | Java 8 | TESTS | 52 | 1122 | 0 | 2100 | |
31814275 | G.Mohamed | C | Oct. 27, 2017, 5:32 p.m. | OK | Java 8 | TESTS | 52 | 1152 | 0 | 2100 | |
11094166 | jeffrey.xiao | C | May 14, 2015, 1:39 a.m. | OK | Java 8 | TESTS | 52 | 1152 | 12595200 | 2100 | |
11943788 | santa_calus | C | July 6, 2015, 7:35 a.m. | OK | Java 8 | TESTS | 52 | 1214 | 0 | 2100 | |
11943777 | santa_calus | C | July 6, 2015, 7:33 a.m. | OK | Java 8 | TESTS | 52 | 1216 | 0 | 2100 | |
2279338 | fiver | C | Oct. 1, 2012, 4:12 p.m. | OK | Mono C# | TESTS | 52 | 1625 | 10547200 | 2100 | |
2278866 | zaq1xsw2tktk | C | Oct. 1, 2012, 4:08 p.m. | OK | Mono C# | TESTS | 52 | 1734 | 9932800 | 2100 | |
3588071 | fatsheep_LF | C | April 21, 2013, 7:27 p.m. | OK | MS C++ | TESTS | 52 | 468 | 3993600 | 2100 | |
3060873 | caustique | C | Feb. 2, 2013, 12:41 a.m. | OK | MS C++ | TESTS | 52 | 483 | 3993600 | 2100 | |
3562470 | ideacos0 | C | April 19, 2013, 3:25 a.m. | OK | MS C++ | TESTS | 52 | 484 | 3993600 | 2100 | |
2289823 | skyhll | C | Oct. 2, 2012, 6:10 a.m. | OK | MS C++ | TESTS | 52 | 484 | 4096000 | 2100 | |
2297383 | 1dayac | C | Oct. 4, 2012, 1:29 a.m. | OK | MS C++ | TESTS | 52 | 500 | 3993600 | 2100 | |
2292399 | AlexanderL | C | Oct. 2, 2012, 2:08 p.m. | OK | MS C++ | TESTS | 52 | 500 | 3993600 | 2100 | |
2276975 | XilinX | C | Oct. 1, 2012, 3:53 p.m. | OK | MS C++ | TESTS | 52 | 500 | 3993600 | 2100 | |
2274909 | bor.is | C | Oct. 1, 2012, 3:41 p.m. | OK | MS C++ | TESTS | 52 | 500 | 3993600 | 2100 | |
2320582 | acrux | C | Oct. 8, 2012, 2:38 a.m. | OK | MS C++ | TESTS | 52 | 500 | 3993600 | 2100 | |
2379775 | Reshetnikov_Ivan | C | Oct. 17, 2012, 1:52 p.m. | OK | MS C++ | TESTS | 52 | 500 | 3993600 | 2100 |
Back to search problems