更新 '3.2.cpp'
This commit is contained in:
parent
ac37db4028
commit
2e6af953f7
9
3.2.cpp
9
3.2.cpp
@ -167,6 +167,7 @@ int main()
|
|||||||
int szCity=city_vec.size();
|
int szCity=city_vec.size();
|
||||||
int szJob=job_vec.size();
|
int szJob=job_vec.size();
|
||||||
|
|
||||||
|
cout<<"szCity: "<<szCity<<" szJob: "<<szJob<<endl;
|
||||||
|
|
||||||
for(int i=0;i<szCity;i++)
|
for(int i=0;i<szCity;i++)
|
||||||
{
|
{
|
||||||
@ -175,9 +176,9 @@ int main()
|
|||||||
cout<<"i:"<<i<<"("<<city_vec[i].first<<") j:"<<j<<"("<<job_vec[j].first<<") "<<endl;
|
cout<<"i:"<<i<<"("<<city_vec[i].first<<") j:"<<j<<"("<<job_vec[j].first<<") "<<endl;
|
||||||
|
|
||||||
ostringstream ostm;
|
ostringstream ostm;
|
||||||
ostm << "select count(*) from lagou_job where ( (job_city = '"
|
ostm << "select count(*) from lagou_job where ( (job_city like '%"
|
||||||
<<city_vec[i].first
|
<<city_vec[i].first
|
||||||
<<"' ) and (title like '%"
|
<<"%' ) and (title like '%"
|
||||||
<<job_vec[j].first <<"%'))";
|
<<job_vec[j].first <<"%'))";
|
||||||
|
|
||||||
string cmd=ostm.str();
|
string cmd=ostm.str();
|
||||||
@ -200,9 +201,9 @@ int main()
|
|||||||
|
|
||||||
|
|
||||||
ostm.str("");
|
ostm.str("");
|
||||||
ostm << "select count(*) from pages where ( (job_city = '"
|
ostm << "select count(*) from pages where ( (job_city like '%"
|
||||||
<<city_vec[i].first
|
<<city_vec[i].first
|
||||||
<<"' ) and (title like '%"
|
<<"%' ) and (title like '%"
|
||||||
<<job_vec[j].first <<"%'))";
|
<<job_vec[j].first <<"%'))";
|
||||||
|
|
||||||
cmd=ostm.str();
|
cmd=ostm.str();
|
||||||
|
Reference in New Issue
Block a user