CSES - Datatähti 2021 alku - Results
Submission details
Task:Sanalista
Sender:Epe
Submission time:2020-10-12 02:09:19 +0300
Language:C++ (C++17)
Status:READY
Result:100
Feedback
groupverdictscore
#1ACCEPTED100
Test results
testverdicttime
#1ACCEPTED0.01 sdetails
#2ACCEPTED0.01 sdetails
#3ACCEPTED0.01 sdetails

Compiler report

input/code.cpp:3:26: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
 main(int n, int x, char c){cin>>n;x=(n++);bool a['\u001A']={0x0};while(n--){ while((c = getchar_unlocked()) > '`') a[c-97]^=1;for(int i = 0; i < 26; i++)if(a[i]){x--;bzero(a+i,26-i);break;}}cout<<x<<endl;}
                          ^
input/code.cpp:3:1: warning: second argument of 'int main(int, int, char)' should be 'char **' [-Wmain]
 main(int n, int x, char c){cin>>n;x=(n++);bool a['\u001A']={0x0};while(n--){ while((c = getchar_unlocked()) > '`') a[c-97]^=1;for(int i = 0; i < 26; i++)if(a[i]){x--;bzero(a+i,26-i);break;}}cout<<x<<endl;}
 ^~~~
input/code.cpp:3:1: warning: third argument of 'int main(int, int, char)' should probably be 'char **' [-Wmain]

Code

#include <bits/stdc++.h>
using namespace std;
main(int n, int x, char c){cin>>n;x=(n++);bool a['\u001A']={0x0};while(n--){ while((c = getchar_unlocked()) > '`') a[c-97]^=1;for(int i = 0; i < 26; i++)if(a[i]){x--;bzero(a+i,26-i);break;}}cout<<x<<endl;}

Test details

Test 1

Verdict: ACCEPTED

input
1000
korvata
sopimusaika
nuhatartunta
korttiautomaatti
...

correct output
15

user output
15

Test 2

Verdict: ACCEPTED

input
1000
pub
hansikaslokero
erikoisvalmisteinen
unijukka
...

correct output
42

user output
42

Test 3

Verdict: ACCEPTED

input
1000
haapalastu
toipumisaika
mustalaiskieli
taidelainaamo
...

correct output
70

user output
70