Educational Codeforces Round 177 (Rated for 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
2086 Educational Codeforces Round 177 (Rated for Div. 2) FINISHED False 7200 36343455 April 3, 2025, 2:35 p.m.

Problems

Solved
Index
Name
Type
Tags
Community Tag
Rating
( 142 ) F Online Palindrome PROGRAMMING brute force constructive algorithms interactive

This is an interactive problem. The jury has a string (s) consisting of lowercase Latin letters. The following constraints apply to this string: the string has an odd length that does not exceed (99); the string consists only of the characters " a " and " b ". There is also a string (t), which is initially empty. Then, (|s|) steps happen. During the (i)-th step, the following events occur: first, the jury tells you the character (s_i) and appends it to the end of the string (t); then, you may swap any two characters in (t), or do nothing. Your task is to ensure that after the (|s|)-th step, the string (t) is a palindrome. The interactive interaction starts immediately. During each step, your program will receive one character — the next character of the string (s) or " 0 " (zero) if the string has ended. If the character " 0 " is received, your program must terminate immediately. After receiving (s_{i}), you must output the positions of the characters to be swapped, that is, two integers (l) and (r) ((1 \le l,r \le i)) or, if you do not want to swap characters, then " 0 0 ". If your program makes an invalid operation, for example, by trying to swap characters from non-existing positions, or the resulting string (t) is not a palindrome, the jury program will print one character " X " on a separate line. If your program receives " X " as the response, it should terminate immediately ; otherwise, the verdict of your submission will be undefined. The interactor in this problem is not adaptive , meaning that the string (s) does not change during the interaction. After each output request, do not forget to output a newline and flush the output buffer. Otherwise, you will receive a verdict of " Idleness limit exceeded ". To do this, use: fflush(stdout) or cout.flush() in C++ ; System.out.flush() in Java ; sys.stdout.flush() in Python ; refer to the documentation for other languages. Hack format F

Tutorials

Educational Codeforces Round 177 Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
313847447 galiver2009 F April 3, 2025, 8:54 p.m. OK C++17 (GCC 7-32) TESTS 28 62 102400
313869974 FLATYsss F April 4, 2025, 5:04 a.m. OK C++17 (GCC 7-32) TESTS 28 77 102400
313863978 soicodoc10tin F April 4, 2025, 3:37 a.m. OK C++17 (GCC 7-32) TESTS 28 77 102400
313859646 AminAnv1 F April 4, 2025, 2:14 a.m. OK C++17 (GCC 7-32) TESTS 28 155 102400
313824037 nikolapesic2802 F April 3, 2025, 4:50 p.m. OK C++17 (GCC 7-32) TESTS 28 155 102400
313823595 nikolapesic2802 F April 3, 2025, 4:47 p.m. OK C++17 (GCC 7-32) TESTS 28 171 102400
313823800 nikolapesic2802 F April 3, 2025, 4:49 p.m. OK C++17 (GCC 7-32) TESTS 28 187 102400
313983601 A_G F April 5, 2025, 12:20 a.m. OK C++20 (GCC 13-64) TESTS 28 62 0
313960953 liympanda F April 4, 2025, 6:28 p.m. OK C++20 (GCC 13-64) TESTS 28 62 0
313946479 Noche_6 F April 4, 2025, 4:34 p.m. OK C++20 (GCC 13-64) TESTS 28 93 102400
313883243 Mango2011 F April 4, 2025, 7:46 a.m. OK C++20 (GCC 13-64) TESTS 28 358 0
313826046 cn449 F April 3, 2025, 5:05 p.m. OK C++20 (GCC 13-64) TESTS 28 406 102400
313831013 turmax F April 3, 2025, 5:48 p.m. OK C++20 (GCC 13-64) TESTS 28 436 102400
313981298 peti1234 F April 4, 2025, 11:01 p.m. OK C++23 (GCC 14-64, msys2) TESTS 28 46 102400
313970825 Tamatem.1 F April 4, 2025, 8:04 p.m. OK C++23 (GCC 14-64, msys2) TESTS 28 62 102400
313985784 programandcode F April 5, 2025, 1:25 a.m. OK C++23 (GCC 14-64, msys2) TESTS 28 77 102400
313954418 Kilo_5723 F April 4, 2025, 5:37 p.m. OK C++23 (GCC 14-64, msys2) TESTS 28 77 102400
313847963 Wansur F April 3, 2025, 9:02 p.m. OK C++23 (GCC 14-64, msys2) TESTS 28 77 102400
313832861 std.zip F April 3, 2025, 6:05 p.m. OK C++23 (GCC 14-64, msys2) TESTS 28 77 102400
313981377 peti1234 F April 4, 2025, 11:03 p.m. OK C++23 (GCC 14-64, msys2) TESTS 28 78 102400
313893253 aaryaibtedafoyez F April 4, 2025, 9:28 a.m. OK C++23 (GCC 14-64, msys2) TESTS 28 93 102400
313828932 Georgewhba18 F April 3, 2025, 5:29 p.m. OK C++23 (GCC 14-64, msys2) TESTS 28 93 102400
313949082 jlass_ F April 4, 2025, 4:54 p.m. OK C++23 (GCC 14-64, msys2) TESTS 28 109 0
313842081 rainboy F April 3, 2025, 7:41 p.m. OK GNU C11 TESTS 28 62 8396800
313946408 ahmedafeef F April 4, 2025, 4:33 p.m. OK GNU C11 TESTS 28 92 8396800
313937621 ahmedafeef F April 4, 2025, 3:33 p.m. OK GNU C11 TESTS 28 92 8396800
314000434 dzhi F April 5, 2025, 5:21 a.m. OK Java 21 TESTS 28 327 2252800
314001494 dzhi F April 5, 2025, 5:32 a.m. OK Java 21 TESTS 28 343 1536000
313827988 arnabmanna F April 3, 2025, 5:21 p.m. OK Java 21 TESTS 28 343 1740800
313847472 _MASSIMO_ F April 3, 2025, 8:54 p.m. OK Rust 2021 TESTS 28 62 102400

remove filters

Back to search problems