Meydan okuma
Amacınız, olayların bir listesini (upvote, downvote, vb.) Alacak ve kullanıcının itibarını ve kazandığı ayrıcalıkları döndürecek mümkün olan en kısa programı yazmaktır.
Ne tür olaylar?
İşte kazanılan itibar sırasına göre listelenen olayların bir çizelgesi:
-15 answer unaccepted
-10 answer unupvoted
-5 question unupvoted
-2 answer downvoted
-2 question downvoted
-2 unaccept answer
-1 downvote answer
+1 join website
+1 undownvote answer
+2 accept answer
+2 question undownvoted
+2 answer undownvoted
+5 question upvoted
+10 answer upvoted
+15 answer accepted
+100 association bonus
Ne tür ayrıcalıklar?
İşte gerekli itibar sırasına göre bir ayrıcalıklar listesi.
1 create posts
5 participate in meta
10 remove new user restrictions
10 create wiki posts
15 vote up
15 flag posts
20 talk in chat
50 comment everywhere
75 set bounties
100 edit community wiki
100 create chat rooms
125 vote down
150 create tags
200 retag questions
250 view close votes
500 cast close and reopen votes
750 established user
1000 edit questions and answers
1000 create gallery chat rooms
1250 create tag synonyms
1500 approve tag wiki edits
2000 access to moderator tools
3500 protect questions
4000 trusted user
Giriş
Girdi (STDIN'de) her satırda bir tane olmak üzere, ilk grafikte tam olarak nasıl göründükleri (itibar miktarı hariç) bir olay listesi olacaktır. Boş satır girişin sonunu temsil eder. İşte bir örnek (sonunda boş bir satır olmalıdır):
join website
association bonus
answer upvoted
answer upvoted
question upvoted
answer accepted
answer upvoted
accept answer
unaccept answer
question unupvoted
accept answer
question upvoted
Çıktı
İlk çıktı satırı (STDOUT'a) biriken rep miktarını belirtmelidir. Bundan sonraki her satır, kazanılan bir ayrıcalığı tam olarak göründükleri gibi ve ikinci grafikle aynı sırada listelemelidir. Yukarıdaki girdi için beklenen çıktı:
153 reputation
1 create posts
5 participate in meta
10 remove new user restrictions
10 create wiki posts
15 vote up
15 flag posts
20 talk in chat
50 comment everywhere
75 set bounties
100 edit community wiki
100 create chat rooms
125 vote down
150 create tags
Kurallar, Kısıtlamalar ve Notlar
Bu kod golf. Standart kod golf kuralları geçerlidir.
(EDIT: Dosyalara erişen iki girişim olduğundan, kod uzunluğunun standart kod golf kurallarının bir parçası olarak dosyanın uzunluğunun kod uzunluğuna eklenmesi gerektiğini belirtmek isterim)