当前位置:网站首页>3048. Number of words
3048. Number of words
2022-07-02 02:54:00 【Python ml】
#include <iostream>
using namespace std;
int main() {
int n;
cin>>n;
getchar();
for(int i=0;i<n;i++){
string s,t,temp;
getline(cin,s);
getline(cin,t);
int cnt=0;
for(int j=0;j<s.length();j++){
if(isalnum(s[j]))
temp+=s[j];
if(!isalnum(s[j])||j==s.length()-1){
if(temp==t) cnt++;
temp="";
}
}
printf("case #%d:\n%d\n",i,cnt);
}
return 0;
}
边栏推荐
- Face++ realizes face detection in the way of flow
- Which brand of sports headset is better? Bluetooth headset suitable for sports
- [reading notes] programmer training manual - practical learning is the most effective (project driven)
- Principle of computer composition - interview questions for postgraduate entrance examination (review outline, key points and reference)
- Set status bar color
- Golang configure export goprivate to pull private library code
- MVVM and MVC
- MongoDB非关系型数据库
- JVM面试篇
- tarjan2
猜你喜欢
Batch detect whether there is CDN in URL - high accuracy
【读书笔记】程序员修炼手册—实战式学习最有效(项目驱动)
CoordinatorLayout + TabLayout + ViewPager2(里面再嵌套一个RecyclerView),RecyclerView的滑动冲突解决
连通块模板及变式(共4题)
[question 008: what is UV in unity?]
SAP ui5 beginner tutorial 19 - SAP ui5 data types and complex data binding
[JVM] detailed description of the process of creating objects
The capacity is upgraded again, and the new 256gb large capacity specification of Lexar rexa 2000x memory card is added
Force deduction daily question 540 A single element in an ordered array
Leetcode question brushing (10) - sequential question brushing 46 to 50
随机推荐
2022-2028 global deep sea generator controller industry research and trend analysis report
[question 008: what is UV in unity?]
[JVM] detailed description of the process of creating objects
C # use system data. The split mixed mode assembly is generated for the "v2.0.50727" version of the runtime, and it cannot be loaded in the 4.0 runtime without configuring other information
2022-2028 global soft capsule manufacturing machine industry research and trend analysis report
Basic 01: print string
[untitled]
[staff] pitch representation (treble clef | C3 60 ~ B3 71 pitch representation | C4 72 pitch representation | C5 84 pitch representation)
[learn C and fly] 2day Chapter 8 pointer (practice 8.1 password unlocking)
Which brand of running headphones is good? How many professional running headphones are recommended
2022低压电工考试题模拟考试题库模拟考试平台操作
GB/T-2423. XX environmental test documents, including the latest documents
Use usedeferredvalue for asynchronous rendering
What are the characteristics of common web proxy IP
PHP notes - use Smarty to set public pages (include, if, else, variable settings)
[punch in questions] integrated daily 5-question sharing (phase II)
Principle of computer composition - interview questions for postgraduate entrance examination (review outline, key points and reference)
Set status bar color
多线程查询,效率翻倍
Baohong industry | what misunderstandings should we pay attention to when diversifying investment