Codeforces Beta Round 97 (Div. 1)

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
135 Codeforces Beta Round 97 (Div. 1) FINISHED False 7200 413736863 Dec. 9, 2011, 3:05 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 2391 ) B Rectangle and Square PROGRAMMING brute force geometry math 1600

B'Little Petya very much likes rectangles and especially squares. Recently he has received 8 points on the plane as a gift from his mother. The points are pairwise distinct. Petya decided to split them into two sets each containing 4 points so that the points from the first set lay at the vertexes of some square and the points from the second set lay at the vertexes of a rectangle. Each point of initial 8 should belong to exactly one set. It is acceptable for a rectangle from the second set was also a square. If there are several partitions, Petya will be satisfied by any of them. Help him find such partition. Note that the rectangle and the square from the partition should have non-zero areas. The sides of the figures do not have to be parallel to the coordinate axes, though it might be the case. You are given 8 pairs of integers, a pair per line -- the coordinates of the points Petya has. The absolute value of all coordinates does not exceed 104. It is guaranteed that no two points coincide. Print in the first output line "YES" (without the quotes), if the desired partition exists. In the second line output 4 space-separated numbers -- point indexes from the input, which lie at the vertexes of the square. The points are numbered starting from 1. The numbers can be printed in any order. In the third line print the indexes of points lying at the vertexes of a rectangle in the similar format. All printed numbers should be pairwise distinct. If the required partition does not exist, the first line should contain the word "NO" (without the quotes), after which no output is needed. Pay attention to the third example: the figures do not necessarily have to be parallel to the coordinate axes.'...

Tutorials

