我还以为是每个答案都多了1呢,害我提交一次QWQ
by Kiel @ 2018-05-03 18:26:59
@[something](/space/show?uid=84025)
那请问一下大佬你知道我错哪了吗(笑哭)
by trouble_ @ 2018-05-04 17:38:06
@[trouble_](/space/show?uid=68899) 不知
by Kiel @ 2018-05-04 17:39:40
@[trouble_](/space/show?uid=68899) 我很蒟
by Kiel @ 2018-05-04 17:40:06
@[something](/space/show?uid=84025)
呃呃
,那大佬你知道怎么随机生成字符且只能在E与F两个之内吗
by trouble_ @ 2018-05-04 17:44:35
@[trouble_](/space/show?uid=68899) 待会儿
by Kiel @ 2018-05-04 17:46:24
```cpp
#include<iostream>
#include<ctime>
using namespace std;
int main(){
srand(time(NULL));
int n;//生成个数
cin>>n;
for(int i=0;i<n;++i){
int a=rand()%2;
cout<<char(a+'E')<<endl;
}
return 0;
}
```
by Kiel @ 2018-05-04 17:49:31
@[trouble_](/space/show?uid=68899) 好了
by Kiel @ 2018-05-04 17:49:49
@[something](/space/show?uid=84025)
大佬我知道哪里错了
就是我在合并敌人时只合并了x的敌人,但根据题意y的敌人也需要合并
不过我还是想知道如何随机生成子母(滑稽),嘿嘿,谢谢啦!!!
by trouble_ @ 2018-05-04 17:50:00
@[trouble_](/space/show?uid=68899) 哦,我是蒟蒻ya,(-.-)
by Kiel @ 2018-05-04 17:51:10