Submission #64130280


Source Code Expand

Copy
N,*A = $<.read.split.map(&:to_i)
T = A.tally
X = T.keys.select{|a| T[a]==1 }.max
puts(X ? A.index(X)+1 : -1)
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
N,*A = $<.read.split.map(&:to_i)
T = A.tally
X = T.keys.select{|a| T[a]==1 }.max
puts(X ? A.index(X)+1 : -1)

Submission Info

Submission Time
Task C - Uniqueness
User ds14050
Language Ruby (ruby 3.2.2)
Score 300
Code Size 113 Byte
Status AC
Exec Time 158 ms
Memory 58824 KB

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 300 / 300
Status
AC × 2
AC × 28
Set Name Test Cases
Sample sample_01.txt, sample_02.txt
All hand_01.txt, hand_02.txt, hand_03.txt, random_01.txt, random_02.txt, random_03.txt, random_04.txt, random_05.txt, random_06.txt, random_07.txt, random_08.txt, random_09.txt, random_10.txt, random_11.txt, random_12.txt, random_13.txt, random_14.txt, random_15.txt, random_16.txt, random_17.txt, random_18.txt, random_19.txt, random_20.txt, random_21.txt, random_22.txt, random_23.txt, sample_01.txt, sample_02.txt
Case Name Status Exec Time Memory
hand_01.txt AC 121 ms 17056 KB
hand_02.txt AC 44 ms 17072 KB
hand_03.txt AC 43 ms 17252 KB
random_01.txt AC 158 ms 58824 KB
random_02.txt AC 83 ms 31528 KB
random_03.txt AC 150 ms 57388 KB
random_04.txt AC 122 ms 44276 KB
random_05.txt AC 154 ms 57932 KB
random_06.txt AC 125 ms 44392 KB
random_07.txt AC 105 ms 38800 KB
random_08.txt AC 106 ms 39180 KB
random_09.txt AC 102 ms 39588 KB
random_10.txt AC 126 ms 49568 KB
random_11.txt AC 127 ms 49124 KB
random_12.txt AC 124 ms 49208 KB
random_13.txt AC 125 ms 49592 KB
random_14.txt AC 124 ms 49120 KB
random_15.txt AC 124 ms 49136 KB
random_16.txt AC 69 ms 25896 KB
random_17.txt AC 47 ms 18812 KB
random_18.txt AC 107 ms 37764 KB
random_19.txt AC 95 ms 33900 KB
random_20.txt AC 78 ms 30324 KB
random_21.txt AC 44 ms 17616 KB
random_22.txt AC 93 ms 33712 KB
random_23.txt AC 65 ms 24524 KB
sample_01.txt AC 43 ms 17200 KB
sample_02.txt AC 44 ms 17136 KB


2025-04-15 (Tue)
02:33:48 +00:00