QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#722424 | #9578. 爱上字典 | oqmsac | AC ✓ | 297ms | 24600kb | C++23 | 1.1kb | 2024-11-07 18:59:11 | 2024-11-07 18:59:11 |
Judging History
answer
#include<bits/stdc++.h>
#define ll long long
#define ull unsigned long long
#define ld long double
#define pii pair<ll,ll>
using namespace std;
//#pragma GCC optimize(3)
const ll inf =(1ll<<50);
#define N 1000005
#define M 998244353
#define M1 1000000007
#define M2 1000000009
char ss[5000010];
int main()
{
// ios::sync_with_stdio(0);
// cin.tie(0);
// cout.tie(0);
cin.getline(ss,(ll)(5e6+5),'\n');
// gets(ss);
// cerr<<1<<endl;
string s;
map<string,ll> book;
ll n;
cin>>n;
for(int i=0;i<n;i++)
{
cin>>s;
book[s]=1;
}
ll p=0,l=strlen(ss),ans=0;
string t;
while(p<l)
{
t.clear();
while(p<l&&!isalpha(ss[p])) p++;
while(p<l&&isalpha(ss[p])) {
t+=tolower(ss[p]);
p++;
}
// cerr<<t<<endl;
if(!t.empty())
{
if(!book[t])
{
book[t]=1;
// cerr<<t<<endl;
ans++;
}
}
}
cout<<ans<<endl;
return 0;
}
//1 5
//32 32 15 15 15
这程序好像有点Bug,我给组数据试试?
詳細信息
Test #1:
score: 100
Accepted
time: 0ms
memory: 3576kb
input:
I love Liaoning. Love Dalian! 1 love
output:
3
result:
ok single line: '3'
Test #2:
score: 0
Accepted
time: 0ms
memory: 3476kb
input:
Sulfox Loves Furry! Fur fur Furred. 2 anthropomorphic furry
output:
4
result:
ok single line: '4'
Test #3:
score: 0
Accepted
time: 0ms
memory: 3600kb
input:
Ginkgo leaves dance lightly and fall, reflecting the autumn light on the golden ground. Time is as peaceful as when we first met. 5 ginkgo reflect is as we
output:
17
result:
ok single line: '17'
Test #4:
score: 0
Accepted
time: 292ms
memory: 24600kb
input:
Eunuchism overterrible furbelow gantlet. Sophism thyroiditis thermoelectricity hassel misreward Barolong biradiated? Sweetie fatal delinquence unseemlily beamish inwork, azyme kamias Hans asteatosis synderesis champleve cheth? Dinitrile podial presentee! Waxmaker scleroscope ratably hectography lamp...
output:
201961
result:
ok single line: '201961'
Test #5:
score: 0
Accepted
time: 288ms
memory: 24444kb
input:
Unsubsidiary unsacrificeable hacking colberter pseudoappendicitis rufescence tumbak? Hypocrize aithochroi. Spina machar proximation? Chaperone vermicide virescent Klan preplacental unabsolvedness Sarcosporida noveletter waspishness sponge trustle bistetrazole prepositure melamed, cinephone. Physopho...
output:
201951
result:
ok single line: '201951'
Test #6:
score: 0
Accepted
time: 290ms
memory: 24432kb
input:
Baikerite discontentful semicitizen Acoemetic veracity pretechnical bloodweed cytogenetic icebound disrelishable leader meltedness heroship sciniph gunsel fatalistically unreasoned anticatarrhal? Unmentioned! Overaddiction broomy misapplication hecte inflammable disheart dicaryon blacktail prisonabl...
output:
201759
result:
ok single line: '201759'
Test #7:
score: 0
Accepted
time: 297ms
memory: 24452kb
input:
Dizoic filtering damenization bistipuled Opisthothelae multiangular blaff mortally. Perfusive alkaptonuria possessorial coinstantaneousness Stanhopea Nascan. Ankylostoma aumil oxygenicity cubhood abandonee fishman poppy pickpole synkinesis arteriosclerosis coloproctitis prematrimonial pseudoviaduct ...
output:
202281
result:
ok single line: '202281'
Test #8:
score: 0
Accepted
time: 293ms
memory: 24112kb
input:
Thelorrhagia me Camaldulian Menfra me drugman pneumonolithiasis, fructose me inwit caubeen manchet! Enjeopardy me quindecennial me unrecompensable creaturize undiverting bitty dama interteam curfew excedent me me. Revealingness Nipponism opticity suwe me stilty me antiquarism Iacchic me contrapuntal...
output:
195780
result:
ok single line: '195780'
Test #9:
score: 0
Accepted
time: 135ms
memory: 8636kb
input:
Me me me me me me me me me me me me me me me. Me me. Me. Me me me me? Me me me me me me me me, me me! Me me. Me me me me me me me me me! Me me? Me me, me? Me me me me me me me me me, me me me me me? Me, me me me me me me me me me me me me me me me me? Me me me. Me me me me me, me me me me me me me! ...
output:
0
result:
ok single line: '0'
Test #10:
score: 0
Accepted
time: 91ms
memory: 8696kb
input:
Me me? Me me me me me me me me me me me, me me me. Me me me me me me me me me me me me me. Me, me me me me me me me me. Me me me me me me me me me me. Me me me me me me me me me me me me me! Me! Me me me! Me me me me me! Me me me me me me me me me me me! Me me me me me me? Me me me me me me. Me me m...
output:
0
result:
ok single line: '0'
Test #11:
score: 0
Accepted
time: 287ms
memory: 23916kb
input:
Subsemitone me pauperdom me amphopeptone me Keplerian isopolity premaniacal logia, unseducible gulper heterostylism contumeliously prevenience, clientry theurgically supportive. Me gossipiness lately electrooptic. Me. Me, boding, putrefacient unendowing hypercryalgesia me me pluviographic Elohist me...
output:
195507
result:
ok single line: '195507'
Test #12:
score: 0
Accepted
time: 0ms
memory: 3632kb
input:
I am a cat and an ant? An ape! And Imp. And imp Is I. 3 an industrialization is
output:
8
result:
ok single line: '8'
Test #13:
score: 0
Accepted
time: 0ms
memory: 3600kb
input:
Okay. 0
output:
1
result:
ok single line: '1'
Extra Test:
score: 0
Extra Test Passed