Task: | Sanalista |
Sender: | Anttono |
Submission time: | 2020-09-28 11:02:09 +0300 |
Language: | C++ (C++11) |
Status: | READY |
Result: | 100 |
group | verdict | score |
---|---|---|
#1 | ACCEPTED | 100 |
test | verdict | time | |
---|---|---|---|
#1 | ACCEPTED | 0.01 s | details |
#2 | ACCEPTED | 0.01 s | details |
#3 | ACCEPTED | 0.01 s | details |
Compiler report
input/code.cpp: In function 'int main()': input/code.cpp:18:18: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for(int i=0;i<s.size();i++) ~^~~~~~~~~ input/code.cpp:22:22: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for(int j=0;j<s[i].length();j++) ~^~~~~~~~~~~~~~ input/code.cpp:25:26: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for(int k=0;k<c.size();k++) ~^~~~~~~~~ input/code.cpp:41:22: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for(int j=0;j<a.size();j++) ~^~~~~~~~~
Code
#include <bits/stdc++.h> using namespace std; int n; vector<string> s; int main() { cin>>n; string x; for(int i=0;i<n;i++) { cin>>x; s.push_back(x); } int r=0; for(int i=0;i<s.size();i++) { vector<char> c; vector<int> a; for(int j=0;j<s[i].length();j++) { bool f = false; for(int k=0;k<c.size();k++) { if(c[k]==s[i][j]) { f=true; a[k]++; break; } } if(!f) { c.push_back(s[i][j]); a.push_back(1); } } bool ac=true; for(int j=0;j<a.size();j++) { if(a[j]%2!=0) { ac=false; break; } } if(ac) r++; } cout<<r; }
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 |