feat: new dp problem formated
This commit is contained in:
97
vacations/Makefile
Normal file
97
vacations/Makefile
Normal file
@@ -0,0 +1,97 @@
|
|||||||
|
# Normal directories
|
||||||
|
SRC_DIR := src
|
||||||
|
BIN_DIR := bin
|
||||||
|
DBG_DIR := bin/debug
|
||||||
|
|
||||||
|
# Grader directories
|
||||||
|
GRADER := $(wildcard $(SRC_DIR)/grader.cpp)
|
||||||
|
GRADER_DIR := $(SRC_DIR)/grader
|
||||||
|
HANDLER_DIR := $(SRC_DIR)/handler
|
||||||
|
|
||||||
|
GRADER_SRC := $(wildcard $(GRADER_DIR)/*.cpp)
|
||||||
|
GRADER_BIN := $(patsubst $(GRADER_DIR)/%.cpp, $(BIN_DIR)/%, $(GRADER_SRC))
|
||||||
|
GRADER_DBG := $(patsubst $(GRADER_DIR)/%.cpp, $(DBG_DIR)/%, $(GRADER_SRC))
|
||||||
|
|
||||||
|
# Change CPP source directories if grader is defined
|
||||||
|
ifdef GRADER
|
||||||
|
SRC := $(wildcard $(HANDLER_DIR)/*.cpp)
|
||||||
|
BIN := $(patsubst $(HANDLER_DIR)/%.cpp, $(BIN_DIR)/%, $(SRC))
|
||||||
|
DBG := $(patsubst $(HANDLER_DIR)/%.cpp, $(DBG_DIR)/%, $(SRC))
|
||||||
|
else
|
||||||
|
SRC := $(wildcard $(SRC_DIR)/*.cpp)
|
||||||
|
BIN := $(patsubst $(SRC_DIR)/%.cpp, $(BIN_DIR)/%, $(SRC))
|
||||||
|
DBG := $(patsubst $(SRC_DIR)/%.cpp, $(DBG_DIR)/%, $(SRC))
|
||||||
|
endif
|
||||||
|
|
||||||
|
SRC_C := $(wildcard $(SRC_DIR)/*.c)
|
||||||
|
BIN_C := $(patsubst $(SRC_DIR)/%.c, $(BIN_DIR)/%, $(SRC_C))
|
||||||
|
DBG_C := $(patsubst $(SRC_DIR)/%.c, $(DBG_DIR)/%, $(SRC_C))
|
||||||
|
|
||||||
|
SRC_JAVA := $(wildcard $(SRC_DIR)/*.java)
|
||||||
|
BIN_JAVA := $(patsubst $(SRC_DIR)/%.java, $(BIN_DIR)/%.class, $(SRC_JAVA))
|
||||||
|
DBG_JAVA := $(patsubst $(SRC_DIR)/%.java, $(DBG_DIR)/%.class, $(SRC_JAVA))
|
||||||
|
|
||||||
|
CHECKER := $(wildcard $(SRC_DIR)/checker.cpp)
|
||||||
|
|
||||||
|
C := gcc
|
||||||
|
CPP := g++
|
||||||
|
CXX_FLAGS := -Wall -O2
|
||||||
|
DEBUG_FLAGS := -Wall -g
|
||||||
|
BOCA_FLAGS := -static -DBOCA_SUPPORT
|
||||||
|
|
||||||
|
JV = javac
|
||||||
|
JV_DEBUG = -g
|
||||||
|
JV_DIR = -d bin
|
||||||
|
JV_DBG_DIR = -d bin/debug
|
||||||
|
|
||||||
|
.PHONY: all debug release checker clean
|
||||||
|
|
||||||
|
all: debug release checker
|
||||||
|
|
||||||
|
debug: $(DBG) $(DBG_C) $(DBG_JAVA) $(GRADER_DBG)
|
||||||
|
|
||||||
|
release: $(BIN) $(BIN_C) $(BIN_JAVA) $(GRADER_BIN)
|
||||||
|
|
||||||
|
ifdef CHECKER
|
||||||
|
checker: $(DBG_DIR)/checker-boca $(BIN_DIR)/checker-boca
|
||||||
|
endif
|
||||||
|
|
||||||
|
$(BIN): $(BIN_DIR)/% : $(SRC_DIR)/%.cpp | $(BIN_DIR)
|
||||||
|
$(CPP) $(CXX_FLAGS) $^ -o $@
|
||||||
|
|
||||||
|
$(DBG): $(DBG_DIR)/% : $(SRC_DIR)/%.cpp | $(DBG_DIR)
|
||||||
|
$(CPP) $(DEBUG_FLAGS) $^ -o $@
|
||||||
|
|
||||||
|
$(BIN_C): $(BIN_DIR)/% : $(SRC_DIR)/%.c | $(BIN_DIR)
|
||||||
|
$(C) $(CXX_FLAGS) $^ -o $@
|
||||||
|
|
||||||
|
$(DBG_C): $(DBG_DIR)/% : $(SRC_DIR)/%.c | $(DBG_DIR)
|
||||||
|
$(C) $(DEBUG_FLAGS) $^ -o $@
|
||||||
|
|
||||||
|
$(BIN_JAVA): $(BIN_DIR)/%.class : $(SRC_DIR)/%.java | $(BIN_DIR)
|
||||||
|
$(JV) $(JV_DIR) $^
|
||||||
|
|
||||||
|
$(DBG_JAVA): $(DBG_DIR)/%.class : $(SRC_DIR)/%.java | $(DBG_DIR)
|
||||||
|
$(JV) $(JV_DEBUG) $(JV_DBG_DIR) $^
|
||||||
|
|
||||||
|
$(GRADER_BIN): $(BIN_DIR)/% : $(GRADER_DIR)/%.cpp $(GRADER) $(GRADER_DIR)/*.h
|
||||||
|
$(CPP) $(CXX_FLAGS) $^ -o $@
|
||||||
|
|
||||||
|
$(GRADER_DBG): $(DBG_DIR)/% : $(GRADER_DIR)/%.cpp $(GRADER) $(GRADER_DIR)/*.h
|
||||||
|
$(CPP) $(DEBUG_FLAGS) $^ -o $@
|
||||||
|
|
||||||
|
$(BIN_DIR):
|
||||||
|
mkdir -p $@
|
||||||
|
|
||||||
|
$(DBG_DIR):
|
||||||
|
mkdir -p $@
|
||||||
|
|
||||||
|
$(BIN_DIR)/checker-boca: $(SRC_DIR)/checker.cpp
|
||||||
|
$(CPP) $(CXX_FLAGS) $(BOCA_FLAGS) $^ -o $@
|
||||||
|
|
||||||
|
$(DBG_DIR)/checker-boca: $(SRC_DIR)/checker.cpp
|
||||||
|
$(CPP) $(DEBUG_FLAGS) $(BOCA_FLAGS) $^ -o $@
|
||||||
|
|
||||||
|
clean:
|
||||||
|
@echo Cleaning problem files
|
||||||
|
rm -rf bin
|
||||||
2
vacations/input/1
Normal file
2
vacations/input/1
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
4
|
||||||
|
1 3 2 0
|
||||||
2
vacations/input/10
Normal file
2
vacations/input/10
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
14
|
||||||
|
3 1 0 2 2 1 3 1 3 0 2 3 3 1
|
||||||
2
vacations/input/11
Normal file
2
vacations/input/11
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
16
|
||||||
|
3 1 3 0 3 2 0 2 3 3 0 2 0 2 0 1
|
||||||
2
vacations/input/12
Normal file
2
vacations/input/12
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
18
|
||||||
|
1 3 2 3 1 0 1 2 0 1 1 1 0 2 2 3 2 0
|
||||||
2
vacations/input/13
Normal file
2
vacations/input/13
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
5
|
||||||
|
2 3 3 1 2
|
||||||
2
vacations/input/14
Normal file
2
vacations/input/14
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
7
|
||||||
|
1 2 0 1 0 3 1
|
||||||
2
vacations/input/15
Normal file
2
vacations/input/15
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
30
|
||||||
|
0 2 0 1 2 1 3 2 2 1 3 1 2 0 3 3 1 0 1 2 1 1 1 3 1 3 0 1 0 1
|
||||||
2
vacations/input/16
Normal file
2
vacations/input/16
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
22
|
||||||
|
0 0 3 0 3 3 1 3 2 2 3 0 0 1 3 2 2 0 2 3 2 2
|
||||||
2
vacations/input/17
Normal file
2
vacations/input/17
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
12
|
||||||
|
3 2 0 1 2 2 3 1 3 2 3 2
|
||||||
2
vacations/input/18
Normal file
2
vacations/input/18
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
5
|
||||||
|
1 0 0 3 3
|
||||||
2
vacations/input/19
Normal file
2
vacations/input/19
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
12
|
||||||
|
2 0 0 0 3 0 2 3 1 0 3 2
|
||||||
2
vacations/input/2
Normal file
2
vacations/input/2
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
7
|
||||||
|
1 3 3 2 1 2 3
|
||||||
2
vacations/input/20
Normal file
2
vacations/input/20
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
18
|
||||||
|
0 1 3 0 0 1 1 2 2 0 2 2 2 1 0 3 1 1
|
||||||
2
vacations/input/21
Normal file
2
vacations/input/21
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
21
|
||||||
|
2 3 1 2 1 1 0 2 1 0 2 2 1 0 2 1 1 1 1 2 0
|
||||||
2
vacations/input/22
Normal file
2
vacations/input/22
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
48
|
||||||
|
0 3 3 0 2 3 0 3 0 1 3 2 0 3 0 2 2 3 3 0 2 1 2 3 0 3 3 2 2 3 0 0 2 0 1 2 1 2 1 0 1 2 1 0 3 3 0 2
|
||||||
2
vacations/input/23
Normal file
2
vacations/input/23
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
29
|
||||||
|
0 1 2 3 3 1 2 3 3 2 1 0 3 1 1 0 1 0 2 0 0 1 0 3 2 1 1 0 2
|
||||||
2
vacations/input/24
Normal file
2
vacations/input/24
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
31
|
||||||
|
1 3 0 2 0 1 0 1 0 3 3 2 0 0 2 3 2 0 0 1 2 1 1 1 0 2 1 2 2 3 1
|
||||||
2
vacations/input/25
Normal file
2
vacations/input/25
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
9
|
||||||
|
3 2 3 3 2 1 1 2 1
|
||||||
2
vacations/input/26
Normal file
2
vacations/input/26
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
48
|
||||||
|
2 0 2 1 0 2 2 1 3 3 1 3 1 3 3 2 0 0 1 2 3 0 1 1 1 1 2 1 1 0 1 0 0 3 0 3 2 3 1 3 1 2 3 3 0 1 1 0
|
||||||
2
vacations/input/27
Normal file
2
vacations/input/27
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
45
|
||||||
|
0 0 3 1 1 2 2 3 1 2 0 0 3 1 0 2 3 0 2 3 0 0 3 3 3 0 0 3 2 2 2 3 1 3 1 1 0 2 0 0 2 1 3 2 0
|
||||||
2
vacations/input/28
Normal file
2
vacations/input/28
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
21
|
||||||
|
2 2 1 0 3 3 3 1 3 3 0 1 1 1 3 3 2 3 3 0 0
|
||||||
2
vacations/input/29
Normal file
2
vacations/input/29
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
4
|
||||||
|
3 1 0 0
|
||||||
2
vacations/input/3
Normal file
2
vacations/input/3
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
2
|
||||||
|
2 2
|
||||||
2
vacations/input/30
Normal file
2
vacations/input/30
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
40
|
||||||
|
3 3 0 2 2 0 2 3 3 1 3 0 2 1 3 3 1 1 2 2 3 0 3 2 1 0 0 0 0 0 0 0 1 1 1 1 0 0 2 3
|
||||||
2
vacations/input/31
Normal file
2
vacations/input/31
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
14
|
||||||
|
0 1 1 3 1 2 0 0 1 3 1 2 2 2
|
||||||
2
vacations/input/32
Normal file
2
vacations/input/32
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
36
|
||||||
|
1 2 2 3 2 2 2 1 2 0 1 2 0 2 0 0 3 0 3 0 2 1 0 1 2 3 3 3 0 2 0 0 0 1 0 2
|
||||||
2
vacations/input/33
Normal file
2
vacations/input/33
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
24
|
||||||
|
1 0 3 2 1 0 0 0 0 2 3 0 2 0 0 1 3 2 0 0 2 2 1 2
|
||||||
2
vacations/input/34
Normal file
2
vacations/input/34
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
100
|
||||||
|
2 3 3 1 1 3 3 2 2 3 1 2 3 3 0 0 3 2 0 1 1 2 3 2 3 0 1 2 0 1 2 2 2 0 0 3 1 1 3 3 2 3 3 1 1 3 2 1 3 3 3 1 0 0 0 2 3 1 1 3 1 1 2 1 2 1 1 2 0 0 2 2 2 1 1 1 2 0 0 3 3 1 2 2 3 0 1 0 2 3 0 2 2 0 2 2 1 0 1 2
|
||||||
2
vacations/input/35
Normal file
2
vacations/input/35
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
36
|
||||||
|
0 0 2 1 0 2 2 2 3 1 2 2 1 0 1 2 1 0 3 1 3 3 2 2 3 0 0 0 0 1 3 0 2 1 0 3
|
||||||
2
vacations/input/36
Normal file
2
vacations/input/36
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
37
|
||||||
|
3 1 2 3 1 3 0 1 1 0 3 3 3 3 3 0 1 3 1 0 2 3 1 1 0 1 1 1 2 3 0 2 2 1 1 0 0
|
||||||
2
vacations/input/37
Normal file
2
vacations/input/37
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
6
|
||||||
|
1 3 1 2 0 3
|
||||||
2
vacations/input/38
Normal file
2
vacations/input/38
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
59
|
||||||
|
0 0 2 2 1 0 1 3 0 2 0 2 1 2 1 2 2 1 1 1 2 3 3 3 0 1 3 1 0 0 0 3 2 0 2 3 1 1 1 0 2 2 0 3 2 1 3 1 0 1 1 3 0 0 3 1 1 1 3
|
||||||
2
vacations/input/39
Normal file
2
vacations/input/39
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
9
|
||||||
|
0 3 2 0 2 0 2 2 2
|
||||||
2
vacations/input/4
Normal file
2
vacations/input/4
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
5
|
||||||
|
0 0 0 0 0
|
||||||
2
vacations/input/40
Normal file
2
vacations/input/40
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
91
|
||||||
|
1 3 1 2 1 3 0 0 1 0 2 0 2 0 3 1 0 2 2 0 1 2 0 1 1 0 3 3 0 1 0 3 3 2 1 0 3 3 0 2 1 1 2 3 1 1 0 1 2 3 1 2 3 3 2 3 2 3 1 1 0 3 0 2 1 0 3 2 2 2 0 3 2 2 2 0 1 1 2 0 1 2 1 0 0 0 2 0 3 2 1
|
||||||
2
vacations/input/41
Normal file
2
vacations/input/41
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
71
|
||||||
|
0 1 0 1 2 1 2 3 3 0 2 0 1 2 1 1 2 0 2 2 2 1 3 1 1 0 2 0 2 3 2 3 2 1 2 3 3 2 2 0 1 2 2 0 0 2 0 2 0 2 2 0 0 3 2 1 0 3 0 3 3 0 0 2 1 1 1 0 2 2 3
|
||||||
2
vacations/input/42
Normal file
2
vacations/input/42
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
76
|
||||||
|
0 2 2 3 1 0 1 1 0 3 0 1 3 1 2 0 0 1 3 2 0 1 3 1 1 0 2 1 1 1 2 2 1 2 0 1 0 2 2 0 1 0 3 1 0 2 3 3 1 3 0 0 3 0 3 0 2 3 3 0 3 3 1 1 3 2 3 3 3 3 2 2 3 0 3 0
|
||||||
2
vacations/input/43
Normal file
2
vacations/input/43
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
43
|
||||||
|
1 1 0 3 3 1 1 3 3 1 1 1 0 2 3 1 1 2 2 2 0 3 0 0 0 2 3 2 0 1 3 1 1 1 1 3 0 0 2 0 1 0 2
|
||||||
2
vacations/input/44
Normal file
2
vacations/input/44
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
10
|
||||||
|
1 2 2 0 1 1 3 2 2 1
|
||||||
2
vacations/input/45
Normal file
2
vacations/input/45
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
21
|
||||||
|
2 3 0 3 3 2 0 0 1 3 2 2 0 3 0 1 3 2 0 2 2
|
||||||
2
vacations/input/46
Normal file
2
vacations/input/46
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
23
|
||||||
|
0 3 1 2 0 2 0 3 3 3 1 2 3 3 0 0 0 2 2 1 0 1 2
|
||||||
2
vacations/input/47
Normal file
2
vacations/input/47
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
63
|
||||||
|
2 0 3 3 2 2 1 1 3 0 3 1 1 2 2 3 3 1 1 0 3 2 0 1 1 2 1 2 0 0 1 3 0 2 0 2 1 0 1 0 3 0 3 3 3 0 2 3 1 3 3 2 0 0 0 1 3 2 1 2 0 2 2
|
||||||
2
vacations/input/48
Normal file
2
vacations/input/48
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
53
|
||||||
|
0 0 2 1 1 2 2 2 0 3 3 1 3 2 0 1 3 0 2 2 3 2 1 1 3 0 2 1 2 3 0 1 1 1 2 0 2 3 0 3 2 2 1 2 3 3 2 3 3 1 2 2 3
|
||||||
2
vacations/input/49
Normal file
2
vacations/input/49
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
7
|
||||||
|
0 3 0 3 1 0 1
|
||||||
2
vacations/input/5
Normal file
2
vacations/input/5
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
5
|
||||||
|
3 3 3 3 3
|
||||||
2
vacations/input/50
Normal file
2
vacations/input/50
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
45
|
||||||
|
3 0 0 0 3 1 1 3 3 3 2 3 0 3 1 3 2 0 0 0 3 1 0 2 0 2 3 0 1 2 2 3 3 3 3 0 1 2 0 3 0 3 3 0 1
|
||||||
2
vacations/input/51
Normal file
2
vacations/input/51
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
59
|
||||||
|
0 2 3 1 2 3 2 0 2 2 2 3 2 1 2 3 0 2 1 1 0 2 0 2 1 2 2 2 1 1 2 1 0 1 1 1 1 1 2 1 2 0 0 3 3 0 0 0 2 1 0 3 2 0 1 1 0 0 1
|
||||||
2
vacations/input/52
Normal file
2
vacations/input/52
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
93
|
||||||
|
0 0 1 3 2 3 1 0 2 2 3 2 3 2 0 3 1 0 3 3 3 2 0 3 2 1 2 0 3 1 2 1 1 3 1 0 1 0 2 2 0 3 2 2 1 3 1 2 0 2 0 2 0 3 1 3 2 1 1 2 0 2 3 2 3 1 3 1 1 0 0 3 3 3 1 2 0 3 0 0 1 3 2 0 3 3 0 2 0 0 2 3 2
|
||||||
2
vacations/input/53
Normal file
2
vacations/input/53
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
23
|
||||||
|
2 2 2 2 1 1 2 0 3 0 0 2 2 0 1 2 3 2 3 0 1 2 3
|
||||||
2
vacations/input/54
Normal file
2
vacations/input/54
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
39
|
||||||
|
0 1 3 3 3 3 1 1 2 1 2 3 1 0 1 3 3 0 2 0 0 2 3 1 0 3 2 0 2 3 0 1 1 2 3 1 2 2 2
|
||||||
2
vacations/input/55
Normal file
2
vacations/input/55
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
88
|
||||||
|
0 3 0 2 2 2 1 1 1 3 1 2 0 3 2 3 2 3 2 0 3 3 2 3 0 3 1 2 2 1 3 1 3 1 3 1 1 0 2 2 0 2 1 2 1 0 2 0 1 2 3 2 2 2 2 0 3 3 0 2 3 3 2 2 3 2 3 3 0 1 0 3 1 3 2 2 3 3 0 1 2 1 2 0 3 0 3 0
|
||||||
2
vacations/input/56
Normal file
2
vacations/input/56
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
100
|
||||||
|
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
|
||||||
2
vacations/input/57
Normal file
2
vacations/input/57
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
100
|
||||||
|
3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3
|
||||||
2
vacations/input/6
Normal file
2
vacations/input/6
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
2
|
||||||
|
2 1
|
||||||
2
vacations/input/7
Normal file
2
vacations/input/7
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
22
|
||||||
|
3 0 2 0 0 1 2 0 1 3 0 3 3 1 3 0 0 2 1 2 2 1
|
||||||
2
vacations/input/8
Normal file
2
vacations/input/8
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
20
|
||||||
|
3 3 3 3 2 0 0 2 1 2 3 2 3 0 1 1 3 3 2 0
|
||||||
2
vacations/input/9
Normal file
2
vacations/input/9
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
19
|
||||||
|
1 0 2 2 2 1 2 3 2 1 0 3 0 2 0 3 0 2 1
|
||||||
188
vacations/maratona.cls
Normal file
188
vacations/maratona.cls
Normal file
@@ -0,0 +1,188 @@
|
|||||||
|
\ProvidesPackage{maratona}
|
||||||
|
\LoadClass[11pt]{article}
|
||||||
|
|
||||||
|
% remove page numbers
|
||||||
|
\pagenumbering{gobble}
|
||||||
|
|
||||||
|
\RequirePackage{fancyhdr}
|
||||||
|
|
||||||
|
\RequirePackage{tabularx,colortbl}
|
||||||
|
|
||||||
|
%\RequirePackage{arial}
|
||||||
|
\RequirePackage{ifpdf}
|
||||||
|
\RequirePackage[T1]{fontenc}
|
||||||
|
\RequirePackage[utf8]{inputenc}
|
||||||
|
\RequirePackage[portuguese]{babel}
|
||||||
|
\RequirePackage{graphics}
|
||||||
|
\RequirePackage{graphicx}
|
||||||
|
\RequirePackage{amssymb,amsmath,wrapfig}
|
||||||
|
\RequirePackage{xcolor,colortbl}
|
||||||
|
\RequirePackage{xcolor}
|
||||||
|
\RequirePackage{ifthen}
|
||||||
|
\oddsidemargin 0cm
|
||||||
|
\evensidemargin -2cm
|
||||||
|
\topmargin -1cm
|
||||||
|
\textwidth 16cm
|
||||||
|
\textheight 23cm
|
||||||
|
|
||||||
|
\ifpdf
|
||||||
|
\RequirePackage[pdftex]{hyperref}
|
||||||
|
\else
|
||||||
|
\RequirePackage[hypertex]{hyperref}
|
||||||
|
\fi
|
||||||
|
|
||||||
|
|
||||||
|
\newcommand{\var}[1]{\ensuremath{{#1}}}
|
||||||
|
|
||||||
|
|
||||||
|
\hypersetup{
|
||||||
|
letterpaper,
|
||||||
|
colorlinks=true,
|
||||||
|
linkcolor=blue,
|
||||||
|
urlcolor=blue,
|
||||||
|
pdfpagemode=none,
|
||||||
|
pdftitle={IV Maratona de Programação do IFB \today},
|
||||||
|
pdfauthor={},
|
||||||
|
pdfsubject={Caderno de problemas da IV Maratona de Programação do IFB },
|
||||||
|
pdfkeywords={maratona, programação, IFB}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
\DeclareGraphicsExtensions{png}
|
||||||
|
|
||||||
|
\lhead{DS Contest Tools}
|
||||||
|
\pagestyle{fancy}
|
||||||
|
|
||||||
|
% Capa
|
||||||
|
\newenvironment{Maratona}[3]
|
||||||
|
{
|
||||||
|
\begin{titlepage}
|
||||||
|
\begin{center}
|
||||||
|
|
||||||
|
\vspace{1cm}
|
||||||
|
\Large{\textbf{#1}} \\
|
||||||
|
\vspace{1cm}
|
||||||
|
{\textbf{Caderno de Problemas}} \\
|
||||||
|
\vspace{1cm}
|
||||||
|
\begin{small}
|
||||||
|
\textsl{#2}
|
||||||
|
\end{small} \\
|
||||||
|
\begin{figure}[htp]
|
||||||
|
\begin{center}
|
||||||
|
\includegraphics[scale=1]{logos/logo-maratona.png}
|
||||||
|
\end{center}
|
||||||
|
\end{figure}
|
||||||
|
{(Este caderno contém {#3} problemas)} \\
|
||||||
|
\vspace{1cm}
|
||||||
|
}
|
||||||
|
{
|
||||||
|
\vfill
|
||||||
|
\begin{small}
|
||||||
|
{QNM 40, Área Especial nº 01,
|
||||||
|
Taguatinga/DF, 72146-000 ,
|
||||||
|
Brasil } \\
|
||||||
|
{Telefone (61) 2103-2200 \\http://www.ifb.edu.br/taguatinga} \\
|
||||||
|
\end{small}
|
||||||
|
\end{center}
|
||||||
|
\end{titlepage}
|
||||||
|
}
|
||||||
|
|
||||||
|
\newcommand{\Organizacao}[2]{
|
||||||
|
{\small \vfill
|
||||||
|
\begin{center}
|
||||||
|
|
||||||
|
\textbf{Comissão Organizadora:} \\
|
||||||
|
{#1} \\
|
||||||
|
\bigskip
|
||||||
|
\textbf{Apoio:}\\
|
||||||
|
{#2}
|
||||||
|
\end{center}
|
||||||
|
}
|
||||||
|
\vfill
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
% Problema
|
||||||
|
\newcounter{problem}
|
||||||
|
\newenvironment{Problema}[4]{
|
||||||
|
\stepcounter{problem}
|
||||||
|
\newpage
|
||||||
|
\begin{center}
|
||||||
|
\Large{\ifthenelse{\equal{#1}{}}{\textbf{{#2}}}{\textbf{Problema {#1} -- {#2} }}}{\\\footnotesize \textbf{Limite de tempo: {#3}s}}{\\[-0.1cm]\footnotesize \textbf{Limite de memória: {#4}MB}}
|
||||||
|
\end{center}
|
||||||
|
}
|
||||||
|
|
||||||
|
\newcounter{problemAutor}
|
||||||
|
\newenvironment{ProblemaAutor}[5]{
|
||||||
|
\stepcounter{problemAutor}
|
||||||
|
\newpage
|
||||||
|
\begin{center}
|
||||||
|
\Large{\ifthenelse{\equal{#1}{}}{\textbf{{#2}}}{\textbf{Problema {#1} -- {#2} }}}{\\\footnotesize \textbf{Limite de tempo: {#3}s}}{\\[-0.1cm]\footnotesize \textbf{Limite de memória: {#4}MB\\}}{
|
||||||
|
\footnotesize Autor: {#5}
|
||||||
|
}
|
||||||
|
\end{center}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
% Código-fonte
|
||||||
|
\newcommand{\codigofonte}[1]{Nome do arquivo fonte: {#1}}
|
||||||
|
|
||||||
|
% Entrada
|
||||||
|
\newcommand{\Entrada}{
|
||||||
|
\bigskip
|
||||||
|
\begin{large}
|
||||||
|
\textbf{Entrada} \\
|
||||||
|
\end{large}
|
||||||
|
}
|
||||||
|
|
||||||
|
% Saida
|
||||||
|
\newcommand{\Saida}{
|
||||||
|
\bigskip
|
||||||
|
\begin{large}
|
||||||
|
\textbf{Saída} \\
|
||||||
|
\end{large}
|
||||||
|
}
|
||||||
|
|
||||||
|
\newcommand{\Interacao}{
|
||||||
|
\bigskip
|
||||||
|
\begin{large}
|
||||||
|
\textbf{Interação} \\
|
||||||
|
\end{large}
|
||||||
|
}
|
||||||
|
|
||||||
|
\newcommand{\Notas}{
|
||||||
|
\bigskip
|
||||||
|
\begin{large}
|
||||||
|
\textbf{Notas} \\
|
||||||
|
\end{large}
|
||||||
|
}
|
||||||
|
|
||||||
|
% Exemplo
|
||||||
|
\newenvironment{Exemplo}
|
||||||
|
{
|
||||||
|
|
||||||
|
\tabularx{\textwidth}{XX}
|
||||||
|
% {@{\extracolsep{\fill}}|l|l|}
|
||||||
|
% {|l|l@{\extracolsep{\fill}|}}
|
||||||
|
\hline
|
||||||
|
Entrada & Saída \\\hline
|
||||||
|
}
|
||||||
|
{
|
||||||
|
\hline
|
||||||
|
\endtabularx
|
||||||
|
}
|
||||||
|
|
||||||
|
% Exemplo de Entrada
|
||||||
|
\newenvironment{ExemploEntrada}
|
||||||
|
{
|
||||||
|
\bigskip
|
||||||
|
\begin{large}
|
||||||
|
\textbf{Exemplo} \\
|
||||||
|
\end{large}
|
||||||
|
}
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
% Sample Output
|
||||||
|
|
||||||
1
vacations/output/1
Normal file
1
vacations/output/1
Normal file
@@ -0,0 +1 @@
|
|||||||
|
2
|
||||||
1
vacations/output/10
Normal file
1
vacations/output/10
Normal file
@@ -0,0 +1 @@
|
|||||||
|
3
|
||||||
1
vacations/output/100
Normal file
1
vacations/output/100
Normal file
@@ -0,0 +1 @@
|
|||||||
|
20
|
||||||
1
vacations/output/101
Normal file
1
vacations/output/101
Normal file
@@ -0,0 +1 @@
|
|||||||
|
4
|
||||||
1
vacations/output/102
Normal file
1
vacations/output/102
Normal file
@@ -0,0 +1 @@
|
|||||||
|
29
|
||||||
1
vacations/output/103
Normal file
1
vacations/output/103
Normal file
@@ -0,0 +1 @@
|
|||||||
|
32
|
||||||
1
vacations/output/104
Normal file
1
vacations/output/104
Normal file
@@ -0,0 +1 @@
|
|||||||
|
25
|
||||||
1
vacations/output/105
Normal file
1
vacations/output/105
Normal file
@@ -0,0 +1 @@
|
|||||||
|
12
|
||||||
1
vacations/output/106
Normal file
1
vacations/output/106
Normal file
@@ -0,0 +1 @@
|
|||||||
|
100
|
||||||
1
vacations/output/107
Normal file
1
vacations/output/107
Normal file
@@ -0,0 +1 @@
|
|||||||
|
0
|
||||||
1
vacations/output/11
Normal file
1
vacations/output/11
Normal file
@@ -0,0 +1 @@
|
|||||||
|
5
|
||||||
1
vacations/output/12
Normal file
1
vacations/output/12
Normal file
@@ -0,0 +1 @@
|
|||||||
|
7
|
||||||
1
vacations/output/13
Normal file
1
vacations/output/13
Normal file
@@ -0,0 +1 @@
|
|||||||
|
0
|
||||||
1
vacations/output/14
Normal file
1
vacations/output/14
Normal file
@@ -0,0 +1 @@
|
|||||||
|
2
|
||||||
1
vacations/output/15
Normal file
1
vacations/output/15
Normal file
@@ -0,0 +1 @@
|
|||||||
|
8
|
||||||
1
vacations/output/16
Normal file
1
vacations/output/16
Normal file
@@ -0,0 +1 @@
|
|||||||
|
9
|
||||||
1
vacations/output/17
Normal file
1
vacations/output/17
Normal file
@@ -0,0 +1 @@
|
|||||||
|
3
|
||||||
1
vacations/output/18
Normal file
1
vacations/output/18
Normal file
@@ -0,0 +1 @@
|
|||||||
|
2
|
||||||
1
vacations/output/19
Normal file
1
vacations/output/19
Normal file
@@ -0,0 +1 @@
|
|||||||
|
6
|
||||||
1
vacations/output/2
Normal file
1
vacations/output/2
Normal file
@@ -0,0 +1 @@
|
|||||||
|
0
|
||||||
1
vacations/output/20
Normal file
1
vacations/output/20
Normal file
@@ -0,0 +1 @@
|
|||||||
|
9
|
||||||
1
vacations/output/21
Normal file
1
vacations/output/21
Normal file
@@ -0,0 +1 @@
|
|||||||
|
9
|
||||||
1
vacations/output/22
Normal file
1
vacations/output/22
Normal file
@@ -0,0 +1 @@
|
|||||||
|
17
|
||||||
1
vacations/output/23
Normal file
1
vacations/output/23
Normal file
@@ -0,0 +1 @@
|
|||||||
|
11
|
||||||
1
vacations/output/24
Normal file
1
vacations/output/24
Normal file
@@ -0,0 +1 @@
|
|||||||
|
11
|
||||||
1
vacations/output/25
Normal file
1
vacations/output/25
Normal file
@@ -0,0 +1 @@
|
|||||||
|
2
|
||||||
1
vacations/output/26
Normal file
1
vacations/output/26
Normal file
@@ -0,0 +1 @@
|
|||||||
|
18
|
||||||
1
vacations/output/27
Normal file
1
vacations/output/27
Normal file
@@ -0,0 +1 @@
|
|||||||
|
20
|
||||||
1
vacations/output/28
Normal file
1
vacations/output/28
Normal file
@@ -0,0 +1 @@
|
|||||||
|
6
|
||||||
1
vacations/output/29
Normal file
1
vacations/output/29
Normal file
@@ -0,0 +1 @@
|
|||||||
|
2
|
||||||
1
vacations/output/3
Normal file
1
vacations/output/3
Normal file
@@ -0,0 +1 @@
|
|||||||
|
1
|
||||||
1
vacations/output/30
Normal file
1
vacations/output/30
Normal file
@@ -0,0 +1 @@
|
|||||||
|
18
|
||||||
1
vacations/output/31
Normal file
1
vacations/output/31
Normal file
@@ -0,0 +1 @@
|
|||||||
|
5
|
||||||
1
vacations/output/32
Normal file
1
vacations/output/32
Normal file
@@ -0,0 +1 @@
|
|||||||
|
14
|
||||||
1
vacations/output/33
Normal file
1
vacations/output/33
Normal file
@@ -0,0 +1 @@
|
|||||||
|
12
|
||||||
1
vacations/output/34
Normal file
1
vacations/output/34
Normal file
@@ -0,0 +1 @@
|
|||||||
|
33
|
||||||
1
vacations/output/35
Normal file
1
vacations/output/35
Normal file
@@ -0,0 +1 @@
|
|||||||
|
15
|
||||||
1
vacations/output/36
Normal file
1
vacations/output/36
Normal file
@@ -0,0 +1 @@
|
|||||||
|
14
|
||||||
1
vacations/output/37
Normal file
1
vacations/output/37
Normal file
@@ -0,0 +1 @@
|
|||||||
|
1
|
||||||
1
vacations/output/38
Normal file
1
vacations/output/38
Normal file
@@ -0,0 +1 @@
|
|||||||
|
23
|
||||||
1
vacations/output/39
Normal file
1
vacations/output/39
Normal file
@@ -0,0 +1 @@
|
|||||||
|
4
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user