IndiaHacks 2016 - Online Edition (Div. 1 + Div. 2)

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
653 IndiaHacks 2016 - Online Edition (Div. 1 + Div. 2) FINISHED False 7200 279235504 March 19, 2016, 8:35 a.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 1657 ) C Bear and Up-Down PROGRAMMING brute force implementation 1900

B"The life goes up and down, just like nice sequences. Sequence t1, xe2 x80 x89t2, xe2 x80 x89..., xe2 x80 x89tn is called nice if the following two conditions are satisfied: For example, sequences (2, xe2 x80 x898), (1, xe2 x80 x895, xe2 x80 x891) and (2, xe2 x80 x895, xe2 x80 x891, xe2 x80 x89100, xe2 x80 x8999, xe2 x80 x89120) are nice, while (1, xe2 x80 x891), (1, xe2 x80 x892, xe2 x80 x893) and (2, xe2 x80 x895, xe2 x80 x893, xe2 x80 x892) are not. Bear Limak has a sequence of positive integers t1, xe2 x80 x89t2, xe2 x80 x89..., xe2 x80 x89tn. This sequence is not nice now and Limak wants to fix it by a single swap. He is going to choose two indices i xe2 x80 x89< xe2 x80 x89j and swap elements ti and tj in order to get a nice sequence. Count the number of ways to do so. Two ways are considered different if indices of elements chosen for a swap are different. The first line of the input contains one integer n (2 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89n xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89150 xe2 x80 x89000) -- the length of the sequence. The second line contains n integers t1, xe2 x80 x89t2, xe2 x80 x89..., xe2 x80 x89tn (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89ti xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89150 xe2 x80 x89000) -- the initial sequence. It's guaranteed that the given sequence is not nice. Print the number of ways to swap two elements exactly once in order to get a nice sequence. In the first sample, there are two ways to get a nice sequence with one swap: In the second sample, there is only one way -- Limak should swap t1 xe2 x80 x89= xe2 x80 x89200 with t4 xe2 x80 x89= xe2 x80 x8950. "...

Tutorials

