QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#715975 | #9578. 爱上字典 | qzez# | WA | 2ms | 19612kb | C++14 | 952b | 2024-11-06 13:58:10 | 2024-11-06 13:58:11 |
Judging History
answer
#include <bits/stdc++.h>
using namespace std;
const int maxn=500006;
int read(){
int ret=0,f=1;char ch=getchar();
while(!isdigit(ch)){if(ch=='-')f=-f;ch=getchar();}
while( isdigit(ch)){ret=(ret<<3)+(ret<<1)+(ch&15);ch=getchar();}
return ret*f;
}
string s[maxn],c;
set<string> mp;
int n,num;
int main(){
while(1){
cin>>c;
int len=c.length();
if(isdigit(c[0])){
for(int i=0;i<len;++i){
n=n*10+c[i]-'0';
}
break;
}
++num;
if(isupper(c[0])) c[0]=c[0]-'A'+'a';
for(int i=0;i<len;++i){
s[num]=s[num]+c[i];
}
}
for(int i=1;i<=n;++i){
cin>>c;
mp.insert(c);
}
int ans=0;
for(int i=1;i<=num;++i){
if(mp.find(s[i])==mp.end()){
mp.insert(s[i]);
ans++;
}
}
printf("%d\n",ans);
return 0;
}
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 100
Accepted
time: 2ms
memory: 19612kb
input:
I love Liaoning. Love Dalian! 1 love
output:
3
result:
ok single line: '3'
Test #2:
score: -100
Wrong Answer
time: 0ms
memory: 19328kb
input:
Sulfox Loves Furry! Fur fur Furred. 2 anthropomorphic furry
output:
5
result:
wrong answer 1st lines differ - expected: '4', found: '5'