Task: | trener |
Sender: | Kuha |
Submission time: | 2016-07-27 14:03:26 +0300 |
Language: | C++ |
Status: | READY |
Result: | 100 |
group | verdict | score |
---|---|---|
#1 | ACCEPTED | 100 |
test | verdict | time | |
---|---|---|---|
#1 | ACCEPTED | 0.05 s | details |
#2 | ACCEPTED | 0.05 s | details |
#3 | ACCEPTED | 0.05 s | details |
#4 | ACCEPTED | 0.05 s | details |
#5 | ACCEPTED | 0.05 s | details |
#6 | ACCEPTED | 0.05 s | details |
#7 | ACCEPTED | 0.05 s | details |
#8 | ACCEPTED | 0.06 s | details |
#9 | ACCEPTED | 0.05 s | details |
#10 | ACCEPTED | 0.05 s | details |
#11 | ACCEPTED | 0.05 s | details |
#12 | ACCEPTED | 0.05 s | details |
#13 | ACCEPTED | 0.06 s | details |
#14 | ACCEPTED | 0.06 s | details |
#15 | ACCEPTED | 0.06 s | details |
Compiler report
input/code.cpp: In function 'int main()': input/code.cpp:19:11: warning: array subscript has type 'char' [-Wchar-subscripts] x[s[0]]++; ^ input/code.cpp:20:15: warning: array subscript has type 'char' [-Wchar-subscripts] if (x[s[0]] == 5) c.push_back(s[0]); ^
Code
#include <bits/stdc++.h> #define ll long long #define INF 999999999 #define N (1<<17) #define M 1000000007 using namespace std; char x[255]; int main () { int n; cin>>n; vector<char> c; for (int i = 0; i < n; i++) { string s; cin>>s; x[s[0]]++; if (x[s[0]] == 5) c.push_back(s[0]); } sort(c.begin(), c.end()); if (c.empty()) cout<<"PREDAJA"; else for (char x : c) cout<<x; cout<<endl; }
Test details
Test 1
Verdict: ACCEPTED
input |
---|
18
babic keksic boric bukic ... |
correct output |
---|
bk |
user output |
---|
bk |
Test 2
Verdict: ACCEPTED
input |
---|
6
michael jordan lebron james ... |
correct output |
---|
PREDAJA |
user output |
---|
PREDAJA |
Test 3
Verdict: ACCEPTED
input |
---|
10
wmyrsaney raqdxrb cnwkmtcokgskaxosctzyks wlusaisfibbkwwzdqhezuj ... |
correct output |
---|
w |
user output |
---|
w |
Test 4
Verdict: ACCEPTED
input |
---|
20
jgztazpytubijfsmjz bokvgratzzdibku qineboilzoqdqivc bfctyltibtkbxq ... |
correct output |
---|
b |
user output |
---|
b |
Test 5
Verdict: ACCEPTED
input |
---|
50
wkrtpgfjmzlnqigogi knqkkelytfjgmyxgyzcfd xdkjrptlcuzwqgvrtzdbybh vscbjbji ... |
correct output |
---|
efv |
user output |
---|
efv |
Test 6
Verdict: ACCEPTED
input |
---|
100
cmksprocpmkl deyorcxeehlalonan tdoqxhvygiwbbklj rvamqpuprhynwduswppa ... |
correct output |
---|
dfqrt |
user output |
---|
dfqrt |
Test 7
Verdict: ACCEPTED
input |
---|
130
assootmfjtgcagtxh elqyysidg otuxclnjhvxdadm qmczmsgavvcboahqilzcuzm ... |
correct output |
---|
abcdefghijklmnopqrstuvwxyz |
user output |
---|
abcdefghijklmnopqrstuvwxyz |
Test 8
Verdict: ACCEPTED
input |
---|
60
ljuolrxkieqkobvikuyvt rhbrswllwycioayqjdertvb xmzcubmbbed uwgjslybqarciupgixt ... |
correct output |
---|
eflmnr |
user output |
---|
eflmnr |
Test 9
Verdict: ACCEPTED
input |
---|
5
pnmdjqteyiapkhvebbqtwnnh pirfyzgoqjsdsio pkcltfhwxemgyubef pxcjeh ... |
correct output |
---|
p |
user output |
---|
p |
Test 10
Verdict: ACCEPTED
input |
---|
20
fnuxegvwdqnkmkclmwlxeh kmurkl rlhxoacqadnzle foxonevsx ... |
correct output |
---|
PREDAJA |
user output |
---|
PREDAJA |
Test 11
Verdict: ACCEPTED
input |
---|
81
pidkcuqljmxi mcpwm zyyjrvkkkwkabwppvpm aoighmgashjtvl ... |
correct output |
---|
cegiptuwx |
user output |
---|
cegiptuwx |
Test 12
Verdict: ACCEPTED
input |
---|
100
evyottlutpqus openmtwnmme yvtgrk shhpzhlgmpnnvswcpmjqiwe ... |
correct output |
---|
PREDAJA |
user output |
---|
PREDAJA |
Test 13
Verdict: ACCEPTED
input |
---|
99
yuqgzaqmnwrghzntlv mcjkwfrkzchiauues uclswdwkhtvkcsvklyhyiw tggmfkr ... |
correct output |
---|
abeklmnqtvz |
user output |
---|
abeklmnqtvz |
Test 14
Verdict: ACCEPTED
input |
---|
4
kzyulnmhnmkowhtgrqksru xkgzlbwihowzdaodfg nvxkdrltxviwyhkf npvivwibxwrludfouga |
correct output |
---|
PREDAJA |
user output |
---|
PREDAJA |
Test 15
Verdict: ACCEPTED
input |
---|
78
qdidvlkgpxjxmuqq kgbugcncxazixwtxtww abwtlqxkrusaocu esjmgrutkzebklqt ... |
correct output |
---|
ajlstxz |
user output |
---|
ajlstxz |