IndiaHacks Finals 2016 — Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
16816102 kulpet345 C March 19, 2016, 11:16 a.m. OK Delphi TESTS 44 46 4300800 1900
17145134 cxzxlcc C April 3, 2016, 12:49 p.m. OK FPC TESTS 44 46 5734400 1900
16829688 Sixer C March 20, 2016, 1:36 a.m. OK FPC TESTS 44 46 5734400 1900
16817021 Xiejiadong C March 19, 2016, 11:39 a.m. OK FPC TESTS 44 46 5734400 1900
16812475 cxms_sy C March 19, 2016, 9:57 a.m. OK FPC TESTS 44 61 5734400 1900
17076013 dohonghuan C March 31, 2016, 2:37 p.m. OK FPC TESTS 44 62 3379200 1900
16813106 Sanja C March 19, 2016, 10:07 a.m. OK FPC TESTS 44 62 3584000 1900
35887591 ______M______ C March 3, 2018, 2:07 p.m. OK GNU C TESTS 44 46 2867200 1900
16811214 CyberQuantum C March 19, 2016, 9:35 a.m. OK GNU C TESTS 44 46 2969600 1900
17205437 gauravsharma C April 7, 2016, 2:44 p.m. OK GNU C TESTS 44 46 3788800 1900
16815566 shets C March 19, 2016, 11:03 a.m. OK GNU C TESTS 44 61 2764800 1900
16829762 ACstar C March 20, 2016, 1:47 a.m. OK GNU C++ TESTS 44 15 4608000 1900
16823113 ctlchild C March 19, 2016, 4 p.m. OK GNU C++ TESTS 44 15 4608000 1900
16809613 faebdc C March 19, 2016, 9:09 a.m. OK GNU C++ TESTS 44 15 10137600 1900
18911297 AkaneSasu C July 6, 2016, 4:14 a.m. OK GNU C++ TESTS 44 30 1024000 1900
16814309 GEOTCBRL C March 19, 2016, 10:26 a.m. OK GNU C++ TESTS 44 30 3993600 1900
26625578 Beriand C April 23, 2017, 7:23 p.m. OK GNU C++ TESTS 44 31 2662400 1900
16955006 Arturia C March 26, 2016, 11:29 a.m. OK GNU C++ TESTS 44 31 3072000 1900
16810520 __debug C March 19, 2016, 9:23 a.m. OK GNU C++ TESTS 44 31 4403200 1900
16829790 ACstar C March 20, 2016, 1:51 a.m. OK GNU C++ TESTS 44 31 4505600 1900
16819152 kimbbakar C March 19, 2016, 12:47 p.m. OK GNU C++ TESTS 44 31 4710400 1900
56860081 rainboy C July 11, 2019, 9:19 p.m. OK GNU C11 TESTS 44 62 1331200 1900
16810592 NanoApe C March 19, 2016, 9:24 a.m. OK GNU C++11 TESTS 44 15 3379200 1900
16849812 liuxueyang C March 21, 2016, 4:28 a.m. OK GNU C++11 TESTS 44 15 4608000 1900
17413955 EZ_zby C April 21, 2016, 3:35 a.m. OK GNU C++11 TESTS 44 30 3993600 1900
16810715 Meowww C March 19, 2016, 9:27 a.m. OK GNU C++11 TESTS 44 30 4403200 1900
16815412 sy2006 C March 19, 2016, 11 a.m. OK GNU C++11 TESTS 44 30 6246400 1900
16813302 alex9801 C March 19, 2016, 10:11 a.m. OK GNU C++11 TESTS 44 31 2662400 1900
16812029 rowdark C March 19, 2016, 9:49 a.m. OK GNU C++11 TESTS 44 31 2867200 1900
20355602 HandsomeHow C Sept. 3, 2016, 7:58 a.m. OK GNU C++11 TESTS 44 31 3379200 1900
24461366 HPLY C Feb. 6, 2017, 2:32 a.m. OK GNU C++11 TESTS 44 31 3481600 1900
16814749 niike0goood C March 19, 2016, 10:32 a.m. OK GNU C++11 TESTS 44 31 4505600 1900
22033528 woo960131 dkflfkdeh C Nov. 4, 2016, 12:05 p.m. OK GNU C++14 TESTS 44 46 2150400 1900
65511247 kazuma C Nov. 22, 2019, 3:57 a.m. OK GNU C++14 TESTS 44 46 2252800 1900
23384206 Ali.Pi C Dec. 28, 2016, 6:19 p.m. OK GNU C++14 TESTS 44 46 3584000 1900
33757418 Vicennial C Dec. 29, 2017, 10:52 a.m. OK GNU C++14 TESTS 44 46 8806400 1900
34631815 cxt C Jan. 28, 2018, 11:49 a.m. OK GNU C++14 TESTS 44 61 4096000 1900
30577520 fengvs AWCXV haojie_chen C Sept. 21, 2017, 12:37 p.m. OK GNU C++14 TESTS 44 61 4300800 1900
41060625 alechuang98 C July 31, 2018, 4:48 p.m. OK GNU C++14 TESTS 44 62 1024000 1900
32520927 NiroBC C Nov. 21, 2017, 9:36 a.m. OK GNU C++14 TESTS 44 62 1228800 1900
54876142 Anaa_Muza C May 31, 2019, 11:54 a.m. OK GNU C++14 TESTS 44 62 1536000 1900
54876115 mohamed09nour C May 31, 2019, 11:53 a.m. OK GNU C++14 TESTS 44 62 1536000 1900
64887705 zhigu C Nov. 14, 2019, 1:38 p.m. OK GNU C++17 TESTS 44 61 1228800 1900
58672971 BloodMaster06 C Aug. 12, 2019, 3:12 p.m. OK GNU C++17 TESTS 44 62 1228800 1900
58673094 BloodMaster06 C Aug. 12, 2019, 3:14 p.m. OK GNU C++17 TESTS 44 62 1228800 1900
63781894 vjudge4 C Oct. 30, 2019, 11:17 a.m. OK GNU C++17 TESTS 44 62 2252800 1900
45449425 _MGH_ C Nov. 8, 2018, 3:09 p.m. OK GNU C++17 TESTS 44 62 2457600 1900
62218284 vjudge5 C Oct. 9, 2019, 4:38 p.m. OK GNU C++17 TESTS 44 62 2457600 1900
40195924 n_dao107 C July 11, 2018, 9:11 a.m. OK GNU C++17 TESTS 44 62 2560000 1900
42275694 i3abghany C Aug. 30, 2018, 11:19 a.m. OK GNU C++17 TESTS 44 62 2764800 1900
66306995 Amber30 C Dec. 5, 2019, 9:47 a.m. OK GNU C++17 TESTS 44 62 3788800 1900
39062552 hmc C June 9, 2018, 7:15 a.m. OK GNU C++17 TESTS 44 62 4096000 1900
16817752 kvafy C March 19, 2016, 12:05 p.m. OK Haskell TESTS 44 1341 156364800 1900
16815216 DukeOfYork C March 19, 2016, 10:57 a.m. OK Java 7 TESTS 44 108 49254400 1900
16813436 xDister C March 19, 2016, 10:13 a.m. OK Java 7 TESTS 44 124 43008000 1900
17700450 mkirsche C May 3, 2016, 4:09 p.m. OK Java 7 TESTS 44 156 44441600 1900
16812168 qwerty787788 C March 19, 2016, 9:51 a.m. OK Java 7 TESTS 44 171 46284800 1900
16857965 Code.coding C March 21, 2016, 2:27 p.m. OK Java 7 TESTS 44 186 44032000 1900
16815192 Titandrake C March 19, 2016, 10:56 a.m. OK Java 7 TESTS 44 187 49254400 1900
16812945 athmasagar C March 19, 2016, 10:05 a.m. OK Java 7 TESTS 44 218 48640000 1900
16811690 kinsaka21 C March 19, 2016, 9:43 a.m. OK Java 7 TESTS 44 343 39731200 1900
17465249 zulkan C April 23, 2016, 5:16 a.m. OK Java 7 TESTS 44 405 53862400 1900
17700692 sroyal C May 3, 2016, 4:36 p.m. OK Java 7 TESTS 44 1403 40652800 1900
16881302 RAMBO_tejasv C March 23, 2016, 6:26 a.m. OK Java 8 TESTS 44 155 20684800 1900
16824412 alibaba C March 19, 2016, 5:27 p.m. OK Java 8 TESTS 44 155 26009600 1900
16814043 dened C March 19, 2016, 10:22 a.m. OK Java 8 TESTS 44 156 26009600 1900
16816697 MatthewRaker C March 19, 2016, 11:31 a.m. OK Java 8 TESTS 44 170 24780800 1900
17700928 alexrcoleman C May 3, 2016, 5:01 p.m. OK Java 8 TESTS 44 171 25395200 1900
16810955 meijun C March 19, 2016, 9:31 a.m. OK Java 8 TESTS 44 171 28979200 1900
16823262 atoya C March 19, 2016, 4:11 p.m. OK Java 8 TESTS 44 186 28569600 1900
20808619 Abkreno94 C Sept. 22, 2016, 1:25 a.m. OK Java 8 TESTS 44 187 5017600 1900
25020287 eng.baher C Feb. 25, 2017, 6:39 p.m. OK Java 8 TESTS 44 202 22323200 1900
16814339 Jovfer C March 19, 2016, 10:27 a.m. OK Java 8 TESTS 44 202 25600000 1900
17696556 pyBlob C May 3, 2016, 9:06 a.m. OK JavaScript TESTS 44 218 37785600 1900
16811301 Neverauskas C March 19, 2016, 9:36 a.m. OK MS C# TESTS 44 109 30617600 1900
16811117 og.kostya C March 19, 2016, 9:33 a.m. OK MS C# TESTS 44 124 12697600 1900
16809393 azukun C March 19, 2016, 9:07 a.m. OK MS C# TESTS 44 140 33484800 1900
16888617 AnatolyTolstobrov C March 23, 2016, 3:05 p.m. OK MS C# TESTS 44 202 24473600 1900
16838942 I_always_love_cc C March 20, 2016, 1:06 p.m. OK MS C++ TESTS 44 46 2764800 1900
16814121 14310120133 C March 19, 2016, 10:23 a.m. OK MS C++ TESTS 44 46 2764800 1900
17063970 liuyuhong C March 31, 2016, 12:10 a.m. OK MS C++ TESTS 44 46 3379200 1900
16814553 shjgkwo C March 19, 2016, 10:30 a.m. OK MS C++ TESTS 44 46 3584000 1900
16809936 Perforator C March 19, 2016, 9:14 a.m. OK MS C++ TESTS 44 46 4198400 1900
16809786 FxF C March 19, 2016, 9:12 a.m. OK MS C++ TESTS 44 46 4198400 1900
16836696 luckystars C March 20, 2016, 11:15 a.m. OK MS C++ TESTS 44 46 4300800 1900
16811034 Mushegh C March 19, 2016, 9:32 a.m. OK MS C++ TESTS 44 46 4403200 1900
17204717 AleksanderBalobanov C April 7, 2016, 1:56 p.m. OK MS C++ TESTS 44 46 4608000 1900
16814630 CoDeRoK C March 19, 2016, 10:31 a.m. OK MS C++ TESTS 44 62 5939200 1900
16857002 orailly C March 21, 2016, 1:35 p.m. OK PyPy 2 TESTS 44 202 33894400 1900
16813894 kliner C March 19, 2016, 10:20 a.m. OK PyPy 2 TESTS 44 233 43724800 1900
16824609 Eeyore C March 19, 2016, 5:39 p.m. OK PyPy 2 TESTS 44 483 38092800 1900
16856968 orailly C March 21, 2016, 1:34 p.m. OK PyPy 3 TESTS 44 327 35430400 1900
18953706 ch_egor C July 7, 2016, 2:52 p.m. OK PyPy 3 TESTS 44 373 12390400 1900
38637678 yugle7 C May 26, 2018, 3:08 p.m. OK PyPy 3 TESTS 44 701 16179200 1900
38634413 yugle7 C May 26, 2018, 1:10 p.m. OK PyPy 3 TESTS 44 1076 15667200 1900
16880105 orailly C March 23, 2016, 3:15 a.m. OK Python 2 TESTS 44 763 13004800 1900
16857042 orailly C March 21, 2016, 1:37 p.m. OK Python 2 TESTS 44 1310 13004800 1900
16820459 ivladak C March 19, 2016, 1:49 p.m. OK Python 2 TESTS 44 1887 14336000 1900
16880071 orailly C March 23, 2016, 3:03 a.m. OK Python 3 TESTS 44 857 14950400 1900
16867169 orailly C March 22, 2016, 8:15 a.m. OK Python 3 TESTS 44 889 14848000 1900
16867593 orailly C March 22, 2016, 9:21 a.m. OK Python 3 TESTS 44 951 14848000 1900
16866172 orailly C March 22, 2016, 5:01 a.m. OK Python 3 TESTS 44 967 14848000 1900
17996672 tutor C May 19, 2016, 7:39 p.m. OK Python 3 TESTS 44 1060 21913600 1900
42136479 Mk_Python_v1 C Aug. 27, 2018, 12:35 a.m. OK Python 3 TESTS 44 1169 10854400 1900
16958803 jne0xff C March 26, 2016, 3:54 p.m. OK Python 3 TESTS 44 1278 15155200 1900
16856909 orailly C March 21, 2016, 1:31 p.m. OK Python 3 TESTS 44 1404 14745600 1900
16856380 orailly C March 21, 2016, 1:02 p.m. OK Python 3 TESTS 44 1497 14848000 1900
66658462 NocturneBflat C Dec. 12, 2019, 2:25 a.m. OK Python 3 TESTS 44 1747 10854400 1900
16903271 get2binoy C March 24, 2016, 9:03 a.m. OK Ruby TESTS 44 1060 53043200 1900
16817437 limed C March 19, 2016, 11:53 a.m. OK Scala TESTS 44 327 44441600 1900
17204881 reldan C April 7, 2016, 2:07 p.m. OK Scala TESTS 44 545 50483200 1900
17229647 reldan C April 8, 2016, 1:07 p.m. OK Scala TESTS 44 546 50892800 1900

remove filters

Back to search problems