AIM Tech Round 5 (rated, 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
1028 AIM Tech Round 5 (rated, Div. 1 + Div. 2) FINISHED False 8100 202137923 Aug. 27, 2018, 4:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 1753 ) D Order book PROGRAMMING combinatorics data structures greedy 2100

B'Let 's consider a simplified version of order book of some stock. The order book is a list of orders (offers) from people that want to buy or sell one unit of the stock, each order is described by direction (BUY or SELL) and price. At every moment of time, every SELL offer has higher price than every BUY offer. In this problem no two ever existed orders will have the same price. The lowest-price SELL order and the highest-price BUY order are called the best offers, marked with black frames on the picture below. There are two possible actions in this orderbook: It is allowed to add new BUY order only with prices less than the best SELL offer (if you want to buy stock for higher price, then instead of adding an order you should accept the best SELL offer). Similarly, one couldn 't add a new SELL order with price less or equal to the best BUY offer. For example, you can 't add a new offer "SELL 20 " if there is already an offer "BUY 20 " or "BUY 25 " -- in this case you just accept the best BUY offer. You have a damaged order book log (in the beginning the are no orders in book). Every action has one of the two types: The directions of all actions are lost. Information from the log isn 't always enough to determine these directions. Count the number of ways to correctly restore all ADD action directions so that all the described conditions are satisfied at any moment. Since the answer could be large, output it modulo 10^9 + 7 . If it is impossible to correctly restore directions, then output 0 . The first line contains an integer n ( 1 <= n <= 363 ,304 ) -- the number of actions in the log. Each of the next n lines contains a string "ACCEPT" or "ADD" and an integer p ( 1 <= p <= 308 ,983 ,066 ), describing an action type and price. All ADD actions have different prices. For ACCEPT action it is guaranteed that the order with the same price has already been added but has not been accepted yet. Output the '...

Tutorials

