RT.
今天在写题的时候,发现正常编译的程序突然无法运行(如图),请各位大佬帮忙看看是什么原因?
附代码:
#include<iostream>
#include<string>
std::string s;
char c1[10005][100005];
char c2[10005][100005];
long long cnt;
long long to_int(double __x){
long long tmp=__x;
if(tmp+0.5>=__x){
return tmp+1;
}
return tmp;
}
int main(){
freopen("P5587.in","r",stdin);
freopen("P5587.out","w",stdout);
for(int i=1;;i++){
std::getline(std::cin,s);
if(s=="EOF"){
break;
}
int now=0;
for(auto c:s){
if(c=='<'){
if(now>0){
now--;
c1[i][now]=0;
}
continue;
}
c1[i][now]=c;
now++;
}
}
for(int i=1;;i++){
std::getline(std::cin,s);
if(s=="EOF"){
break;
}
int now=0;
for(auto c:s){
if(c=='<'){
if(now>0){
now--;
c2[i][now]=0;
}
continue;
}
c2[i][now]=c;
now++;
}
for(int j=0;c1[i][j]!=0;j++){
if(c1[i][j]==c2[i][j]){
cnt++;
}
}
}
double t;
std::cin>>t;
std::cout<<to_int(60*cnt/t)<<std::endl;
return 0;
}