炸求调
  • 板块学术版
  • 楼主YWJ20140130
  • 当前回复0
  • 已保存回复0
  • 发布时间2024/11/20 07:55
  • 上次更新2024/11/20 13:32:51
查看原帖
炸求调
1241319
YWJ20140130楼主2024/11/20 07:55
#include<bits/stdc++.h>
#define io ios::sync_with_stdio(false);cin.tie(0);cout.tie(0);
using namespace std;
#define N 101
int c = 0, v = 0;
struct item {
	string name;
	int i;
	void make(string u) {
		name = u;
		i = 0;
	}
} s[N];
struct synthesistable {
#define maxx 3
	string synthesis[maxx][maxx];
	string name;
	void make(string synthesi[maxx][maxx], string na) {
		for (int i = 0; i < maxx; i++)
			for (int j = 0; j < maxx; j++)
				for (int k = 0; k < N; k++)
					synthesis[i][j][k] = synthesi[i][j][k];
		name = na;
		if (s[v - 1].name != na) s[v++].make(na);
	}
	void print() {
		printf("name:%s\n", name.c_str());
		for (int i = 0; i < maxx; i++) {
			for (int j = 0; j < maxx; j++) printf("%s\t", synthesis[i][j].c_str());
			printf("\n");
		}
		printf("\n");
	}
} synthe[N];
int mon = 0, day = 0;
void makesynttt() {
	//iron
	string iron_pickaxe[maxx][maxx] = {"iron", "iron", "iron", "air", "stick", "air", "air", "stick", "air"};
	synthe[c++].make(iron_pickaxe, "iron_pickaxe");
	string iron_axe1[maxx][maxx] = {"air", "iron", "iron", "air", "stick", "iron", "air", "stick", "air"};
	synthe[c++].make(iron_axe1, "iron_axe");
	string iron_axe2[maxx][maxx] = {"iron", "iron", "air", "iron", "stick", "air", "air", "stick", "air"};
	synthe[c++].make(iron_axe2, "iron_axe");
	string iron_shovel[maxx][maxx] = {"air", "iron", "air", "air", "stick", "air", "air", "stick", "air"};
	synthe[c++].make(iron_shovel, "iron_shovel");
	string iron_hoe1[maxx][maxx] = {"iron", "iron", "air", "air", "stick", "air", "air", "stick", "air"};
	synthe[c++].make(iron_hoe1, "iron_hoe");
	string iron_hoe2[maxx][maxx] = {"air", "iron", "iron", "air", "stick", "air", "air", "stick", "air"};
	synthe[c++].make(iron_hoe2, "iron_hoe");
	//gold
	string gold_pickaxe[maxx][maxx] = {"gold", "gold", "gold", "air", "stick", "air", "air", "stick", "air"};
	synthe[c++].make(gold_pickaxe, "gold_pickaxe");
	string gold_axe1[maxx][maxx] = {"air", "gold", "gold", "air", "stick", "gold", "air", "stick", "air"};
	synthe[c++].make(gold_axe1, "gold_axe");
	string gold_axe2[maxx][maxx] = {"gold", "gold", "air", "gold", "stick", "air", "air", "stick", "air"};
	synthe[c++].make(gold_axe2, "gold_axe");
	string gold_shovel[maxx][maxx] = {"air", "gold", "air", "air", "stick", "air", "air", "stick", "air"};
	synthe[c++].make(gold_shovel, "gold_shovel");
	string gold_hoe1[maxx][maxx] = {"gold", "gold", "air", "air", "stick", "air", "air", "stick", "air"};
	synthe[c++].make(gold_hoe1, "gold_hoe");
	string gold_hoe2[maxx][maxx] = {"air", "gold", "gold", "air", "stick", "air", "air", "stick", "air"};
	synthe[c++].make(gold_hoe2, "gold_hoe");
	//copper
	string copper_pickaxe[maxx][maxx] = {"copper", "copper", "copper", "air", "stick", "air", "air", "stick", "air"};
	synthe[c++].make(copper_pickaxe, "copper_pickaxe");
	string copper_axe1[maxx][maxx] = {"air", "copper", "copper", "air", "stick", "copper", "air", "stick", "air"};
	synthe[c++].make(copper_axe1, "copper_axe");
	string copper_axe2[maxx][maxx] = {"copper", "copper", "air", "copper", "stick", "air", "air", "stick", "air"};
	synthe[c++].make(copper_axe2, "copper_axe");
	string copper_shovel[maxx][maxx] = {"air", "copper", "air", "air", "stick", "air", "air", "stick", "air"};
	synthe[c++].make(copper_shovel, "copper_shovel");
	string copper_hoe1[maxx][maxx] = {"copper", "copper", "air", "air", "stick", "air", "air", "stick", "air"};
	synthe[c++].make(copper_hoe1, "copper_hoe");
	string copper_hoe2[maxx][maxx] = {"air", "copper", "copper", "air", "stick", "air", "air", "stick", "air"};
	synthe[c++].make(copper_hoe2, "copper_hoe");
	//diamond
	string diamond_pickaxe[maxx][maxx] = {"diamond", "diamond", "diamond", "air", "stick", "air", "air", "stick", "air"};
	synthe[c++].make(diamond_pickaxe, "diamond_pickaxe");
	string diamond_axe1[maxx][maxx] = {"air", "diamond", "diamond", "air", "stick", "diamond", "air", "stick", "air"};
	synthe[c++].make(diamond_axe1, "diamond_axe");
	string diamond_axe2[maxx][maxx] = {"diamond", "diamond", "air", "diamond", "stick", "air", "air", "stick", "air"};
	synthe[c++].make(diamond_axe2, "diamond_axe");
	string diamond_shovel[maxx][maxx] = {"air", "diamond", "air", "air", "stick", "air", "air", "stick", "air"};
	synthe[c++].make(diamond_shovel, "diamond_shovel");
	string diamond_hoe1[maxx][maxx] = {"diamond", "diamond", "air", "air", "stick", "air", "air", "stick", "air"};
	synthe[c++].make(diamond_hoe1, "diamond_hoe");
	string diamond_hoe2[maxx][maxx] = {"air", "diamond", "diamond", "air", "stick", "air", "air", "stick", "air"};
	synthe[c++].make(diamond_hoe2, "diamond_hoe");
	//block
	string iron_block[maxx][maxx] = {"iron", "iron", "iron", "iron", "iron", "iron", "iron", "iron", "iron"};
	synthe[c++].make(iron_block, "iron_block");
	string gold_block[maxx][maxx] = {"gold", "gold", "gold", "gold", "gold", "gold", "gold", "gold", "gold",};
	synthe[c++].make(gold_block, "gold_block");
	string copper_block[maxx][maxx] = {"copper", "copper", "copper", "copper", "copper", "copper", "copper", "copper", "copper",};
	synthe[c++].make(copper_block, "copper_block");
	string diamond_block[maxx][maxx] = {"diamond", "diamond", "diamond", "diamond", "diamond", "diamond", "diamond", "diamond", "diamond",};
	synthe[c++].make(diamond_block, "diamond_block");
	//other
	string lightning_rod[maxx][maxx] = {"air", "copper", "air", "air", "copper", "air", "air", "copper", "air"};
	synthe[c++].make(lightning_rod, "lightning_rod");
	string bucket1[maxx][maxx] = {"iron", "air", "iron", "air", "iron", "air", "air", "air", "air"};
	synthe[c++].make(bucket1, "bucket");
	string bucket2[maxx][maxx] = {"air", "air", "air", "iron", "air", "iron", "air", "iron", "air"};
	synthe[c++].make(bucket2, "bucket");
	string stick1[maxx][maxx] = {"air", "plank", "air", "air", "plank", "air", "air", "air", "air"};
	synthe[c++].make(stick1, "stick");
	string stick2[maxx][maxx] = {"air", "air", "air", "air", "plank", "air", "air", "plank", "air"};
	synthe[c++].make(stick2, "stick");

	string plank1[maxx][maxx] = { "wood", "air", "air", "air", "air", "air", "air", "air", "air"};
	synthe[c++].make(plank1, "plank");
	string plank2[maxx][maxx] = { "air", "wood", "air", "air", "air", "air", "air", "air", "air"};
	synthe[c++].make(plank2, "plank");
	string plank3[maxx][maxx] = { "air", "air", "wood", "air", "air", "air", "air", "air", "air"};
	synthe[c++].make(plank3, "plank");
	string plank4[maxx][maxx] = { "air", "air", "air", "wood", "air", "air", "air", "air", "air"};
	synthe[c++].make(plank4, "plank");
	string plank5[maxx][maxx] = { "air", "air", "air", "air", "wood", "air", "air", "air", "air"};
	synthe[c++].make(plank5, "plank");
	string plank6[maxx][maxx] = { "air", "air", "air", "air", "air", "wood", "air", "air", "air"};
	synthe[c++].make(plank6, "plank");
	string plank7[maxx][maxx] = { "air", "air", "air", "air", "air", "air", "wood", "air", "air"};
	synthe[c++].make(plank7, "plank");
	string plank8[maxx][maxx] = { "air", "air", "air", "air", "air", "air", "air", "wood", "air"};
	synthe[c++].make(plank8, "plank");
	string plank9[maxx][maxx] = { "air", "air", "air", "air", "air", "air", "air", "air", "wood"};
	synthe[c++].make(plank9, "plank");
	//item
	s[v++].make("iron");
	s[v++].make("gold");
	s[v++].make("copper");
	s[v++].make("diamond");
	s[v++].make("wood");
}
//void write_file() {
//	fstream f("tjp.dat");
//	for (int i = 0; i < v; i++) f << s[i].i << ' ';
//	f << mon << ' ' << day;
//}
//void read_file() {
//	fstream f("tjp.dat");
//	if (!f) {
//		ofstream make("tjp.dat");
//		make.close();
//		for (int i = 0; i < v; i++) f << 0 << ' ';
//		f << 0 << ' ' << 0;
//	}
//	for (int i = 0; i < v; i++) f >> s[i].i;
//	f >> mon >> day;
//}
void print_open() {
	
}
int main() {
	io
	makesynttt();
	for (int i = 0; i < c; i++) synthe[i].print();
	for (int i = 0; i < v; i++) printf("%s\n", s[i].name.c_str());
//	read_file();
	return 0;
}

想自己做一个铁匠铺传奇的,但是在运行的时候string iron_pickaxe[maxx][maxx] = {"iron", "iron", "iron", "air", "stick", "air", "air", "stick", "air"};炸了

2024/11/20 07:55
加载中...