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.
Problems
B'You are given a string s consisting of lowercase English letters. Rearrange the characters of s to form a new string r that is not equal to s , or report that it 's impossible. The first line contains a single integer t ( 1 <= q t <= q 1000 ) -- the number of test cases. The only line of each test case contains a string s of length at most 10 consisting of lowercase English letters. For each test case, if no such string r exists as described in the statement, output "NO" (without quotes). Otherwise, output "YES" (without quotes). Then, output one line -- the string r , consisting of letters of string s . You can output "YES" and "NO" in any case (for example, strings "yEs", "yes", and "Yes" will be recognized as a positive response). If multiple answers are possible, you can output any of them. In the first test case, another possible answer is texttt{forcescode} . In the second test case, all rearrangements of texttt{aaaaa} are equal to texttt{aaaaa} . '... |
Tutorials
Submissions
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
263682168 |
M_saad17 |
B |
June 1, 2024, 9:28 p.m. |
OK |
C# 10 |
TESTS |
4 |
77 |
0 |
|
800 |
263269177 |
justunderdog |
B |
May 30, 2024, 2:37 p.m. |
OK |
C# 10 |
TESTS |
4 |
93 |
0 |
|
800 |
263440114 |
Bad_Kpot |
B |
May 31, 2024, 9:02 a.m. |
OK |
C# 10 |
TESTS |
4 |
93 |
307200 |
|
800 |
262361335 |
luogu_bot2 |
B |
May 24, 2024, 9:19 a.m. |
OK |
C++14 (GCC 6-32) |
TESTS |
4 |
30 |
0 |
|
800 |
263019412 |
rkcool |
B |
May 28, 2024, 1:43 p.m. |
OK |
C++14 (GCC 6-32) |
TESTS |
4 |
31 |
0 |
|
800 |
262908297 |
koyalkarvishnu1 |
B |
May 27, 2024, 4:16 p.m. |
OK |
C++14 (GCC 6-32) |
TESTS |
4 |
31 |
0 |
|
800 |
262848003 |
Ghaith_zakaria |
B |
May 27, 2024, 8:07 a.m. |
OK |
C++14 (GCC 6-32) |
TESTS |
4 |
31 |
0 |
|
800 |
262636994 |
benny0972 |
B |
May 26, 2024, 2:05 a.m. |
OK |
C++14 (GCC 6-32) |
TESTS |
4 |
31 |
0 |
|
800 |
262479096 |
luogu_bot1 |
B |
May 25, 2024, 8:06 a.m. |
OK |
C++14 (GCC 6-32) |
TESTS |
4 |
31 |
0 |
|
800 |
262510046 |
DarketDether |
B |
May 25, 2024, 12:39 p.m. |
OK |
C++14 (GCC 6-32) |
TESTS |
4 |
31 |
0 |
|
800 |
262457477 |
KafuuPone |
B |
May 25, 2024, 4:36 a.m. |
OK |
C++14 (GCC 6-32) |
TESTS |
4 |
31 |
0 |
|
800 |
263555119 |
Eng_Mohamed_Amir |
B |
May 31, 2024, 10:47 p.m. |
OK |
C++14 (GCC 6-32) |
TESTS |
4 |
31 |
0 |
|
800 |
263394910 |
Musfiq_Marfy |
B |
May 31, 2024, 12:28 a.m. |
OK |
C++14 (GCC 6-32) |
TESTS |
4 |
31 |
0 |
|
800 |
262178134 |
ss691438 |
B |
May 22, 2024, 5:41 p.m. |
OK |
C++17 (GCC 7-32) |
TESTS |
4 |
30 |
0 |
|
800 |
262661551 |
Bohemain |
B |
May 26, 2024, 6:53 a.m. |
OK |
C++17 (GCC 7-32) |
TESTS |
4 |
30 |
0 |
|
800 |
262626863 |
__Bruteforce |
B |
May 25, 2024, 9:25 p.m. |
OK |
C++17 (GCC 7-32) |
TESTS |
4 |
30 |
0 |
|
800 |
263341645 |
alpha004 |
B |
May 30, 2024, 4 p.m. |
OK |
C++17 (GCC 7-32) |
TESTS |
4 |
30 |
0 |
|
800 |
263152993 |
saket8102 |
B |
May 29, 2024, 2:04 p.m. |
OK |
C++17 (GCC 7-32) |
TESTS |
4 |
30 |
0 |
|
800 |
262843277 |
guibinrui |
B |
May 27, 2024, 7:30 a.m. |
OK |
C++17 (GCC 7-32) |
TESTS |
4 |
30 |
0 |
|
800 |
262748345 |
BelalGama |
B |
May 26, 2024, 3:08 p.m. |
OK |
C++17 (GCC 7-32) |
TESTS |
4 |
30 |
0 |
|
800 |
262680879 |
shivamteotia200 |
B |
May 26, 2024, 9:22 a.m. |
OK |
C++17 (GCC 7-32) |
TESTS |
4 |
30 |
0 |
|
800 |
263687290 |
random._.int |
B |
June 2, 2024, 12:06 a.m. |
OK |
C++17 (GCC 7-32) |
TESTS |
4 |
31 |
0 |
|
800 |
263697683 |
randomguyatcvt |
B |
June 2, 2024, 4:13 a.m. |
OK |
C++17 (GCC 7-32) |
TESTS |
4 |
31 |
0 |
|
800 |
262691723 |
hahahehetester |
B |
May 26, 2024, 10:52 a.m. |
OK |
C++20 (GCC 13-64) |
TESTS |
4 |
30 |
0 |
|
800 |
263249407 |
prakashkumar43674 |
B |
May 30, 2024, 12:42 p.m. |
OK |
C++20 (GCC 13-64) |
TESTS |
4 |
30 |
0 |
|
800 |
262287253 |
1Ahmad1 |
B |
May 23, 2024, 4:33 p.m. |
OK |
C++20 (GCC 13-64) |
TESTS |
4 |
30 |
0 |
|
800 |
263704514 |
gabzinnn |
B |
June 2, 2024, 5:51 a.m. |
OK |
C++20 (GCC 13-64) |
TESTS |
4 |
30 |
102400 |
|
800 |
263251932 |
CuriousAditya |
B |
May 30, 2024, 1 p.m. |
OK |
C++20 (GCC 13-64) |
TESTS |
4 |
31 |
0 |
|
800 |
263245642 |
Exusiai1 |
B |
May 30, 2024, 12:16 p.m. |
OK |
C++20 (GCC 13-64) |
TESTS |
4 |
31 |
0 |
|
800 |
263536377 |
prnvakula |
B |
May 31, 2024, 5:58 p.m. |
OK |
C++20 (GCC 13-64) |
TESTS |
4 |
31 |
0 |
|
800 |
263371478 |
Wxssim |
B |
May 30, 2024, 5:50 p.m. |
OK |
C++20 (GCC 13-64) |
TESTS |
4 |
31 |
0 |
|
800 |
263266862 |
nozzyl |
B |
May 30, 2024, 2:21 p.m. |
OK |
C++20 (GCC 13-64) |
TESTS |
4 |
31 |
0 |
|
800 |
263252437 |
vjudge.5 |
B |
May 30, 2024, 1:03 p.m. |
OK |
C++20 (GCC 13-64) |
TESTS |
4 |
31 |
0 |
|
800 |
262408227 |
groggyCs |
B |
May 24, 2024, 3:41 p.m. |
OK |
C# 8 |
TESTS |
4 |
93 |
204800 |
|
800 |
262271592 |
ahmed_aziz |
B |
May 23, 2024, 2:18 p.m. |
OK |
C# 8 |
TESTS |
4 |
124 |
512000 |
|
800 |
263381108 |
eh_Sami |
B |
May 30, 2024, 7:32 p.m. |
OK |
GNU C11 |
TESTS |
4 |
30 |
0 |
|
800 |
262825175 |
DoomIsEternal |
B |
May 27, 2024, 5:07 a.m. |
OK |
GNU C11 |
TESTS |
4 |
30 |
0 |
|
800 |
262673969 |
dgu24jiji |
B |
May 26, 2024, 8:29 a.m. |
OK |
GNU C11 |
TESTS |
4 |
31 |
0 |
|
800 |
262795882 |
adnanahamedtamim |
B |
May 26, 2024, 7:33 p.m. |
OK |
GNU C11 |
TESTS |
4 |
31 |
102400 |
|
800 |
263168340 |
muntasirmasum108 |
B |
May 29, 2024, 4:33 p.m. |
OK |
GNU C11 |
TESTS |
4 |
31 |
102400 |
|
800 |
262252626 |
Yahuououo |
B |
May 23, 2024, noon |
OK |
GNU C11 |
TESTS |
4 |
31 |
102400 |
|
800 |
263640778 |
Rehad123 |
B |
June 1, 2024, 2:14 p.m. |
OK |
GNU C11 |
TESTS |
4 |
46 |
0 |
|
800 |
263171151 |
Mahi11 |
B |
May 29, 2024, 5:13 p.m. |
OK |
GNU C11 |
TESTS |
4 |
46 |
0 |
|
800 |
263170830 |
Mahi11 |
B |
May 29, 2024, 5:08 p.m. |
OK |
GNU C11 |
TESTS |
4 |
46 |
0 |
|
800 |
263170631 |
Mahi11 |
B |
May 29, 2024, 5:05 p.m. |
OK |
GNU C11 |
TESTS |
4 |
46 |
0 |
|
800 |
262789323 |
XJaryd |
B |
May 26, 2024, 6:15 p.m. |
OK |
Go |
TESTS |
4 |
46 |
204800 |
|
800 |
263595306 |
YeWeiQiang |
B |
June 1, 2024, 7:58 a.m. |
OK |
Go |
TESTS |
4 |
61 |
204800 |
|
800 |
262498432 |
M-o-b-a-r-a-k |
B |
May 25, 2024, 10:47 a.m. |
OK |
Go |
TESTS |
4 |
62 |
102400 |
|
800 |
262498762 |
M-o-b-a-r-a-k |
B |
May 25, 2024, 10:49 a.m. |
OK |
Go |
TESTS |
4 |
77 |
102400 |
|
800 |
262383405 |
immortalfox |
B |
May 24, 2024, 12:21 p.m. |
OK |
Go |
TESTS |
4 |
108 |
102400 |
|
800 |
263668035 |
half_blood_prince__ |
B |
June 1, 2024, 6:09 p.m. |
OK |
Java 21 |
TESTS |
4 |
218 |
307200 |
|
800 |
262677323 |
nishantk |
B |
May 26, 2024, 8:54 a.m. |
OK |
Java 21 |
TESTS |
4 |
218 |
716800 |
|
800 |
262626946 |
personalfebus |
B |
May 25, 2024, 9:27 p.m. |
OK |
Java 21 |
TESTS |
4 |
218 |
1024000 |
|
800 |
262973330 |
erreze |
B |
May 28, 2024, 7:20 a.m. |
OK |
Java 21 |
TESTS |
4 |
218 |
1843200 |
|
800 |
262865988 |
vsokolov2027 |
B |
May 27, 2024, 10:43 a.m. |
OK |
Java 21 |
TESTS |
4 |
233 |
716800 |
|
800 |
262410026 |
ShorifulSoumic |
B |
May 24, 2024, 3:57 p.m. |
OK |
Java 21 |
TESTS |
4 |
234 |
307200 |
|
800 |
262349856 |
pratikscfr |
B |
May 24, 2024, 7:39 a.m. |
OK |
Java 21 |
TESTS |
4 |
249 |
0 |
|
800 |
262825273 |
SasiVarshith |
B |
May 27, 2024, 5:08 a.m. |
OK |
Java 21 |
TESTS |
4 |
249 |
819200 |
|
800 |
262272437 |
Blast_Kazi |
B |
May 23, 2024, 2:25 p.m. |
OK |
Java 21 |
TESTS |
4 |
249 |
1331200 |
|
800 |
262272113 |
OreGa_iru |
B |
May 23, 2024, 2:22 p.m. |
OK |
Java 21 |
TESTS |
4 |
249 |
1331200 |
|
800 |
263409678 |
lavender_me |
B |
May 31, 2024, 4:38 a.m. |
OK |
Java 8 |
TESTS |
4 |
124 |
0 |
|
800 |
263568635 |
thrasher |
B |
June 1, 2024, 3:33 a.m. |
OK |
Java 8 |
TESTS |
4 |
140 |
0 |
|
800 |
263505043 |
_z_ZZ |
B |
May 31, 2024, 1:30 p.m. |
OK |
Java 8 |
TESTS |
4 |
140 |
0 |
|
800 |
262470743 |
bahaazyoud2000 |
B |
May 25, 2024, 6:48 a.m. |
OK |
Java 8 |
TESTS |
4 |
155 |
0 |
|
800 |
262920156 |
MrunalrajRedij |
B |
May 27, 2024, 6:05 p.m. |
OK |
Java 8 |
TESTS |
4 |
156 |
0 |
|
800 |
262906443 |
MrunalrajRedij |
B |
May 27, 2024, 4 p.m. |
OK |
Java 8 |
TESTS |
4 |
156 |
0 |
|
800 |
262902136 |
arpit.mishra |
B |
May 27, 2024, 3:25 p.m. |
OK |
Java 8 |
TESTS |
4 |
156 |
0 |
|
800 |
263610758 |
aparna_nagpal |
B |
June 1, 2024, 10:07 a.m. |
OK |
Java 8 |
TESTS |
4 |
171 |
0 |
|
800 |
263441403 |
2210030057 |
B |
May 31, 2024, 9:16 a.m. |
OK |
Java 8 |
TESTS |
4 |
171 |
0 |
|
800 |
263192413 |
raaayyyaaaan |
B |
May 30, 2024, 12:20 a.m. |
OK |
Java 8 |
TESTS |
4 |
171 |
0 |
|
800 |
262425472 |
housni |
B |
May 24, 2024, 6:24 p.m. |
OK |
Kotlin 1.7 |
TESTS |
4 |
296 |
716800 |
|
800 |
262833062 |
mahbodeb174 |
B |
May 27, 2024, 6:04 a.m. |
OK |
Kotlin 1.9 |
TESTS |
4 |
156 |
0 |
|
800 |
263395993 |
timmyfeng |
B |
May 31, 2024, 12:59 a.m. |
OK |
OCaml |
TESTS |
4 |
46 |
0 |
|
800 |
263012524 |
Anusha03 |
B |
May 28, 2024, 12:49 p.m. |
OK |
PyPy 3 |
TESTS |
4 |
93 |
1740800 |
|
800 |
262489086 |
9c_ccccccccc |
B |
May 25, 2024, 9:31 a.m. |
OK |
PyPy 3 |
TESTS |
4 |
109 |
3481600 |
|
800 |
263163566 |
Ashutosh352 |
B |
May 29, 2024, 3:38 p.m. |
OK |
PyPy 3 |
TESTS |
4 |
124 |
3174400 |
|
800 |
262829841 |
_Buzin_ |
B |
May 27, 2024, 5:27 a.m. |
OK |
PyPy 3 |
TESTS |
4 |
124 |
3481600 |
|
800 |
262485601 |
klu-2100030642 |
B |
May 25, 2024, 9:07 a.m. |
OK |
PyPy 3 |
TESTS |
4 |
125 |
2867200 |
|
800 |
262187364 |
Navvi03 |
B |
May 22, 2024, 7:14 p.m. |
OK |
PyPy 3 |
TESTS |
4 |
140 |
2662400 |
|
800 |
262369685 |
Jyoti. |
B |
May 24, 2024, 10:30 a.m. |
OK |
PyPy 3 |
TESTS |
4 |
140 |
2867200 |
|
800 |
262866358 |
austrianpainter |
B |
May 27, 2024, 10:46 a.m. |
OK |
PyPy 3 |
TESTS |
4 |
140 |
2969600 |
|
800 |
262640584 |
kumikooumae |
B |
May 26, 2024, 3:09 a.m. |
OK |
PyPy 3 |
TESTS |
4 |
155 |
3481600 |
|
800 |
262173234 |
haidarito |
B |
May 22, 2024, 4:59 p.m. |
OK |
PyPy 3 |
TESTS |
4 |
202 |
4096000 |
|
800 |
262377973 |
Be.liau |
B |
May 24, 2024, 11:38 a.m. |
OK |
PyPy 3-64 |
TESTS |
4 |
77 |
1331200 |
|
800 |
262170055 |
__empty__ |
B |
May 22, 2024, 4:32 p.m. |
OK |
PyPy 3-64 |
TESTS |
4 |
77 |
1536000 |
|
800 |
262540713 |
MistaFlash |
B |
May 25, 2024, 2:56 p.m. |
OK |
PyPy 3-64 |
TESTS |
4 |
77 |
2048000 |
|
800 |
263084119 |
Yuvraj_2004 |
B |
May 29, 2024, 4:09 a.m. |
OK |
PyPy 3-64 |
TESTS |
4 |
78 |
1536000 |
|
800 |
262914276 |
perryd01 |
B |
May 27, 2024, 5:10 p.m. |
OK |
PyPy 3-64 |
TESTS |
4 |
78 |
2048000 |
|
800 |
263423718 |
Muhammad.shahzaib |
B |
May 31, 2024, 6:45 a.m. |
OK |
PyPy 3-64 |
TESTS |
4 |
92 |
2150400 |
|
800 |
262871138 |
Vasiliy_48 |
B |
May 27, 2024, 11:26 a.m. |
OK |
PyPy 3-64 |
TESTS |
4 |
92 |
2150400 |
|
800 |
263085093 |
M_M_MOMIN |
B |
May 29, 2024, 4:23 a.m. |
OK |
PyPy 3-64 |
TESTS |
4 |
93 |
2048000 |
|
800 |
262367704 |
zayd_meziane |
B |
May 24, 2024, 10:13 a.m. |
OK |
PyPy 3-64 |
TESTS |
4 |
93 |
2048000 |
|
800 |
263021886 |
Shivamk21 |
B |
May 28, 2024, 2:02 p.m. |
OK |
PyPy 3-64 |
TESTS |
4 |
93 |
2150400 |
|
800 |
263213528 |
Vijay5356 |
B |
May 30, 2024, 8:46 a.m. |
OK |
Python 3 |
TESTS |
4 |
46 |
0 |
|
800 |
262784959 |
asdparasite |
B |
May 26, 2024, 5:33 p.m. |
OK |
Python 3 |
TESTS |
4 |
46 |
0 |
|
800 |
262338038 |
MahaCoder |
B |
May 24, 2024, 5:39 a.m. |
OK |
Python 3 |
TESTS |
4 |
46 |
0 |
|
800 |
262205715 |
thais.almeida |
B |
May 23, 2024, 1:21 a.m. |
OK |
Python 3 |
TESTS |
4 |
46 |
0 |
|
800 |
263607623 |
bakhram65 |
B |
June 1, 2024, 9:39 a.m. |
OK |
Python 3 |
TESTS |
4 |
61 |
0 |
|
800 |
263553377 |
ravanagude4 |
B |
May 31, 2024, 10:02 p.m. |
OK |
Python 3 |
TESTS |
4 |
61 |
0 |
|
800 |
263074401 |
endofloop2018 |
B |
May 29, 2024, 1:06 a.m. |
OK |
Python 3 |
TESTS |
4 |
61 |
0 |
|
800 |
263060550 |
TejaKumar12 |
B |
May 28, 2024, 7:55 p.m. |
OK |
Python 3 |
TESTS |
4 |
61 |
0 |
|
800 |
262969690 |
HeLlO3819 |
B |
May 28, 2024, 6:48 a.m. |
OK |
Python 3 |
TESTS |
4 |
61 |
0 |
|
800 |
262951843 |
ChocoCosmos |
B |
May 28, 2024, 3:42 a.m. |
OK |
Python 3 |
TESTS |
4 |
61 |
0 |
|
800 |
262631299 |
SnowballSH |
B |
May 25, 2024, 11:31 p.m. |
OK |
Rust 2021 |
TESTS |
4 |
62 |
0 |
|
800 |
remove filters
Back to search problems