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

change solver

parent ad6fb437
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)
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
o: main.o io.o solver.o
g++ -o solve main.o io.o solver.o
main.o: main.cpp
g++ -c main.cpp
io.o: io.c
g++ -c io.c
solver.o: solver.cpp
g++ -c solver.cpp -std=c++11
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)
This diff is collapsed.
......@@ -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(",");
......
......@@ -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; // (問題で設定された) 盤面サイズ上限
......
......@@ -2,11 +2,10 @@
/* Last Change: 2019/05/21 (Tue) 14:44:03. */
#include"io.h"
#include"solver.h"
#include <stdio.h>
int main(void){
read_problem();
H=40;
W=40;
solver();
print_answer();
......
......@@ -11,7 +11,7 @@
using namespace std;
#define ROUND_LIMIT 32768 // Max=65534(=2^16-2)
#define ROUND_LIMIT 8192//4096//32768 // Max=65534(=2^16-2)
#define PRINT_BOARD
//#define PRINT_SEARCH // for router debug
......
No preview for this file type
This diff is collapsed.
No preview for this file type
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment