40分求调
查看原帖
40分求调
937942
wuhan123456楼主2023/8/20 14:32
#include<bits/stdc++.h>
using namespace std;
string s[10010],s1[10010];
long long ans,t;
int main(){
    ios::sync_with_stdio(false);
    int n=1,m=1;
	while(getline(cin,s[n])){
		if(s[n]=="EOF")break;
		n++;
	}
	while(getline(cin,s1[m])){
		if(s1[m]=="EOF")break;
		m++;
	}
	for(int i=1,j=1;i<n,j<m;i++,j++){
		for(int x=0,y=0;x<s[i].size(),y<s1[i].size();x++,y++){
			while(s1[j][y]=='<'){
				s1[j].erase(y-1,2);
			}if(s[i][x]==s1[j][y]){
				ans++;
			}
		}
	}cin>>t;
	cout<<round(ans*60.0/t);
	return 0;
	}
2023/8/20 14:32
加载中...