CSES - Leirikisa 2 - Results
Submission details
Task:Merkkijono
Sender:ollpu
Submission time:2016-07-28 14:52:51 +0300
Language:C++
Status:READY
Result:100
Feedback
groupverdictscore
#1ACCEPTED100
Test results
testverdicttime
#1ACCEPTED0.03 sdetails
#2ACCEPTED0.04 sdetails
#3ACCEPTED0.05 sdetails
#4ACCEPTED0.04 sdetails
#5ACCEPTED0.03 sdetails
#6ACCEPTED0.05 sdetails
#7ACCEPTED0.05 sdetails
#8ACCEPTED0.03 sdetails
#9ACCEPTED0.04 sdetails
#10ACCEPTED0.05 sdetails

Code

#include <iostream>

using namespace std;
int o[26];
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  string s;
  cin >> s;
  int res = 0;
  for (char c : s) {
    if (o[c-'a'] == 0) res++;
    o[c-'a']++;
  }
  cout << res;
}

Test details

Test 1

Verdict: ACCEPTED

input
aaabbbbabaabaaabababbbabaaabaa...

correct output
2

user output
2

Test 2

Verdict: ACCEPTED

input
cbacacddaddbacbbdaddddbcbdabbd...

correct output
4

user output
4

Test 3

Verdict: ACCEPTED

input
cdaghhhaeffdeaebghdeddaabeefcf...

correct output
8

user output
8

Test 4

Verdict: ACCEPTED

input
nliffndcjfogbocabfmihaafkmofom...

correct output
16

user output
16

Test 5

Verdict: ACCEPTED

input
qgfshyfgzmtfhwxwumpjbvndunxnlv...

correct output
26

user output
26

Test 6

Verdict: ACCEPTED

input
bbbbbaaabbbbabaaabaabbaaaaaaaa...

correct output
2

user output
2

Test 7

Verdict: ACCEPTED

input
bdadabbdacabbcaadccbccdcccdcbc...

correct output
4

user output
4

Test 8

Verdict: ACCEPTED

input
eabdafcbhfhbbhgecadhbcababeccc...

correct output
8

user output
8

Test 9

Verdict: ACCEPTED

input
nkcaadeckamdecneoeedeajpoodhjo...

correct output
16

user output
16

Test 10

Verdict: ACCEPTED

input
tgagtoqkawzqmbngjfspaielslkjhi...

correct output
26

user output
26