61493

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
42679433 rr_ D Sept. 8, 2018, 3:29 p.m. OK D TESTS 76 686 23040000 2100
42418777 anhtuan19981998 D Sept. 3, 2018, 8:55 a.m. OK GNU C++ TESTS 76 140 3686400 2100
42418728 anhtuan19981998 D Sept. 3, 2018, 8:53 a.m. OK GNU C++ TESTS 76 140 3686400 2100
42178025 DEGwer D Aug. 27, 2018, 6:18 p.m. OK GNU C++ TESTS 76 140 3686400 2100
42418841 anhtuan19981998 D Sept. 3, 2018, 8:58 a.m. OK GNU C++ TESTS 76 155 3686400 2100
42180036 xymtxdy D Aug. 27, 2018, 6:33 p.m. OK GNU C++ TESTS 76 155 11980800 2100
42419129 anhtuan19981998 D Sept. 3, 2018, 9:08 a.m. OK GNU C++ TESTS 76 156 3686400 2100
42418913 anhtuan19981998 D Sept. 3, 2018, 9:01 a.m. OK GNU C++ TESTS 76 156 3686400 2100
42208591 Silver-Water D Aug. 28, 2018, 1 p.m. OK GNU C++ TESTS 76 311 11673600 2100
42242176 New-ErA D Aug. 29, 2018, 1:09 p.m. OK GNU C++ TESTS 76 312 11673600 2100
42427321 Frank___ D Sept. 3, 2018, 1:16 p.m. OK GNU C++ TESTS 76 312 11776000 2100
42179657 TianCaiJieJieZhenKeAi D Aug. 27, 2018, 6:30 p.m. OK GNU C++11 TESTS 76 62 5222400 2100
61107094 bupt_magicstar D Sept. 23, 2019, 9:39 a.m. OK GNU C++11 TESTS 76 108 5120000 2100
46700565 MiEcoku D Dec. 7, 2018, 1:38 a.m. OK GNU C++11 TESTS 76 124 3686400 2100
46700446 fwat D Dec. 7, 2018, 1:27 a.m. OK GNU C++11 TESTS 76 124 3686400 2100
46700561 vjudge2 D Dec. 7, 2018, 1:38 a.m. OK GNU C++11 TESTS 76 139 3686400 2100
66214018 L2K2 DigBick D Dec. 3, 2019, 8:08 a.m. OK GNU C++11 TESTS 76 140 3686400 2100
44474999 mmmod_lqs D Oct. 18, 2018, 8:26 a.m. OK GNU C++11 TESTS 76 140 3686400 2100
42889627 CQUzbx D Sept. 15, 2018, 12:05 p.m. OK GNU C++11 TESTS 76 155 3788800 2100
42451897 tall15421542 D Sept. 4, 2018, 8:42 a.m. OK GNU C++11 TESTS 76 155 3993600 2100
42363379 Dmaxiya D Sept. 2, 2018, 1:08 p.m. OK GNU C++11 TESTS 76 156 3686400 2100
42601697 xiaolongbao D Sept. 7, 2018, 5:12 a.m. OK GNU C++14 TESTS 76 155 3891200 2100
42178968 iaNTU D Aug. 27, 2018, 6:25 p.m. OK GNU C++14 TESTS 76 171 3891200 2100
42199833 sy_chen D Aug. 28, 2018, 8:15 a.m. OK GNU C++14 TESTS 76 171 4198400 2100
42847516 wxy_z D Sept. 14, 2018, 1:59 a.m. OK GNU C++14 TESTS 76 171 5734400 2100
42177855 jacynkaa D Aug. 27, 2018, 6:16 p.m. OK GNU C++14 TESTS 76 186 7987200 2100
42323004 bennieHan D Sept. 1, 2018, 12:58 a.m. OK GNU C++14 TESTS 76 187 3891200 2100
42186305 _no0B D Aug. 27, 2018, 9:35 p.m. OK GNU C++14 TESTS 76 187 3891200 2100
42224876 DJhao D Aug. 29, 2018, 1:27 a.m. OK GNU C++14 TESTS 76 187 4198400 2100
42175629 10256 D Aug. 27, 2018, 5:59 p.m. OK GNU C++14 TESTS 76 187 8499200 2100
42185188 vebgor D Aug. 27, 2018, 8:49 p.m. OK GNU C++14 TESTS 76 202 3891200 2100
42215915 O_O_ D Aug. 28, 2018, 5:08 p.m. OK GNU C++17 TESTS 76 156 4198400 2100
53824941 DrSwad D May 6, 2019, 3:28 p.m. OK GNU C++17 TESTS 76 171 3993600 2100
42195825 Xuanhuang D Aug. 28, 2018, 6:20 a.m. OK GNU C++17 TESTS 76 171 5324800 2100
52523220 nishank.suresh D April 9, 2019, 10:04 a.m. OK GNU C++17 TESTS 76 186 8089600 2100
42228601 farhad519 D Aug. 29, 2018, 5:06 a.m. OK GNU C++17 TESTS 76 186 8704000 2100
42311221 bitetheDDDDt D Aug. 31, 2018, 2:25 p.m. OK GNU C++17 TESTS 76 187 4096000 2100
42207509 bendyna.ivan D Aug. 28, 2018, 12:26 p.m. OK GNU C++17 TESTS 76 187 4403200 2100
42212614 yswdra D Aug. 28, 2018, 3:12 p.m. OK GNU C++17 TESTS 76 187 30924800 2100
44080488 Silly_Bee D Oct. 10, 2018, 2:51 p.m. OK GNU C++17 TESTS 76 202 3891200 2100
42192502 hiThere23 D Aug. 28, 2018, 4 a.m. OK GNU C++17 TESTS 76 202 3891200 2100
42429399 Xylofo D Sept. 3, 2018, 2:07 p.m. OK Haskell TESTS 76 1232 130457600 2100
42192173 aman28rwt D Aug. 28, 2018, 3:40 a.m. OK Java 8 TESTS 76 295 16486400 2100
42192195 aman28rwt D Aug. 28, 2018, 3:42 a.m. OK Java 8 TESTS 76 295 17203200 2100
42192220 aman28rwt D Aug. 28, 2018, 3:43 a.m. OK Java 8 TESTS 76 295 17305600 2100
42192270 aman28rwt D Aug. 28, 2018, 3:47 a.m. OK Java 8 TESTS 76 296 17305600 2100
42169475 uwi D Aug. 27, 2018, 5:18 p.m. OK Java 8 TESTS 76 311 0 2100
42175540 Suzukaze D Aug. 27, 2018, 5:58 p.m. OK Java 8 TESTS 76 373 9318400 2100
42248145 vadimmm D Aug. 29, 2018, 4:36 p.m. OK Java 8 TESTS 76 420 9830400 2100
42233584 amanchik D Aug. 29, 2018, 8:12 a.m. OK Java 8 TESTS 76 483 6963200 2100
42274096 dalt D Aug. 30, 2018, 10:12 a.m. OK Java 8 TESTS 76 561 16691200 2100
42222227 kusomushi D Aug. 28, 2018, 9:55 p.m. OK Java 8 TESTS 76 608 17817600 2100
42181044 AnatolyTolstobrov D Aug. 27, 2018, 6:41 p.m. OK Mono C# TESTS 76 639 32563200 2100
48363453 DarkDove D Jan. 13, 2019, 7:53 p.m. OK Mono C# TESTS 76 826 17408000 2100
43580345 abtest100 D Sept. 29, 2018, 5:06 p.m. OK MS C++ TESTS 76 140 5120000 2100
42457875 ys1468362286 D Sept. 4, 2018, 12:23 p.m. OK MS C++ TESTS 76 280 11673600 2100
44257024 vjudge4 D Oct. 13, 2018, 12:45 p.m. OK MS C++ TESTS 76 327 11673600 2100
44060392 LoneFox D Oct. 10, 2018, 5:23 a.m. OK MS C++ TESTS 76 343 11673600 2100
42482348 vjudge3 D Sept. 5, 2018, 6:38 a.m. OK MS C++ TESTS 76 343 11980800 2100
42280444 nik1998 D Aug. 30, 2018, 1:55 p.m. OK MS C++ TESTS 76 358 17100800 2100
42256506 Mishnya D Aug. 29, 2018, 9:52 p.m. OK MS C++ TESTS 76 577 168345600 2100
42185029 Firen95 D Aug. 27, 2018, 8:44 p.m. OK MS C++ TESTS 76 701 14643200 2100
42177981 Armandiel D Aug. 27, 2018, 6:17 p.m. OK MS C++ TESTS 76 811 23552000 2100
42185416 BaturaDima D Aug. 27, 2018, 8:56 p.m. OK MS C++ TESTS 76 904 42291200 2100
42174754 pajenegod D Aug. 27, 2018, 5:53 p.m. OK PyPy 2 TESTS 76 1107 20582400 2100
42206327 wadissimo D Aug. 28, 2018, 11:48 a.m. OK PyPy 3 TESTS 76 920 26009600 2100
42232876 orailly D Aug. 29, 2018, 7:45 a.m. OK Python 3 TESTS 76 623 25497600 2100
42175169 bendyna.ivan D Aug. 27, 2018, 5:56 p.m. OK Python 3 TESTS 76 1372 9011200 2100
42241319 Skybytskyi.Nikita D Aug. 29, 2018, 12:44 p.m. OK Python 3 TESTS 76 1419 8908800 2100
42197453 Savit_Gupta D Aug. 28, 2018, 7:08 a.m. OK Python 3 TESTS 76 1481 18227200 2100
61355882 sansen D Sept. 27, 2019, 10:24 a.m. OK Rust TESTS 76 155 24576000 2100
46689352 yakamoto D Dec. 6, 2018, 3:35 p.m. OK Scala TESTS 76 1029 19046400 2100

remove filters

Back to search problems