Codeforces Round 449 (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
896 Codeforces Round 449 (Div. 1) FINISHED False 8100 264182123 Dec. 2, 2017, 2:05 p.m.

Problems

Solved
Index
Name
Type
Tags
Community Tag
Rating
( 2294 ) B Ithea Plays With Chtholly PROGRAMMING binary search constructive algorithms games greedy interactive 2000

This is an interactive problem. Refer to the Interaction section below for better understanding. Ithea and Chtholly want to play a game in order to determine who can use the kitchen tonight. Initially, Ithea puts n clear sheets of paper in a line. They are numbered from 1 to n from left to right. This game will go on for m rounds. In each round, Ithea will give Chtholly an integer between 1 and c , and Chtholly needs to choose one of the sheets to write down this number (if there is already a number before, she will erase the original one and replace it with the new one). Chtholly wins if, at any time, all the sheets are filled with a number and the n numbers are in non-decreasing order looking from left to right from sheet 1 to sheet n , and if after m rounds she still doesn't win, she loses the game. Chtholly really wants to win the game as she wants to cook something for Willem. But she doesn't know how to win the game. So Chtholly finds you, and your task is to write a program to receive numbers that Ithea gives Chtholly and help her make the decision on which sheet of paper write this number. The first line contains 3 integers n , m and c ( , means rounded up) — the number of sheets, the number of rounds and the largest possible number Ithea can give to Chtholly respectively. The remaining parts of input are given throughout the interaction process. In each round, your program needs to read one line containing a single integer p i ( 1 ≤ p i ≤ c ), indicating the number given to Chtholly. Your program should then output a line containing an integer between 1 and n , indicating the number of sheet to write down this number in. After outputting each line, don't forget to flush the output. For example: fflush(stdout) in C/C++; System.out.flush() in Java; sys.stdout.flush() in Python; flush(output) in Pascal; See the documentation for other languages. If Chtholly wins at the end of a round, no more input will become available and your program should termin

Tutorials

Codeforces Round #449 Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
33147666 TsReaper B Dec. 12, 2017, 7:39 a.m. OK GNU C TESTS 62 15 1843200 2000
32994598 weng_233 B Dec. 7, 2017, 7:42 a.m. OK GNU C++ TESTS 62 15 1843200 2000
32945898 ONION_CYC B Dec. 5, 2017, 11:02 a.m. OK GNU C++ TESTS 62 15 1843200 2000
32873858 asaveljevs B Dec. 2, 2017, 3:46 p.m. OK GNU C++ TESTS 62 15 1843200 2000
32872971 E.Space B Dec. 2, 2017, 3:39 p.m. OK GNU C++ TESTS 62 15 1843200 2000
32868876 GodCowC B Dec. 2, 2017, 2:53 p.m. OK GNU C++ TESTS 62 15 1843200 2000
32867804 nealchen B Dec. 2, 2017, 2:43 p.m. OK GNU C++ TESTS 62 15 1843200 2000
33135698 deep9539 B Dec. 11, 2017, 6:14 p.m. OK GNU C++ TESTS 62 15 1843200 2000
34783895 cxy004 B Feb. 1, 2018, 12:05 a.m. OK GNU C++ TESTS 62 15 1843200 2000
33639611 lsmll B Dec. 26, 2017, 8:03 a.m. OK GNU C++ TESTS 62 15 1945600 2000
34790708 luogu_bot1 B Feb. 1, 2018, 5:49 a.m. OK GNU C++ TESTS 62 15 2048000 2000
33085465 Smurf1 B Dec. 10, 2017, 8:16 p.m. OK GNU C11 TESTS 62 30 1843200 2000
36042015 zsnuo B March 7, 2018, 11:35 a.m. OK GNU C++11 TESTS 62 15 1843200 2000
33894464 _rqy B Jan. 4, 2018, 12:08 a.m. OK GNU C++11 TESTS 62 15 1843200 2000
33865703 gheorghe_armand B Jan. 2, 2018, 2:32 p.m. OK GNU C++11 TESTS 62 15 1843200 2000
32894792 eliza_2003 B Dec. 3, 2017, 9:05 a.m. OK GNU C++11 TESTS 62 15 1843200 2000
32893410 binsjl B Dec. 3, 2017, 7:47 a.m. OK GNU C++11 TESTS 62 15 1843200 2000
32891379 orbitingflea B Dec. 3, 2017, 5:49 a.m. OK GNU C++11 TESTS 62 15 1843200 2000
32882230 laurageorgescu B Dec. 2, 2017, 6:31 p.m. OK GNU C++11 TESTS 62 15 1843200 2000
32867192 f.bialas B Dec. 2, 2017, 2:38 p.m. OK GNU C++11 TESTS 62 15 1843200 2000
34062183 yakitori B Jan. 10, 2018, 5:14 a.m. OK GNU C++11 TESTS 62 15 1843200 2000
35286356 HavlongRG B Feb. 15, 2018, 8:17 a.m. OK GNU C++11 TESTS 62 15 1945600 2000
32961184 sky_kun B Dec. 6, 2017, 3:43 a.m. OK GNU C++14 TESTS 62 15 1843200 2000
33884943 vladcainamisir B Jan. 3, 2018, 12:53 p.m. OK GNU C++14 TESTS 62 15 1843200 2000
33665518 Worg B Dec. 27, 2017, 9:46 a.m. OK GNU C++14 TESTS 62 15 1843200 2000
33539291 Phoenix1369 B Dec. 23, 2017, 1:41 p.m. OK GNU C++14 TESTS 62 15 1843200 2000
32971515 hmc B Dec. 6, 2017, 10:08 a.m. OK GNU C++14 TESTS 62 15 1843200 2000
32933647 bruno.iljazovic B Dec. 4, 2017, 7:39 p.m. OK GNU C++14 TESTS 62 15 1843200 2000
32912731 Hoyda B Dec. 4, 2017, 5:03 a.m. OK GNU C++14 TESTS 62 15 1843200 2000
32903560 darkdx B Dec. 3, 2017, 4:33 p.m. OK GNU C++14 TESTS 62 15 1843200 2000
32883006 NEU20133823 B Dec. 2, 2017, 7:07 p.m. OK GNU C++14 TESTS 62 15 1843200 2000
32871846 RemiliaScarlet B Dec. 2, 2017, 3:27 p.m. OK GNU C++14 TESTS 62 15 1843200 2000
69912320 I-Love-Islam B Jan. 31, 2020, 3:44 p.m. OK GNU C++17 TESTS 62 31 0 2000
68242326 Phortox B Jan. 5, 2020, 1:15 p.m. OK GNU C++17 TESTS 62 31 0 2000
61693151 Jaydeep999997 B Oct. 2, 2019, 6:15 a.m. OK GNU C++17 TESTS 62 31 0 2000
61467489 ST_C B Sept. 29, 2019, 11 a.m. OK GNU C++17 TESTS 62 31 0 2000
55222250 pbt17 B June 6, 2019, 8:31 p.m. OK GNU C++17 TESTS 62 31 0 2000
53809634 89264270823 B May 6, 2019, 5:24 a.m. OK GNU C++17 TESTS 62 31 0 2000
50723926 vjudge4 B March 3, 2019, 9:12 a.m. OK GNU C++17 TESTS 62 31 0 2000
39279032 zoomswk B June 16, 2018, 4:49 a.m. OK GNU C++17 TESTS 62 31 0 2000
67654281 CN_zwang2002 B Dec. 26, 2019, 1:20 p.m. OK GNU C++17 TESTS 62 31 0 2000
54750830 yangzijun B May 28, 2019, 12:45 p.m. OK GNU C++17 TESTS 62 31 102400 2000
33889967 Chenyao B Jan. 3, 2018, 5:26 p.m. OK Go TESTS 62 15 22937600 2000
39450878 xodiac B June 21, 2018, 4:18 a.m. OK Java 8 TESTS 62 155 0 2000
33014665 In_The_Name_Of_Love B Dec. 8, 2017, 5:25 a.m. OK Java 8 TESTS 62 155 20684800 2000
32873786 Musin B Dec. 2, 2017, 3:46 p.m. OK Java 8 TESTS 62 155 20684800 2000
33651024 r1shi B Dec. 26, 2017, 3:44 p.m. OK Java 8 TESTS 62 155 20787200 2000
32868510 ilyakor B Dec. 2, 2017, 2:49 p.m. OK Java 8 TESTS 62 171 20684800 2000
33257357 tri B Dec. 15, 2017, 7:33 a.m. OK Java 8 TESTS 62 171 20787200 2000
33580961 mashinist B Dec. 23, 2017, 11:38 p.m. OK Java 8 TESTS 62 171 20787200 2000
32877050 Jeel_Vaishnav B Dec. 2, 2017, 4:07 p.m. OK Java 8 TESTS 62 171 20992000 2000
55216200 armking B June 6, 2019, 4:52 p.m. OK Java 8 TESTS 62 186 0 2000
32865749 qwerty787788 B Dec. 2, 2017, 2:28 p.m. OK Java 8 TESTS 62 186 20787200 2000
32869676 chokudai B Dec. 2, 2017, 3:02 p.m. OK MS C# TESTS 62 46 9318400 2000
32866541 TarasSavitskyi B Dec. 2, 2017, 2:33 p.m. OK MS C++ TESTS 62 30 2048000 2000
32917137 vladvlad00 B Dec. 4, 2017, 9:41 a.m. OK MS C++ TESTS 62 31 2048000 2000
32916642 mshcherba B Dec. 4, 2017, 9:13 a.m. OK MS C++ TESTS 62 31 2048000 2000
32869788 waltz B Dec. 2, 2017, 3:03 p.m. OK MS C++ TESTS 62 31 2048000 2000
57461827 vjudge3 B July 21, 2019, 1:59 p.m. OK MS C++ TESTS 62 46 0 2000
45446491 vjudge2 B Nov. 8, 2018, 1:40 p.m. OK MS C++ TESTS 62 46 0 2000
53283686 BestMSN B April 25, 2019, 1:03 p.m. OK PyPy 3 TESTS 62 218 3174400 2000
32882073 WNG B Dec. 2, 2017, 6:26 p.m. OK Python 2 TESTS 62 77 4608000 2000
32868263 nwi B Dec. 2, 2017, 2:47 p.m. OK Python 2 TESTS 62 124 4608000 2000
33015865 kiiiiii B Dec. 8, 2017, 6:45 a.m. OK Python 3 TESTS 62 187 5734400 2000
33041794 mtarunsai1999 B Dec. 9, 2017, 6:39 a.m. OK Python 3 TESTS 62 233 5632000 2000
33507784 yura_antonych B Dec. 22, 2017, 1:07 p.m. OK Python 3 TESTS 62 280 5734400 2000
42132543 Mk_Python_v1 B Aug. 26, 2018, 7:30 p.m. OK Python 3 TESTS 62 342 0 2000

remove filters

Back to search problems