Bro want views so who want answer then 回覆我 (300人氣 give answer)
肯定很多人會鬧我。
just 5 more add oil
ok 300 I will give answer now (next comment)
#include<iostream>
using namespace std;
int main()
{
int m, n;
while(cin>>n>>m){
if (n == 0 && m == 0) break;
string a, hole = "";
int q;
for (int i = 1;i <= n;i++)
{
cin>>a;
hole += a;
}
string ans = "";
for (int i = 1;i <= m;i++)
{
cin>>q;
ans += hole[q - 1];
}
cout<<ans<<endl;
}
return 0;
}
Bro want views so who want answer then 回覆我 (300人氣 give answer)
肯定很多人會鬧我。
just 5 more add oil
ok 300 I will give answer now (next comment)
#include using namespace std; int main() { int m, n; while(cin>>n>>m){ if (n == 0 && m == 0) break; string a, hole = ""; int q; for (int i = 1;i <= n;i++) { cin>>a; hole += a; } string ans = ""; for (int i = 1;i <= m;i++) { cin>>q; ans += hole[q - 1]; } cout<<ans<<endl; } return 0; }
ty :)
E01