Codeforces Beta Round #97: editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
2864168 Misha100896 B Jan. 1, 2013, 3:57 p.m. OK Delphi TESTS 222 15 0 1600
3067545 Mosyagin B Feb. 3, 2013, 3:21 p.m. OK Delphi TESTS 222 15 102400 1600
984814 bidzilya B Dec. 25, 2011, 7:31 a.m. OK Delphi TESTS 222 30 819200 1600
947203 Depool B Dec. 9, 2011, 9:15 p.m. OK Delphi TESTS 222 30 921600 1600
1355269 alexander-nsk94 B March 13, 2012, 3:28 p.m. OK Delphi TESTS 222 30 921600 1600
944960 winterwolf94 B Dec. 9, 2011, 4:32 p.m. OK Delphi TESTS 222 30 921600 1600
941707 Spumote B Dec. 9, 2011, 3:43 p.m. OK Delphi TESTS 222 30 921600 1600
947329 DeathCoil B Dec. 9, 2011, 9:31 p.m. OK Delphi TESTS 222 30 921600 1600
1421833 AleksanderBalobanov B March 27, 2012, 7:11 a.m. OK Delphi TESTS 222 30 1024000 1600
949585 Quercitron B Dec. 10, 2011, 11:54 a.m. OK Delphi TESTS 222 50 921600 1600
3016581 Alex_2oo8 B Jan. 27, 2013, 2:20 p.m. OK FPC TESTS 222 15 102400 1600
4272371 yubaby B Aug. 13, 2013, 7:46 a.m. OK FPC TESTS 222 30 0 1600
4272336 glky13 B Aug. 13, 2013, 7:39 a.m. OK FPC TESTS 222 30 0 1600
4272315 aaaypq B Aug. 13, 2013, 7:36 a.m. OK FPC TESTS 222 30 0 1600
2085941 ATM_oTTo B Sept. 1, 2012, 5:57 a.m. OK FPC TESTS 222 30 614400 1600
2086482 woshishui--- B Sept. 1, 2012, 8:18 a.m. OK FPC TESTS 222 30 614400 1600
2085378 yangzongshuai B Sept. 1, 2012, 2:48 a.m. OK FPC TESTS 222 30 614400 1600
1713950 scorpion B May 24, 2012, 3:29 p.m. OK FPC TESTS 222 30 1024000 1600
1314570 object022 B March 9, 2012, 6:53 a.m. OK FPC TESTS 222 30 1024000 1600
1157620 Furko B Feb. 8, 2012, 12:53 p.m. OK FPC TESTS 222 30 1024000 1600
994214 kira B Jan. 1, 2012, 6:38 p.m. OK GNU C TESTS 222 30 1331200 1600
950358 BII B Dec. 10, 2011, 5:36 p.m. OK GNU C TESTS 222 30 1331200 1600
947505 LayCurse B Dec. 9, 2011, 10:08 p.m. OK GNU C TESTS 222 30 1331200 1600
4925777 alculquicondor B Oct. 28, 2013, 10:40 p.m. OK GNU C++ TESTS 222 15 0 1600
3902870 SeyedParsa B June 15, 2013, 8:26 p.m. OK GNU C++ TESTS 222 15 0 1600
3470631 _Vadim_ B April 3, 2013, 7:48 p.m. OK GNU C++ TESTS 222 15 0 1600
3134060 H3X B Feb. 15, 2013, 6:05 p.m. OK GNU C++ TESTS 222 15 0 1600
3073548 zheh12 B Feb. 5, 2013, 7:20 a.m. OK GNU C++ TESTS 222 15 0 1600
2861402 Hachiikung B Dec. 31, 2012, 2:32 p.m. OK GNU C++ TESTS 222 15 0 1600
2860273 hogloid B Dec. 31, 2012, 7:19 a.m. OK GNU C++ TESTS 222 15 0 1600
3198968 FreezingCool B Feb. 26, 2013, 1:33 p.m. OK GNU C++ TESTS 222 15 102400 1600
4007113 Wasted B July 3, 2013, 3:06 p.m. OK GNU C++ TESTS 222 15 102400 1600
3294871 amanjain110893 B March 12, 2013, 1:36 p.m. OK GNU C++ TESTS 222 15 102400 1600
4916985 Orfest B Oct. 27, 2013, 8:15 p.m. OK GNU C++0x TESTS 222 15 0 1600
3804996 savinov B May 31, 2013, 2:54 a.m. OK GNU C++0x TESTS 222 15 102400 1600
8062207 Gullesnuffs B Oct. 2, 2014, 6:19 p.m. OK GNU C++0x TESTS 222 30 0 1600
7737309 Pimpom B Sept. 10, 2014, 7:19 p.m. OK GNU C++0x TESTS 222 30 0 1600
7543767 saichandu6 B Aug. 21, 2014, 1:08 p.m. OK GNU C++0x TESTS 222 30 0 1600
1528101 jiangzhijie B April 13, 2012, 11:25 a.m. OK GNU C++0x TESTS 222 30 1433600 1600
1046451 stan B Jan. 15, 2012, 11:48 a.m. OK GNU C++0x TESTS 222 30 1433600 1600
964852 bigsleep B Dec. 17, 2011, 4:08 a.m. OK GNU C++0x TESTS 222 30 1433600 1600
950669 mjf B Dec. 10, 2011, 9:49 p.m. OK GNU C++0x TESTS 222 30 1433600 1600
947919 Jing B Dec. 10, 2011, 1:01 a.m. OK GNU C++0x TESTS 222 30 1433600 1600
58970820 rainboy B Aug. 17, 2019, 8:18 p.m. OK GNU C11 TESTS 222 62 0 1600
19281359 giwoo123 B July 20, 2016, 1:20 p.m. OK GNU C++11 TESTS 222 30 0 1600
16702662 victoreis B March 13, 2016, 6:49 p.m. OK GNU C++11 TESTS 222 30 0 1600
16349165 arnabsamanta B Feb. 26, 2016, 3:07 p.m. OK GNU C++11 TESTS 222 30 0 1600
16306555 apoorv_kulsh B Feb. 24, 2016, 10:04 a.m. OK GNU C++11 TESTS 222 30 0 1600
15985517 OmarHashim B Feb. 13, 2016, 10:28 a.m. OK GNU C++11 TESTS 222 30 0 1600
15850772 Krietall0 B Feb. 6, 2016, 11 p.m. OK GNU C++11 TESTS 222 30 0 1600
15778287 What_Ever B Feb. 3, 2016, 10:17 p.m. OK GNU C++11 TESTS 222 30 0 1600
15309531 joisino B Jan. 12, 2016, 8:33 a.m. OK GNU C++11 TESTS 222 30 0 1600
15094463 alex700 B Dec. 30, 2015, 9:02 a.m. OK GNU C++11 TESTS 222 30 0 1600
29531048 TadijaSebez B Aug. 17, 2017, 4:57 p.m. OK GNU C++11 TESTS 222 30 0 1600
26884157 RamiZk B May 5, 2017, 3:37 p.m. OK GNU C++14 TESTS 222 30 0 1600
32075912 Comrad_of_Stalin B Nov. 5, 2017, 12:23 p.m. OK GNU C++14 TESTS 222 30 204800 1600
31127773 AakashHanda B Oct. 7, 2017, 8:28 p.m. OK GNU C++14 TESTS 222 30 204800 1600
32429221 TheMaverick B Nov. 18, 2017, 11:39 a.m. OK GNU C++14 TESTS 222 30 204800 1600
30605377 Heart_Blue B Sept. 22, 2017, 4:15 a.m. OK GNU C++14 TESTS 222 30 1638400 1600
34059839 Mo_Ha_Med B Jan. 10, 2018, 12:34 a.m. OK GNU C++14 TESTS 222 30 1945600 1600
33875054 omar.ayman B Jan. 2, 2018, 11:53 p.m. OK GNU C++14 TESTS 222 30 1945600 1600
33457627 yashar_sb_sb B Dec. 20, 2017, 2:07 p.m. OK GNU C++14 TESTS 222 30 1945600 1600
32894480 Sabdul B Dec. 3, 2017, 8:46 a.m. OK GNU C++14 TESTS 222 30 1945600 1600
24554989 manishtanwar B Feb. 9, 2017, 5:40 p.m. OK GNU C++14 TESTS 222 30 1945600 1600
55184385 chongryong B June 6, 2019, 2:18 a.m. OK GNU C++17 TESTS 222 62 0 1600
69859531 genesiscentury B Jan. 30, 2020, 6:04 p.m. OK GNU C++17 TESTS 222 62 0 1600
61959863 18034336 B Oct. 6, 2019, 7:07 a.m. OK GNU C++17 TESTS 222 62 0 1600
61545759 cyansea B Sept. 30, 2019, 10:20 a.m. OK GNU C++17 TESTS 222 62 0 1600
56461630 PandaIsTheBest B July 3, 2019, 7:05 a.m. OK GNU C++17 TESTS 222 62 0 1600
56056706 tnakao B June 26, 2019, 12:49 a.m. OK GNU C++17 TESTS 222 62 0 1600
50525379 Heisenberg B Feb. 26, 2019, 11:33 a.m. OK GNU C++17 TESTS 222 62 0 1600
50215278 ILoveU3000 B Feb. 20, 2019, 4:01 a.m. OK GNU C++17 TESTS 222 62 0 1600
50101616 SebaMarin B Feb. 18, 2019, 3:12 p.m. OK GNU C++17 TESTS 222 62 0 1600
45278319 Ashishgup B Nov. 4, 2018, 12:19 p.m. OK GNU C++17 TESTS 222 62 0 1600
973910 mkut B Dec. 24, 2011, 8:05 a.m. OK Haskell TESTS 222 30 2150400 1600
2543660 DimsFromDergachy B Nov. 12, 2012, 12:34 p.m. OK Haskell TESTS 222 46 0 1600
940357 bjin B Dec. 9, 2011, 3:29 p.m. OK Haskell TESTS 222 50 3174400 1600
1051701 nativea B Jan. 16, 2012, 12:22 p.m. OK Java 6 TESTS 222 80 43008000 1600
987202 hama-du B Dec. 26, 2011, 2:57 p.m. OK Java 6 TESTS 222 110 43110400 1600
956997 Ahmed_Gad B Dec. 15, 2011, 7:28 p.m. OK Java 6 TESTS 222 110 43110400 1600
970637 aura B Dec. 21, 2011, 2:08 p.m. OK Java 6 TESTS 222 110 43212800 1600
957260 darkl0rd B Dec. 16, 2011, 5:13 a.m. OK Java 6 TESTS 222 110 43212800 1600
991257 mostafa_fahim B Dec. 29, 2011, 7:42 p.m. OK Java 6 TESTS 222 110 43315200 1600
952918 ahmad_mamdouh B Dec. 12, 2011, 2:02 p.m. OK Java 6 TESTS 222 130 43008000 1600
971679 Azat_Yusupov B Dec. 22, 2011, 2:17 p.m. OK Java 6 TESTS 222 130 43212800 1600
948771 Sinner B Dec. 10, 2011, 6:35 a.m. OK Java 6 TESTS 222 130 43212800 1600
947283 Jokser B Dec. 9, 2011, 9:25 p.m. OK Java 6 TESTS 222 130 43212800 1600
8081376 miguelmaurizio B Oct. 4, 2014, 11:14 p.m. OK Java 7 TESTS 222 154 0 1600
6984944 sousnake B June 30, 2014, 9:19 a.m. OK Java 7 TESTS 222 156 0 1600
4359164 vvenkai B Aug. 27, 2013, 11:15 p.m. OK Java 7 TESTS 222 156 0 1600
4322075 santjuan B Aug. 22, 2013, 1:37 a.m. OK Java 7 TESTS 222 156 0 1600
6519998 0p9o8i B May 2, 2014, 3:47 a.m. OK Java 7 TESTS 222 156 102400 1600
3820183 Footman B June 4, 2013, 12:23 a.m. OK Java 7 TESTS 222 171 204800 1600
11574912 tempTest1 B June 13, 2015, 10:52 p.m. OK Java 7 TESTS 222 186 0 1600
9441855 upsolving B Jan. 16, 2015, 9:28 a.m. OK Java 7 TESTS 222 186 0 1600
4321680 santjuan B Aug. 21, 2013, 9:23 p.m. OK Java 7 TESTS 222 186 0 1600
10958673 xiaowuc1 B May 1, 2015, 3:26 a.m. OK Java 7 TESTS 222 186 47718400 1600
12787263 sweiss B Aug. 31, 2015, 10:42 a.m. OK Java 8 TESTS 222 248 0 1600
11140838 poikniok B May 19, 2015, 6:19 a.m. OK Java 8 TESTS 222 248 0 1600
11140673 poikniok B May 19, 2015, 5:51 a.m. OK Java 8 TESTS 222 248 0 1600
9958503 YakutovDmitriy B Feb. 22, 2015, 10:41 a.m. OK Java 8 TESTS 222 248 0 1600
26670517 pitfall B April 25, 2017, 8:23 p.m. OK Java 8 TESTS 222 248 20582400 1600
58970821 Dukkha B Aug. 17, 2019, 8:18 p.m. OK Java 8 TESTS 222 280 0 1600
58496528 Hamza_Hassan B Aug. 9, 2019, 12:24 p.m. OK Java 8 TESTS 222 280 0 1600
32136422 Omar_Morsi B Nov. 8, 2017, 10:30 a.m. OK Java 8 TESTS 222 280 0 1600
25140812 jwozniak B March 2, 2017, 6 a.m. OK Java 8 TESTS 222 280 20992000 1600
25140752 jwozniak B March 2, 2017, 5:54 a.m. OK Java 8 TESTS 222 280 21094400 1600
941761 chokudai B Dec. 9, 2011, 3:43 p.m. OK Mono C# TESTS 222 170 11468800 1600
16405484 og.kostya B Feb. 28, 2016, 3:13 p.m. OK MS C# TESTS 222 124 204800 1600
3912353 Elun B June 18, 2013, 5 a.m. OK MS C++ TESTS 222 15 0 1600
3882732 tomas.svab B June 14, 2013, 10:29 a.m. OK MS C++ TESTS 222 15 102400 1600
3661127 Silent_coder B May 2, 2013, 5:33 p.m. OK MS C++ TESTS 222 15 307200 1600
1200943 sst B Feb. 18, 2012, 9:13 a.m. OK MS C++ TESTS 222 30 1433600 1600
1802820 vagnard B June 14, 2012, 3:45 p.m. OK MS C++ TESTS 222 30 1433600 1600
1978744 Schullz B Aug. 5, 2012, 7:03 p.m. OK MS C++ TESTS 222 30 1433600 1600
1912497 goodhope B July 19, 2012, 6:36 p.m. OK MS C++ TESTS 222 30 1433600 1600
1682302 FT.Nile B May 11, 2012, 8:10 p.m. OK MS C++ TESTS 222 30 1433600 1600
1629535 gridnevvvit B April 26, 2012, 1:40 p.m. OK MS C++ TESTS 222 30 1433600 1600
1446692 YX201314 B March 31, 2012, 12:50 p.m. OK MS C++ TESTS 222 30 1433600 1600
947618 alexey.shchepin B Dec. 9, 2011, 10:40 p.m. OK Ocaml TESTS 222 140 2252800 1600
61838168 kopok2 B Oct. 4, 2019, 8:43 a.m. OK PyPy 3 TESTS 222 654 3584000 1600
948618 RodionGork B Dec. 10, 2011, 5:42 a.m. OK Python 2 TESTS 222 60 3174400 1600
3408936 bfrac B March 26, 2013, 3:58 p.m. OK Python 2 TESTS 222 62 307200 1600
950092 apple_juice B Dec. 10, 2011, 3:36 p.m. OK Python 2 TESTS 222 80 2867200 1600
952980 ziliang B Dec. 12, 2011, 2:36 p.m. OK Python 2 TESTS 222 80 3174400 1600
952973 ziliang B Dec. 12, 2011, 2:30 p.m. OK Python 2 TESTS 222 80 3174400 1600
11093496 brodo B May 13, 2015, 10:44 p.m. OK Python 2 TESTS 222 124 0 1600
952932 Thomas_Ahle B Dec. 12, 2011, 2:08 p.m. OK Python 2 TESTS 222 130 2867200 1600
11050472 Dremov B May 8, 2015, 10:28 p.m. OK Python 2 TESTS 222 156 3686400 1600
1118706 zhyu B Jan. 26, 2012, 11:57 a.m. OK Python 2 TESTS 222 160 2867200 1600
3651990 vjudge3 B April 29, 2013, 5:30 p.m. OK Python 2 TESTS 222 171 0 1600
6621175 yugle7 B May 15, 2014, 1:41 p.m. OK Python 3 TESTS 222 156 0 1600
42123167 Mk_Python_v1 B Aug. 26, 2018, 1:34 p.m. OK Python 3 TESTS 222 310 0 1600
53853061 DICS B May 7, 2019, 2:26 p.m. OK Python 3 TESTS 222 434 0 1600
57089479 BugsBunny B July 15, 2019, 10:11 a.m. OK Python 3 TESTS 222 436 0 1600
5124599 agnusmaximus B Nov. 16, 2013, 10:32 a.m. OK Python 3 TESTS 222 560 0 1600
949910 K_operafan B Dec. 10, 2011, 1:55 p.m. OK Ruby TESTS 222 130 3788800 1600

remove filters

Back to search problems