當(dāng)前位置:
首頁 >
玩具谜题 未完成
發(fā)布時(shí)間:2025/7/14
43
豆豆
#include<iostream>
#include<cstdio>
using namespace std;
struct node
{
int zt;//表示小人的狀態(tài) 0朝向圈內(nèi) 1朝向圈外
char name[1001];
}a[10001];//小人
struct zl
{
int fx;//表示該條指令所指的方向 0向左 1向外
int bs;//在該方向上所走的步數(shù)
}b[10001];
string
int main()
{
int n;//小人個(gè)數(shù)
int m;//指令個(gè)數(shù)
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;//表示此時(shí)已經(jīng)進(jìn)行了now條指令
while(tot!=m+1)
{
if([b[tot].fx==0])//向左
{
}
else if(b[tot].fx==1)//向右
{
}
}
return 0;
}
總結(jié)
- 上一篇: python-文件基本操作(二)
- 下一篇: 为什么 WebAssembly 更快?