#37858: 第六行WA找不出問題


b11123052@gemail.yuntech.edu.t ... (蕭宇為)

學校 : 不指定學校
編號 : 230197
來源 : [49.217.64.241]
最後登入時間 :
2023-10-25 23:22:48
c045. 00490 - Rotating Sentences -- UVa490 | From: [49.217.199.201] | 發表日期 : 2023-10-14 16:39

#include<bits/stdc++.h>
using namespace std;
int main(){
vector<string>v[100];
string s;
int c = 0, m=0;
while(getline(cin, s)){
v[c].push_back(s);
if(v[c][0].size()>m){
m = v[c][0].size();
}
c++;
}
for(int i = 0; i < m; i++){
    int t = 0, w = 0;
for(int j = c-1; j >= 0; j--){
if(i<v[j][0].size()){
cout<<v[j][0][i];
w=1;
}else if(w==0){
cout<<' ';
}
}
cout<<endl;
}
}
 
#37976: Re: 第六行WA找不出問題


cges30901 (cges30901)

學校 : 不指定學校
編號 : 30877
來源 : [101.136.203.77]
最後登入時間 :
2024-04-07 15:34:14
c045. 00490 - Rotating Sentences -- UVa490 | From: [101.136.245.119] | 發表日期 : 2023-10-21 20:51

 
else if(w==0)
 


改成else

 
ZeroJudge Forum