QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#720842#9578. 爱上字典wsxcbWA 344ms25804kbC++17872b2024-11-07 14:23:572024-11-07 14:23:57

Judging History

你现在查看的是最新测评结果

  • [2024-11-07 14:23:57]
  • 评测
  • 测评结果:WA
  • 用时:344ms
  • 内存:25804kb
  • [2024-11-07 14:23:57]
  • 提交

answer

#include<bits/stdc++.h>
using namespace std;
#define ll long long
#define pb push_back
#define fi first
#define se second
typedef vector<vector<ll>> Mat;
//#define int long long
const int N=2000+10,mod=1e9+7,inf=1e9+1,P=998244353;
const double pi=acos(-1.0),esp=1e-9;
const ll INF=1e18;
void solve()
{
	string s;
	getline(cin,s);
	set<string>t;
	string a="";
	int n=s.size();
	for(int i=0;i<n;i++){
		if(s[i]>='A'&&s[i]<='Z'){
			s[i]+='a'-'A';
		}
		if(s[i]<'a'||s[i]>'z'){
			if(a.size()){
				t.insert(a);
				a="";
			}
		}else{
			a.pb(s[i]);
		}
	}
	int ans=t.size();
	cin>>n;
	while(n--){
		string s;
		cin>>s;
		if(t.find(s)!=t.end())ans--;
	}
	cout<<ans<<'\n';
}
signed main()
{
    ios::sync_with_stdio(false);
    cin.tie(0);cout.tie(0);
    int t=1;
    //cin>>t;
    while(t--)
        solve();
    return 0;
}

詳細信息

Test #1:

score: 100
Accepted
time: 0ms
memory: 3552kb

input:

I love Liaoning. Love Dalian!
1
love

output:

3

result:

ok single line: '3'

Test #2:

score: 0
Accepted
time: 0ms
memory: 3484kb

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: 3596kb

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: 328ms
memory: 24536kb

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: 325ms
memory: 25804kb

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: 334ms
memory: 24996kb

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: 329ms
memory: 24556kb

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: -100
Wrong Answer
time: 344ms
memory: 24580kb

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:

195776

result:

wrong answer 1st lines differ - expected: '195780', found: '195776'