玩具谜题 未完成
#include<iostream>
#include<cstdio>
using namespace std;
struct node
{
int zt;//表示小人的狀態 0朝向圈內 1朝向圈外
char name[1001];
}a[10001];//小人
struct zl
{
int fx;//表示該條指令所指的方向 0向左 1向外
int bs;//在該方向上所走的步數
}b[10001];
string
int main()
{
int n;//小人個數
int m;//指令個數
for(int i=1;i<=n;i++)
{
cin>>a[i].zt;
scanf("%s",a[i].name);
}
for(int i=1;i<=m;i++)
{
cin>>b[i].fx;
cin>>b[i].bs;
}
int tot=1;//表示此時已經進行了now條指令
while(tot!=m+1)
{
if([b[tot].fx==0])//向左
{
}
else if(b[tot].fx==1)//向右
{
}
}
return 0;
}
總結
- 上一篇: python-文件基本操作(二)
- 下一篇: 为什么 WebAssembly 更快?