Commit b5163502 authored by makoto.nishizawa's avatar makoto.nishizawa
Browse files

change solver

parent ad6fb437
Loading
Loading
Loading
Loading
+11 −11
Changes for Makefile: 11 added lines, 11 removed lines.
Original line number Diff line number Diff line
TARGET = sim
OBJS = $(CPPS:.cpp=.o)
CPPS = $(wildcard *.cpp)
CXX = g++
CXXFLAGS = -O3 -DSOFTWARE
all: main.cpp io.c solver.cpp router/router.cpp
	g++ -o solve solver.cpp main.cpp io.c router/router.cpp -std=c++11

all: $(TARGET)
o: main.o io.o solver.o
	g++ -o solve main.o io.o solver.o

$(TARGET): $(OBJS)
	$(CXX) -o $@ $(OBJS)
main.o: main.cpp
	g++ -c main.cpp

clean:
	rm *.o
	rm $(TARGET)
io.o: io.c
	g++ -c io.c

solver.o: solver.cpp
	g++ -c solver.cpp -std=c++11

Makefilesss

0 → 100644
+14 −0
Changes for Makefilesss: 14 added lines, 0 removed lines.
Original line number Diff line number Diff line
TARGET = sim
OBJS = $(CPPS:.cpp=.o)
CPPS = $(wildcard *.cpp)
CXX = g++
CXXFLAGS = -O3 -DSOFTWARE

all: $(TARGET)

$(TARGET): $(OBJS)
	$(CXX) -o $@ $(OBJS)

clean:
	rm *.o
	rm $(TARGET)

answer.txt

0 → 100644
+8039 −0

File added.

Preview size limit exceeded, changes collapsed.

+2 −8
Changes for io.c: 2 added lines, 8 removed lines.
Original line number Diff line number Diff line
@@ -101,17 +101,11 @@ void read_problem(void){
void print_answer(void){
	printf("\n --ANSWER-- \n"); //comment out this row
	int i,j;
	h=H;
	w=W;
	printf("SIZE %dX%d\n",w,h);
	for(i=0;i<h;i++){
		for(j=0;j<w;j++){
			if(board_data[j][i]!=-1){
				printf("%d",board_data[j][i]);
			}else{
				printf("*");
			}
			if(j==h-1)
			printf("%3d",board_data[j][i]);
			if(j==w-1)
				printf("\n");
			else
				printf(",");
+2 −2
Changes for io.h: 2 added lines, 2 removed lines.
Original line number Diff line number Diff line
@@ -5,8 +5,8 @@

#define MAXBLOCK 5184 // 72*72
#define MAXLINE 2592 // 72*72/2
#define MAXW 72
#define MAXH 72
#define MAXW 120
#define MAXH 120

extern short int W, H; // (問題で設定された) 盤面サイズ上限

Loading