~~年已经过过了~~
by chenxia25 @ 2020-02-24 13:43:59
@[chenxia25](/user/138400) QAQ哈哈哈
by 新一君 @ 2020-02-24 13:46:23
我不是大佬,所以请等楼下的大佬来帮忙。
by Monkey_Hunter @ 2020-02-24 13:47:30
string+map了解一下
by Trinitrotoluene @ 2020-02-24 13:47:40
@[Trinitrotoluene](/user/141555) QAQ本人是蒟蒻~~~~
by 新一君 @ 2020-02-24 13:51:54
STL
by long_long @ 2020-02-24 13:52:46
```cpp
#include<bits/stdc++.h>
using namespace std;
struct P{
string name;
}a[15];
int n;
int f(string s)
{
for(int i=1;i<=n;i++)
{
if(a[i].name==s)
{
return i;
}
}
}
int main()
{
cin>>n;
for(int i=1;i<=n;i++)
{
cin>>a[i].name;
}
int t=n;
while(t--)
{
string s1;
int s,m;
cin>>s1>>s>>m;
}
for(int i=1;i<=n;i++)
{
cout<<f(a[].name)<<endl;
}
return 0;
}
```
介里应该不是a[i],求大佬改下
by 新一君 @ 2020-02-24 13:53:32
@[long_long](/user/246104) 可以帮忙改下我的代码吗QAQ目前蒟蒻在学模拟QAQ
by 新一君 @ 2020-02-24 13:54:12
@[新一君](/user/58904) 在线等(托腮)
by 新一君 @ 2020-02-24 13:57:17
大佬们都不在吗QAQ那我明天再来
by 新一君 @ 2020-02-24 14:06:22