Compare commits
10 Commits
6bc674b1d4
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
| 10ac9a7b32 | |||
| bd94e27fad | |||
| 3cbc40eb77 | |||
| edcd2211b5 | |||
| d931bb6422 | |||
| 4d583f8d8c | |||
| 8785966987 | |||
| 33d87c5809 | |||
| 3ec1280357 | |||
| cc687b9471 |
@@ -50,9 +50,13 @@ Repositório com a formatação de problemas que exploram variadas técnicas de
|
||||
## Graph
|
||||
|
||||
- [Conversor Fonético Genérico](./conversor-fonetico-generico)
|
||||
- [Gatinhos](./gatinhos)
|
||||
- [Knight Moves](./knight-moves)
|
||||
- [Sliding Puzzle](./sliding-puzzle)
|
||||
- [Pique Pega](./pique-pega/)
|
||||
- [Lazy Jumping Frog](./ra-preguicosa/)
|
||||
- [Rede Anel Estelar](./rede-anel-estelar/)
|
||||
- [SMS](./sms)
|
||||
|
||||
---
|
||||
|
||||
|
||||
Binary file not shown.
@@ -7,9 +7,8 @@
|
||||
\usepackage{hyperref}
|
||||
\usepackage{graphicx}
|
||||
\input{statement/preamble.tex}
|
||||
|
||||
\title{ Tutorial: Análise de Dados}
|
||||
\author{Leetcode 1223}
|
||||
\author{Arthur Andrade D'Olival}
|
||||
\date{}
|
||||
\begin{document}
|
||||
\maketitle
|
||||
|
||||
Binary file not shown.
@@ -1,7 +1,7 @@
|
||||
\documentclass{maratona}
|
||||
|
||||
\begin{document}
|
||||
\begin{ProblemaAutor}{}{Análise de Dados}{1}{256}{Leetcode 1223}
|
||||
\begin{ProblemaAutor}{}{Análise de Dados}{1}{256}{Arthur Andrade D'Olival}
|
||||
|
||||
É o seu primeiro dia no \textbf{Departamento de Controle de Qualidade}.
|
||||
|
||||
@@ -33,6 +33,10 @@ Em seguida, são dados seis inteiros \(d_1, d_2, d_3, d_4, d_5, d_6\), cada um r
|
||||
|
||||
A saída consiste em um único inteiro representando o número total de sequências válidas de lançamentos, considerando o resultado módulo \(10^9 + 7\).
|
||||
|
||||
\section*{Observações}
|
||||
|
||||
Problema adaptado de \href{https://leetcode.com/problems/dice-roll-simulation/}{Leetcode 1223}.
|
||||
|
||||
\ExemploEntrada
|
||||
|
||||
\begin{Exemplo}
|
||||
|
||||
Binary file not shown.
@@ -7,7 +7,6 @@
|
||||
\usepackage{hyperref}
|
||||
\usepackage{graphicx}
|
||||
\input{statement/preamble.tex}
|
||||
|
||||
\title{ Tutorial: Caching Offline}
|
||||
\author{}
|
||||
\date{}
|
||||
|
||||
Binary file not shown.
Binary file not shown.
@@ -7,9 +7,8 @@
|
||||
\usepackage{hyperref}
|
||||
\usepackage{graphicx}
|
||||
\input{statement/preamble.tex}
|
||||
|
||||
\title{ Tutorial: Decodificando Mensagens}
|
||||
\author{Leetcode 91}
|
||||
\author{Arthur Andrade D'Olival}
|
||||
\date{}
|
||||
\begin{document}
|
||||
\maketitle
|
||||
|
||||
Binary file not shown.
@@ -1,7 +1,7 @@
|
||||
\documentclass{maratona}
|
||||
|
||||
\begin{document}
|
||||
\begin{ProblemaAutor}{}{Decodificando Mensagens}{1}{256}{Leetcode 91}
|
||||
\begin{ProblemaAutor}{}{Decodificando Mensagens}{1}{256}{Arthur Andrade D'Olival}
|
||||
|
||||
O problema consiste em determinar o número de maneiras possíveis de decodificar uma sequência numérica, onde cada número ou par de números representa uma letra do alfabeto latino.
|
||||
A correspondência segue a regra \( 1 \rightarrow A, 2 \rightarrow B, \ldots, 26 \rightarrow Z \).
|
||||
@@ -18,6 +18,8 @@ A segunda linha contém uma sequência de digitos de \( s \) de comprimento \( n
|
||||
|
||||
A saída deve conter um único inteiro, representando o número total de maneiras possíveis de decodificar a sequência numérica \( s \) de acordo com o mapeamento \( 1 \rightarrow A, 2 \rightarrow B, \ldots, 26 \rightarrow Z \).
|
||||
|
||||
Como este número pode ser extremamente grande, sua resposta deve ser calculada e impressa \textbf{módulo \(10^9 + 7\)}.
|
||||
|
||||
\ExemploEntrada
|
||||
|
||||
\begin{Exemplo}
|
||||
@@ -35,5 +37,9 @@ A saída deve conter um único inteiro, representando o número total de maneira
|
||||
|
||||
Para a sequência \( s = "12" \), existem duas decodificações possíveis: "AB" (1, 2) e "L" (12).
|
||||
Para a sequência \( s = "226" \), há três decodificações possíveis: "BZ" (2, 26), "VF" (22, 6) e "BBF" (2, 2, 6).
|
||||
Para a sequência \( s = "06" \), não há nenhuma forma válida de decodificação.\end{ProblemaAutor}
|
||||
Para a sequência \( s = "06" \), não há nenhuma forma válida de decodificação.
|
||||
|
||||
\section*{Observações}
|
||||
|
||||
Problema adaptado de \href{https://leetcode.com/problems/decode-ways/}{Leetcode 91}.\end{ProblemaAutor}
|
||||
\end{document}
|
||||
|
||||
Binary file not shown.
@@ -7,9 +7,8 @@
|
||||
\usepackage{hyperref}
|
||||
\usepackage{graphicx}
|
||||
\input{statement/preamble.tex}
|
||||
|
||||
\title{ Tutorial: Deletar e Ganhar}
|
||||
\author{Leetcode 740}
|
||||
\author{Arthur Andrade D'Olival}
|
||||
\date{}
|
||||
\begin{document}
|
||||
\maketitle
|
||||
|
||||
Binary file not shown.
@@ -1,7 +1,7 @@
|
||||
\documentclass{maratona}
|
||||
|
||||
\begin{document}
|
||||
\begin{ProblemaAutor}{}{Deletar e Ganhar}{1}{256}{Leetcode 740}
|
||||
\begin{ProblemaAutor}{}{Deletar e Ganhar}{1}{256}{Arthur Andrade D'Olival}
|
||||
|
||||
O problema consiste em determinar a pontuação máxima que pode ser obtida ao realizar uma série de operações sobre uma sequência de números inteiros.
|
||||
Em cada operação, é possível escolher um número \( x \) da sequência, somar \( x \) pontos ao total e, em seguida, remover \textbf{todos} os elementos iguais a \( x - 1 \) e \( x + 1 \) da sequência.
|
||||
@@ -38,5 +38,8 @@ Para o primeiro caso de teste: \( (3, 4, 5) \), a melhor escolha é remover \(
|
||||
Para o segundo caso de teste: \( (2, 2, 3, 3, 3, 4) \), a melhor estratégia é escolher o número \( 3 \), que concede \( 3 \times 3 = 9 \) pontos, removendo todos os \( 2 \) e \( 4 \); o total máximo é \( 9 \).
|
||||
|
||||
Para o terceiro caso de teste: \( (1, 2, 3, 4, 5) \), a estratégia ótima é escolher \( 1 \), \( 3 \) e \( 5 \), obtendo \( 1 + 3 + 5 = 9 \) pontos no total.
|
||||
\end{ProblemaAutor}
|
||||
|
||||
\section*{Observações}
|
||||
|
||||
Problema adaptado de \href{https://leetcode.com/problems/delete-and-earn/description/}{Leetcode 740}.\end{ProblemaAutor}
|
||||
\end{document}
|
||||
|
||||
Binary file not shown.
@@ -7,9 +7,8 @@
|
||||
\usepackage{hyperref}
|
||||
\usepackage{graphicx}
|
||||
\input{statement/preamble.tex}
|
||||
|
||||
\title{ Tutorial: Distância de Edição}
|
||||
\author{}
|
||||
\author{Arthur Andrade D'Olival}
|
||||
\date{}
|
||||
\begin{document}
|
||||
\maketitle
|
||||
|
||||
Binary file not shown.
@@ -1,7 +1,7 @@
|
||||
\documentclass{maratona}
|
||||
|
||||
\begin{document}
|
||||
\begin{ProblemaAutor}{}{Distância de Edição}{1}{256}{}
|
||||
\begin{ProblemaAutor}{}{Distância de Edição}{1}{256}{Arthur Andrade D'Olival}
|
||||
|
||||
O problema consiste em determinar o \textbf{menor número de operações} necessárias para transformar uma string em outra.
|
||||
|
||||
|
||||
Binary file not shown.
@@ -7,9 +7,8 @@
|
||||
\usepackage{hyperref}
|
||||
\usepackage{graphicx}
|
||||
\input{statement/preamble.tex}
|
||||
|
||||
\title{ Tutorial: Estouro}
|
||||
\author{Leetcode 312}
|
||||
\author{Arthur Andrade D'Olival}
|
||||
\date{}
|
||||
\begin{document}
|
||||
\maketitle
|
||||
|
||||
Binary file not shown.
@@ -1,7 +1,7 @@
|
||||
\documentclass{maratona}
|
||||
|
||||
\begin{document}
|
||||
\begin{ProblemaAutor}{}{Estouro}{1}{256}{Leetcode 312}
|
||||
\begin{ProblemaAutor}{}{Estouro}{1}{256}{Arthur Andrade D'Olival}
|
||||
|
||||
No laboratório de experimentos caóticos da \textbf{Fábrica de Balões Numéricos}, um cientista excêntrico te entrega uma fileira de balões, cada um pintado com um número inteiro positivo.
|
||||
|
||||
@@ -46,5 +46,9 @@ $3 \times 1 \times 5 + 3 \times 5 \times 8 + 1 \times 3 \times 8 + 1 \times 8 \t
|
||||
Portanto, o total máximo de energia é $167$.
|
||||
|
||||
No segundo exemplo, independentemente da ordem escolhida, a energia total liberada é
|
||||
$1 \times 1 \times 5 + 1 \times 5 \times 1 = 10$.\end{ProblemaAutor}
|
||||
$1 \times 1 \times 5 + 1 \times 5 \times 1 = 10$.
|
||||
|
||||
\section*{Observações}
|
||||
|
||||
Problema adaptado de \href{https://leetcode.com/problems/burst-balloons/description/}{Leetcode 312}.\end{ProblemaAutor}
|
||||
\end{document}
|
||||
|
||||
Binary file not shown.
Binary file not shown.
@@ -1,7 +1,7 @@
|
||||
\documentclass{maratona}
|
||||
|
||||
\begin{document}
|
||||
\begin{ProblemaAutor}{}{Estouro}{1.5}{256}{Arthur Andrade D'Olival}
|
||||
\begin{ProblemaAutor}{}{Estouro}{1}{256}{Arthur Andrade D'Olival}
|
||||
|
||||
No laboratório de experimentos caóticos da \textbf{Fábrica de Balões Numéricos}, um cientista excêntrico te entrega uma fileira de balões, cada um pintado com um número inteiro positivo.
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
"problem": {
|
||||
"title": "Estouro",
|
||||
"event": "",
|
||||
"time_limit": 1.5,
|
||||
"time_limit": 1.0,
|
||||
"memory_limit_mb": 256,
|
||||
"input_file": "stdin",
|
||||
"output_file": "stdout",
|
||||
|
||||
@@ -1,31 +1,14 @@
|
||||
n = int(input())
|
||||
arr = list(map(int, input().split()))
|
||||
nums = list(map(int, input().split()))
|
||||
|
||||
nums = [1] + arr + [1]
|
||||
m = n + 2
|
||||
nums = [1] + nums + [1]
|
||||
|
||||
dp = [[0] * m for _ in range(m)]
|
||||
dp = [[0] * len(nums) for _ in range(len(nums))]
|
||||
|
||||
for length in range(2, m):
|
||||
for left in range(m - length):
|
||||
right = left + length
|
||||
for length in range(3, len(nums) + 1):
|
||||
for i in range(len(nums) - length + 1):
|
||||
j = i + length - 1
|
||||
for k in range(i + 1, j):
|
||||
dp[i][j] = max(dp[i][j], dp[i][k] + dp[k][j] + nums[i] * nums[k] * nums[j])
|
||||
|
||||
best = 0
|
||||
left_val = nums[left]
|
||||
right_val = nums[right]
|
||||
|
||||
row_left = dp[left]
|
||||
|
||||
for k in range(left + 1, right):
|
||||
val = (
|
||||
row_left[k]
|
||||
+ dp[k][right]
|
||||
+ left_val * nums[k] * right_val
|
||||
)
|
||||
|
||||
if val > best:
|
||||
best = val
|
||||
|
||||
row_left[right] = best
|
||||
|
||||
print(dp[0][m - 1])
|
||||
print(dp[0][len(nums) - 1])
|
||||
Binary file not shown.
@@ -7,9 +7,8 @@
|
||||
\usepackage{hyperref}
|
||||
\usepackage{graphicx}
|
||||
\input{statement/preamble.tex}
|
||||
|
||||
\title{ Tutorial: O problema das Flores}
|
||||
\author{}
|
||||
\author{Arthur Andrade D'Olival}
|
||||
\date{}
|
||||
\begin{document}
|
||||
\maketitle
|
||||
|
||||
Binary file not shown.
@@ -1,7 +1,7 @@
|
||||
\documentclass{maratona}
|
||||
|
||||
\begin{document}
|
||||
\begin{ProblemaAutor}{}{O problema das Flores}{1}{256}{}
|
||||
\begin{ProblemaAutor}{}{O problema das Flores}{1}{256}{Arthur Andrade D'Olival}
|
||||
|
||||
O Jardineiro Bino é conhecido por seus canteiros de flores meticulosamente planejados. Este ano, ele decidiu criar um canteiro linear de comprimento \(n\). Para cada uma das \(n\) posições no canteiro, Bino plantará exatamente uma flor, que pode ser ou vermelha (V) ou branca (B).
|
||||
|
||||
@@ -13,7 +13,7 @@ Bino está planejando o jardim e quer saber quantas opções de design ele realm
|
||||
|
||||
\Entrada
|
||||
|
||||
A entrada contém dois inteiros separados por espaço, \(n\) e \(m\), onde \(n\) (\(1 \leq n \leq 10\,000\)) é o comprimento da sequência de flores e \(m\) (\(1 \leq m \leq 1\,000\)) é o número máximo permitido de flores iguais consecutivas.
|
||||
A entrada contém dois inteiros separados por espaço, \(n\) e \(m\), onde \(n\) (\(1 \leq n \leq 1\,000\)) é o comprimento da sequência de flores e \(m\) (\(1 \leq m \leq 1\,000\)) é o número máximo permitido de flores iguais consecutivas.
|
||||
|
||||
\Saida
|
||||
|
||||
|
||||
97
gatinhos/Makefile
Normal file
97
gatinhos/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
|
||||
BIN
gatinhos/gatinhos-tutorial.pdf
Normal file
BIN
gatinhos/gatinhos-tutorial.pdf
Normal file
Binary file not shown.
28
gatinhos/gatinhos-tutorial.tex
Normal file
28
gatinhos/gatinhos-tutorial.tex
Normal file
@@ -0,0 +1,28 @@
|
||||
\documentclass[10pt]{article}
|
||||
\usepackage[utf8]{inputenc}
|
||||
\usepackage{amsmath,amsthm,amssymb}
|
||||
\usepackage{fullpage}
|
||||
\usepackage{url}
|
||||
\pagenumbering{gobble}
|
||||
\usepackage{hyperref}
|
||||
|
||||
\title{ Tutorial: Gatinhos}
|
||||
\author{Arthur Andrade D'Olival}
|
||||
\date{}
|
||||
\begin{document}
|
||||
\maketitle
|
||||
O problema pode ser modelado como uma travessia em árvore (por exemplo, usando Busca em Profundidade - DFS ou Busca em Largura - BFS).
|
||||
Começando da raiz (sala 1), mantemos um contador do número de gatinhos consecutivos que vimos até o momento no caminho da raiz até o nó atual.
|
||||
Ao visitar um nó $u$:
|
||||
\begin{itemize}
|
||||
\item Se o nó atual possui um gatinho ($a_u = 1$), incrementamos o nosso contador.
|
||||
\item Caso contrário ($a_u = 0$), zeramos o contador.
|
||||
\end{itemize}
|
||||
|
||||
Se em qualquer ponto o contador ultrapassar o limite $m$, sabemos que este caminho não é mais válido, portanto, paramos a travessia a partir desse nó (pois a alergia atacou e Bibi não pode continuar).
|
||||
|
||||
Se chegarmos a um nó que é folha e o contador não tiver excedido $m$, incrementamos nossa resposta em 1.
|
||||
|
||||
A complexidade de tempo será $O(n)$ pois visitamos cada nó no máximo uma vez e realizamos operações de tempo constante em cada passo.
|
||||
A complexidade de espaço será $O(n)$ devido ao armazenamento da árvore e à pilha de chamadas da recursão ou à fila da BFS.
|
||||
\end{document}
|
||||
BIN
gatinhos/gatinhos.pdf
Normal file
BIN
gatinhos/gatinhos.pdf
Normal file
Binary file not shown.
73
gatinhos/gatinhos.tex
Normal file
73
gatinhos/gatinhos.tex
Normal file
@@ -0,0 +1,73 @@
|
||||
\documentclass{maratona}
|
||||
|
||||
\begin{document}
|
||||
\begin{ProblemaAutor}{}{Gatinhos}{1}{256}{Arthur Andrade D'Olival}
|
||||
|
||||
Bibi está visitando um grande abrigo de animais que tem o formato de uma árvore.
|
||||
O abrigo possui $n$ salas conectadas por $n-1$ corredores, e a entrada principal fica na sala $1$.
|
||||
Como é uma árvore, existe exatamente um caminho simples entre quaisquer duas salas.
|
||||
|
||||
Em algumas salas, há lindos gatinhos brincando. Bibi ama gatinhos, mas infelizmente ela tem uma leve alergia a eles.
|
||||
Ela sabe que, se passar por \textbf{mais de} $m$ salas consecutivas contendo gatinhos ao longo de seu caminho, sua alergia vai atacar e ela começará a espirrar sem parar!
|
||||
|
||||
As saídas do abrigo estão localizadas nas salas que são "folhas" dessa árvore.
|
||||
Uma sala é considerada uma folha se ela tem apenas um corredor conectado a ela e não é a sala da entrada principal.
|
||||
|
||||
Bibi sempre caminha se afastando da entrada principal.
|
||||
Ela quer saber: quantas saídas diferentes do abrigo ela consegue alcançar a partir da entrada sem que sua alergia ataque em nenhum momento do caminho?
|
||||
|
||||
\Entrada
|
||||
|
||||
A primeira linha da entrada contém dois inteiros $n$ e $m$ ($2 \le n \le 10^5, 1 \le m \le n$), indicando o número de salas no abrigo e o número máximo tolerado de salas consecutivas com gatinhos.
|
||||
|
||||
A segunda linha contém $n$ inteiros $a_1, a_2, \ldots, a_n$ ($a_i \in \{0, 1\}$). Se $a_i = 1$, a sala $i$ tem gatinhos. Se $a_i = 0$, a sala $i$ não tem gatinhos.
|
||||
|
||||
As próximas $n-1$ linhas descrevem os corredores do abrigo. Cada linha contém dois inteiros $u$ e $v$ ($1 \le u, v \le n, u \neq v$), indicando um corredor entre as salas $u$ e $v$. É garantido que os corredores formam uma árvore válida enraizada em $1$.
|
||||
|
||||
\Saida
|
||||
|
||||
Imprima um único inteiro: o número de saídas do abrigo que Bibi consegue alcançar sem passar por mais de $m$ salas com gatinhos consecutivas.
|
||||
|
||||
\ExemploEntrada
|
||||
\begin{Exemplo}
|
||||
\texttt{4~1} & \texttt{2}\\
|
||||
\texttt{1~1~0~0} & \\
|
||||
\texttt{1~2} & \\
|
||||
\texttt{1~3} & \\
|
||||
\texttt{1~4} & \\
|
||||
\rowcolor{gray!20}\texttt{7~1} & \texttt{2}\\
|
||||
\rowcolor{gray!20}\texttt{1~0~1~1~0~0~0} & \\
|
||||
\rowcolor{gray!20}\texttt{1~2} & \\
|
||||
\rowcolor{gray!20}\texttt{1~3} & \\
|
||||
\rowcolor{gray!20}\texttt{2~4} & \\
|
||||
\rowcolor{gray!20}\texttt{2~5} & \\
|
||||
\rowcolor{gray!20}\texttt{3~6} & \\
|
||||
\rowcolor{gray!20}\texttt{3~7} & \\
|
||||
\end{Exemplo}
|
||||
|
||||
|
||||
|
||||
\Notas
|
||||
|
||||
Vamos lembrar que uma árvore é um grafo conexo com $n$ vértices (salas) e $n-1$ arestas (corredores). Uma árvore enraizada é uma árvore com um vértice especial chamado raiz (neste problema, a sala 1). Em uma árvore enraizada, entre quaisquer dois vértices conectados por uma aresta, um vértice é o pai (o que está mais próximo da raiz), e o outro é o filho. Um vértice é chamado de folha se não tiver filhos.
|
||||
|
||||
\vspace{0.5cm}
|
||||
|
||||
\textbf{Nota para o primeiro caso de teste:} As salas contendo gatinhos estão marcadas em vermelho. As saídas (folhas) estão localizadas nas salas 2, 3 e 4. Bibi só não consegue ir para a saída localizada na sala 2.
|
||||
|
||||
\begin{figure}[h]
|
||||
\centering
|
||||
\includegraphics[width=0.25\textwidth]{sample-01.png}
|
||||
\end{figure}
|
||||
|
||||
\vspace{0.5cm}
|
||||
|
||||
\textbf{Nota para o segundo caso de teste:} As saídas (folhas) estão localizadas nas salas 4, 5, 6 e 7. Bibi não consegue ir para as saídas 6 e 7.
|
||||
|
||||
\begin{figure}[h]
|
||||
\centering
|
||||
\includegraphics[width=0.4\textwidth]{sample-02.png}
|
||||
\end{figure}
|
||||
|
||||
Problema adaptado de \href{https://codeforces.com/contest/580/problem/C}{Codeforces Round 321 (Div. 2, Problem C)}.\end{ProblemaAutor}
|
||||
\end{document}
|
||||
5
gatinhos/input/1
Normal file
5
gatinhos/input/1
Normal file
@@ -0,0 +1,5 @@
|
||||
4 1
|
||||
1 1 0 0
|
||||
1 2
|
||||
1 3
|
||||
1 4
|
||||
539
gatinhos/input/10
Normal file
539
gatinhos/input/10
Normal file
@@ -0,0 +1,539 @@
|
||||
538 81
|
||||
1 0 1 1 0 1 1 0 1 1 1 0 0 1 0 1 1 0 0 0 1 1 0 1 1 0 1 0 0 0 1 0 0 1 0 1 1 1 0 1 0 1 0 0 0 0 0 1 0 0 0 1 1 1 0 1 1 1 1 0 0 1 1 0 1 1 0 1 0 1 0 0 1 0 0 0 0 0 0 0 1 1 1 1 1 1 0 0 0 1 0 0 0 1 0 1 1 1 1 1 0 0 1 0 1 1 1 1 0 0 0 1 1 1 1 0 1 0 1 0 0 1 1 1 1 1 1 0 0 0 0 1 1 1 1 1 1 0 0 1 0 0 0 1 1 0 0 0 1 0 0 0 1 0 0 0 1 1 0 0 0 0 0 0 0 1 1 0 1 0 0 1 1 1 1 0 0 0 0 1 1 0 1 0 0 0 1 0 1 0 0 0 1 0 0 1 0 1 0 1 1 1 0 1 0 0 0 0 0 1 0 0 0 1 0 0 0 0 0 1 1 0 0 1 1 1 1 0 0 1 1 0 1 1 0 0 0 1 0 1 0 1 1 1 0 0 0 0 1 0 0 0 1 1 1 1 0 0 0 0 1 0 0 0 1 1 0 1 1 1 0 1 0 0 1 0 0 1 1 1 0 0 0 0 1 1 0 1 1 1 0 1 1 1 1 1 0 0 1 0 0 0 1 0 0 0 1 0 1 0 0 0 1 1 1 1 1 0 0 1 0 0 0 1 1 0 0 1 1 0 0 0 0 0 0 0 1 1 1 0 0 1 1 1 0 1 0 1 1 0 1 1 0 1 0 0 1 1 1 1 0 1 0 0 0 1 1 0 0 0 0 0 0 1 1 1 1 1 0 0 1 1 1 1 1 0 1 1 0 0 1 0 1 1 1 1 0 1 1 1 1 1 1 0 0 1 1 0 1 1 0 1 0 1 0 0 0 1 0 1 1 0 0 0 1 0 0 1 1 0 0 0 0 0 1 0 0 0 0 0 1 0 1 1 0 0 1 1 1 1 0 1 1 1 1 0 1 0 0 0 0 1 1 1 0 1 1 0 1 1 1 1 0 1 1 1 1 1 1 0 1 1 1 0 0 0 1 0 1 0 0 0 0 0 1 0 1 0 1 0 1 1 1 1 0 0 0 0 0 0 1 1 0 0 1 0 0 1 0 1 1 0 0 0 0 0 1 0 1 1 1 0 0 0 0 1 1 0
|
||||
1 2
|
||||
1 3
|
||||
1 4
|
||||
1 5
|
||||
1 6
|
||||
1 7
|
||||
1 8
|
||||
1 9
|
||||
1 10
|
||||
1 11
|
||||
1 12
|
||||
1 13
|
||||
1 14
|
||||
1 15
|
||||
1 16
|
||||
1 17
|
||||
1 18
|
||||
1 19
|
||||
1 20
|
||||
1 21
|
||||
1 22
|
||||
1 23
|
||||
1 24
|
||||
1 25
|
||||
1 26
|
||||
1 27
|
||||
1 28
|
||||
1 29
|
||||
1 30
|
||||
1 31
|
||||
1 32
|
||||
1 33
|
||||
1 34
|
||||
1 35
|
||||
1 36
|
||||
1 37
|
||||
1 38
|
||||
1 39
|
||||
1 40
|
||||
1 41
|
||||
1 42
|
||||
1 43
|
||||
1 44
|
||||
1 45
|
||||
1 46
|
||||
1 47
|
||||
1 48
|
||||
1 49
|
||||
1 50
|
||||
1 51
|
||||
1 52
|
||||
1 53
|
||||
1 54
|
||||
1 55
|
||||
1 56
|
||||
1 57
|
||||
1 58
|
||||
1 59
|
||||
1 60
|
||||
1 61
|
||||
1 62
|
||||
1 63
|
||||
1 64
|
||||
1 65
|
||||
1 66
|
||||
1 67
|
||||
1 68
|
||||
1 69
|
||||
1 70
|
||||
1 71
|
||||
1 72
|
||||
1 73
|
||||
1 74
|
||||
1 75
|
||||
1 76
|
||||
1 77
|
||||
1 78
|
||||
1 79
|
||||
1 80
|
||||
1 81
|
||||
1 82
|
||||
1 83
|
||||
1 84
|
||||
1 85
|
||||
1 86
|
||||
1 87
|
||||
1 88
|
||||
1 89
|
||||
1 90
|
||||
1 91
|
||||
1 92
|
||||
1 93
|
||||
1 94
|
||||
1 95
|
||||
1 96
|
||||
1 97
|
||||
1 98
|
||||
1 99
|
||||
1 100
|
||||
1 101
|
||||
1 102
|
||||
1 103
|
||||
1 104
|
||||
1 105
|
||||
1 106
|
||||
1 107
|
||||
1 108
|
||||
1 109
|
||||
1 110
|
||||
1 111
|
||||
1 112
|
||||
1 113
|
||||
1 114
|
||||
1 115
|
||||
1 116
|
||||
1 117
|
||||
1 118
|
||||
1 119
|
||||
1 120
|
||||
1 121
|
||||
1 122
|
||||
1 123
|
||||
1 124
|
||||
1 125
|
||||
1 126
|
||||
1 127
|
||||
1 128
|
||||
1 129
|
||||
1 130
|
||||
1 131
|
||||
1 132
|
||||
1 133
|
||||
1 134
|
||||
1 135
|
||||
1 136
|
||||
1 137
|
||||
1 138
|
||||
1 139
|
||||
1 140
|
||||
1 141
|
||||
1 142
|
||||
1 143
|
||||
1 144
|
||||
1 145
|
||||
1 146
|
||||
1 147
|
||||
1 148
|
||||
1 149
|
||||
1 150
|
||||
1 151
|
||||
1 152
|
||||
1 153
|
||||
1 154
|
||||
1 155
|
||||
1 156
|
||||
1 157
|
||||
1 158
|
||||
1 159
|
||||
1 160
|
||||
1 161
|
||||
1 162
|
||||
1 163
|
||||
1 164
|
||||
1 165
|
||||
1 166
|
||||
1 167
|
||||
1 168
|
||||
1 169
|
||||
1 170
|
||||
1 171
|
||||
1 172
|
||||
1 173
|
||||
1 174
|
||||
1 175
|
||||
1 176
|
||||
1 177
|
||||
1 178
|
||||
1 179
|
||||
1 180
|
||||
1 181
|
||||
1 182
|
||||
1 183
|
||||
1 184
|
||||
1 185
|
||||
1 186
|
||||
1 187
|
||||
1 188
|
||||
1 189
|
||||
1 190
|
||||
1 191
|
||||
1 192
|
||||
1 193
|
||||
1 194
|
||||
1 195
|
||||
1 196
|
||||
1 197
|
||||
1 198
|
||||
1 199
|
||||
1 200
|
||||
1 201
|
||||
1 202
|
||||
1 203
|
||||
1 204
|
||||
1 205
|
||||
1 206
|
||||
1 207
|
||||
1 208
|
||||
1 209
|
||||
1 210
|
||||
1 211
|
||||
1 212
|
||||
1 213
|
||||
1 214
|
||||
1 215
|
||||
1 216
|
||||
1 217
|
||||
1 218
|
||||
1 219
|
||||
1 220
|
||||
1 221
|
||||
1 222
|
||||
1 223
|
||||
1 224
|
||||
1 225
|
||||
1 226
|
||||
1 227
|
||||
1 228
|
||||
1 229
|
||||
1 230
|
||||
1 231
|
||||
1 232
|
||||
1 233
|
||||
1 234
|
||||
1 235
|
||||
1 236
|
||||
1 237
|
||||
1 238
|
||||
1 239
|
||||
1 240
|
||||
1 241
|
||||
1 242
|
||||
1 243
|
||||
1 244
|
||||
1 245
|
||||
1 246
|
||||
1 247
|
||||
1 248
|
||||
1 249
|
||||
1 250
|
||||
1 251
|
||||
1 252
|
||||
1 253
|
||||
1 254
|
||||
1 255
|
||||
1 256
|
||||
1 257
|
||||
1 258
|
||||
1 259
|
||||
1 260
|
||||
1 261
|
||||
1 262
|
||||
1 263
|
||||
1 264
|
||||
1 265
|
||||
1 266
|
||||
1 267
|
||||
1 268
|
||||
1 269
|
||||
1 270
|
||||
1 271
|
||||
1 272
|
||||
1 273
|
||||
1 274
|
||||
1 275
|
||||
1 276
|
||||
1 277
|
||||
1 278
|
||||
1 279
|
||||
1 280
|
||||
1 281
|
||||
1 282
|
||||
1 283
|
||||
1 284
|
||||
1 285
|
||||
1 286
|
||||
1 287
|
||||
1 288
|
||||
1 289
|
||||
1 290
|
||||
1 291
|
||||
1 292
|
||||
1 293
|
||||
1 294
|
||||
1 295
|
||||
1 296
|
||||
1 297
|
||||
1 298
|
||||
1 299
|
||||
1 300
|
||||
1 301
|
||||
1 302
|
||||
1 303
|
||||
1 304
|
||||
1 305
|
||||
1 306
|
||||
1 307
|
||||
1 308
|
||||
1 309
|
||||
1 310
|
||||
1 311
|
||||
1 312
|
||||
1 313
|
||||
1 314
|
||||
1 315
|
||||
1 316
|
||||
1 317
|
||||
1 318
|
||||
1 319
|
||||
1 320
|
||||
1 321
|
||||
1 322
|
||||
1 323
|
||||
1 324
|
||||
1 325
|
||||
1 326
|
||||
1 327
|
||||
1 328
|
||||
1 329
|
||||
1 330
|
||||
1 331
|
||||
1 332
|
||||
1 333
|
||||
1 334
|
||||
1 335
|
||||
1 336
|
||||
1 337
|
||||
1 338
|
||||
1 339
|
||||
1 340
|
||||
1 341
|
||||
1 342
|
||||
1 343
|
||||
1 344
|
||||
1 345
|
||||
1 346
|
||||
1 347
|
||||
1 348
|
||||
1 349
|
||||
1 350
|
||||
1 351
|
||||
1 352
|
||||
1 353
|
||||
1 354
|
||||
1 355
|
||||
1 356
|
||||
1 357
|
||||
1 358
|
||||
1 359
|
||||
1 360
|
||||
1 361
|
||||
1 362
|
||||
1 363
|
||||
1 364
|
||||
1 365
|
||||
1 366
|
||||
1 367
|
||||
1 368
|
||||
1 369
|
||||
1 370
|
||||
1 371
|
||||
1 372
|
||||
1 373
|
||||
1 374
|
||||
1 375
|
||||
1 376
|
||||
1 377
|
||||
1 378
|
||||
1 379
|
||||
1 380
|
||||
1 381
|
||||
1 382
|
||||
1 383
|
||||
1 384
|
||||
1 385
|
||||
1 386
|
||||
1 387
|
||||
1 388
|
||||
1 389
|
||||
1 390
|
||||
1 391
|
||||
1 392
|
||||
1 393
|
||||
1 394
|
||||
1 395
|
||||
1 396
|
||||
1 397
|
||||
1 398
|
||||
1 399
|
||||
1 400
|
||||
1 401
|
||||
1 402
|
||||
1 403
|
||||
1 404
|
||||
1 405
|
||||
1 406
|
||||
1 407
|
||||
1 408
|
||||
1 409
|
||||
1 410
|
||||
1 411
|
||||
1 412
|
||||
1 413
|
||||
1 414
|
||||
1 415
|
||||
1 416
|
||||
1 417
|
||||
1 418
|
||||
1 419
|
||||
1 420
|
||||
1 421
|
||||
1 422
|
||||
1 423
|
||||
1 424
|
||||
1 425
|
||||
1 426
|
||||
1 427
|
||||
1 428
|
||||
1 429
|
||||
1 430
|
||||
1 431
|
||||
1 432
|
||||
1 433
|
||||
1 434
|
||||
1 435
|
||||
1 436
|
||||
1 437
|
||||
1 438
|
||||
1 439
|
||||
1 440
|
||||
1 441
|
||||
1 442
|
||||
1 443
|
||||
1 444
|
||||
1 445
|
||||
1 446
|
||||
1 447
|
||||
1 448
|
||||
1 449
|
||||
1 450
|
||||
1 451
|
||||
1 452
|
||||
1 453
|
||||
1 454
|
||||
1 455
|
||||
1 456
|
||||
1 457
|
||||
1 458
|
||||
1 459
|
||||
1 460
|
||||
1 461
|
||||
1 462
|
||||
1 463
|
||||
1 464
|
||||
1 465
|
||||
1 466
|
||||
1 467
|
||||
1 468
|
||||
1 469
|
||||
1 470
|
||||
1 471
|
||||
1 472
|
||||
1 473
|
||||
1 474
|
||||
1 475
|
||||
1 476
|
||||
1 477
|
||||
1 478
|
||||
1 479
|
||||
1 480
|
||||
1 481
|
||||
1 482
|
||||
1 483
|
||||
1 484
|
||||
1 485
|
||||
1 486
|
||||
1 487
|
||||
1 488
|
||||
1 489
|
||||
1 490
|
||||
1 491
|
||||
1 492
|
||||
1 493
|
||||
1 494
|
||||
1 495
|
||||
1 496
|
||||
1 497
|
||||
1 498
|
||||
1 499
|
||||
1 500
|
||||
1 501
|
||||
1 502
|
||||
1 503
|
||||
1 504
|
||||
1 505
|
||||
1 506
|
||||
1 507
|
||||
1 508
|
||||
1 509
|
||||
1 510
|
||||
1 511
|
||||
1 512
|
||||
1 513
|
||||
1 514
|
||||
1 515
|
||||
1 516
|
||||
1 517
|
||||
1 518
|
||||
1 519
|
||||
1 520
|
||||
1 521
|
||||
1 522
|
||||
1 523
|
||||
1 524
|
||||
1 525
|
||||
1 526
|
||||
1 527
|
||||
1 528
|
||||
1 529
|
||||
1 530
|
||||
1 531
|
||||
1 532
|
||||
1 533
|
||||
1 534
|
||||
1 535
|
||||
1 536
|
||||
1 537
|
||||
1 538
|
||||
619
gatinhos/input/11
Normal file
619
gatinhos/input/11
Normal file
@@ -0,0 +1,619 @@
|
||||
618 480
|
||||
1 0 0 0 0 1 1 1 0 1 0 1 0 0 1 0 0 0 0 1 1 1 1 1 0 1 1 1 0 0 0 0 1 1 0 1 0 0 1 0 0 0 0 0 0 1 1 0 1 0 1 0 1 0 1 1 1 0 0 1 0 1 1 1 0 0 1 1 1 1 0 0 0 0 0 0 0 0 0 1 0 0 0 0 1 0 0 1 1 1 1 1 0 1 0 0 1 1 0 0 1 0 0 1 0 0 0 1 0 0 1 0 0 0 0 0 0 0 0 1 1 0 1 0 0 1 1 1 0 1 1 0 1 0 1 1 0 0 0 1 1 1 0 0 0 1 1 0 0 0 1 0 0 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 1 0 0 1 1 1 0 1 1 0 1 0 1 1 1 1 1 0 0 1 0 1 0 1 0 1 0 1 0 1 0 0 0 1 1 1 1 0 0 1 1 1 1 0 1 0 1 0 1 1 0 0 0 0 1 0 0 0 0 0 0 0 1 0 0 1 1 1 0 0 0 1 0 1 0 1 1 0 1 0 1 1 1 1 0 1 0 1 1 1 0 0 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 1 1 1 0 0 0 1 1 1 1 0 1 1 1 1 1 0 1 1 1 1 0 0 0 0 1 1 0 0 0 0 0 1 0 1 0 0 0 0 0 0 0 0 1 0 1 0 1 1 1 0 1 0 0 1 1 0 1 0 1 1 0 0 1 0 1 0 0 0 1 0 1 0 1 1 0 0 1 1 1 0 0 1 1 1 1 0 0 0 1 0 0 1 0 0 1 0 1 1 0 0 0 1 0 0 1 0 1 1 0 1 1 1 0 0 1 0 1 0 0 1 0 1 0 0 0 0 0 1 1 1 0 1 0 0 0 1 1 0 0 0 1 1 0 0 1 0 1 0 0 1 1 0 0 0 1 0 1 0 1 1 1 1 1 0 1 1 0 1 0 1 0 1 1 1 1 0 1 1 1 1 0 1 1 1 0 1 0 1 1 0 1 0 0 1 0 1 1 0 0 1 1 0 1 0 0 0 1 0 1 1 0 0 0 1 1 1 1 1 1 0 0 1 0 1 1 0 1 0 1 0 1 0 0 1 1 0 1 1 0 1 0 1 1 1 1 0 0 0 0 1 1 0 0 1 1 1 0 1 1 1 0 1 0 0 1 1 0 1 1 1 1 1 1 1 0 0 1 1 1 0 1 1 0 0 0 0 0 1 1 0 0 0 1 0 1 1 1 0 0 1 0 1 0 0 0 1 0 1 0 0 0 1 1 0 1 1 0 0 0 1 1 0 1 1 1 1 0 1 1 0 1 0 0 1 0 0 1
|
||||
1 2
|
||||
2 3
|
||||
3 4
|
||||
4 5
|
||||
5 6
|
||||
6 7
|
||||
7 8
|
||||
8 9
|
||||
9 10
|
||||
10 11
|
||||
11 12
|
||||
12 13
|
||||
13 14
|
||||
14 15
|
||||
15 16
|
||||
16 17
|
||||
17 18
|
||||
18 19
|
||||
19 20
|
||||
20 21
|
||||
21 22
|
||||
22 23
|
||||
23 24
|
||||
24 25
|
||||
25 26
|
||||
26 27
|
||||
27 28
|
||||
28 29
|
||||
29 30
|
||||
30 31
|
||||
31 32
|
||||
32 33
|
||||
33 34
|
||||
34 35
|
||||
35 36
|
||||
36 37
|
||||
37 38
|
||||
38 39
|
||||
39 40
|
||||
40 41
|
||||
41 42
|
||||
42 43
|
||||
43 44
|
||||
44 45
|
||||
45 46
|
||||
46 47
|
||||
47 48
|
||||
48 49
|
||||
49 50
|
||||
50 51
|
||||
51 52
|
||||
52 53
|
||||
53 54
|
||||
54 55
|
||||
55 56
|
||||
56 57
|
||||
57 58
|
||||
58 59
|
||||
59 60
|
||||
60 61
|
||||
61 62
|
||||
62 63
|
||||
63 64
|
||||
64 65
|
||||
65 66
|
||||
66 67
|
||||
67 68
|
||||
68 69
|
||||
69 70
|
||||
70 71
|
||||
71 72
|
||||
72 73
|
||||
73 74
|
||||
74 75
|
||||
75 76
|
||||
76 77
|
||||
77 78
|
||||
78 79
|
||||
79 80
|
||||
80 81
|
||||
81 82
|
||||
82 83
|
||||
83 84
|
||||
84 85
|
||||
85 86
|
||||
86 87
|
||||
87 88
|
||||
88 89
|
||||
89 90
|
||||
90 91
|
||||
91 92
|
||||
92 93
|
||||
93 94
|
||||
94 95
|
||||
95 96
|
||||
96 97
|
||||
97 98
|
||||
98 99
|
||||
99 100
|
||||
100 101
|
||||
101 102
|
||||
102 103
|
||||
103 104
|
||||
104 105
|
||||
105 106
|
||||
106 107
|
||||
107 108
|
||||
108 109
|
||||
109 110
|
||||
110 111
|
||||
111 112
|
||||
112 113
|
||||
113 114
|
||||
114 115
|
||||
115 116
|
||||
116 117
|
||||
117 118
|
||||
118 119
|
||||
119 120
|
||||
120 121
|
||||
121 122
|
||||
122 123
|
||||
123 124
|
||||
124 125
|
||||
125 126
|
||||
126 127
|
||||
127 128
|
||||
128 129
|
||||
129 130
|
||||
130 131
|
||||
131 132
|
||||
132 133
|
||||
133 134
|
||||
134 135
|
||||
135 136
|
||||
136 137
|
||||
137 138
|
||||
138 139
|
||||
139 140
|
||||
140 141
|
||||
141 142
|
||||
142 143
|
||||
143 144
|
||||
144 145
|
||||
145 146
|
||||
146 147
|
||||
147 148
|
||||
148 149
|
||||
149 150
|
||||
150 151
|
||||
151 152
|
||||
152 153
|
||||
153 154
|
||||
154 155
|
||||
155 156
|
||||
156 157
|
||||
157 158
|
||||
158 159
|
||||
159 160
|
||||
160 161
|
||||
161 162
|
||||
162 163
|
||||
163 164
|
||||
164 165
|
||||
165 166
|
||||
166 167
|
||||
167 168
|
||||
168 169
|
||||
169 170
|
||||
170 171
|
||||
171 172
|
||||
172 173
|
||||
173 174
|
||||
174 175
|
||||
175 176
|
||||
176 177
|
||||
177 178
|
||||
178 179
|
||||
179 180
|
||||
180 181
|
||||
181 182
|
||||
182 183
|
||||
183 184
|
||||
184 185
|
||||
185 186
|
||||
186 187
|
||||
187 188
|
||||
188 189
|
||||
189 190
|
||||
190 191
|
||||
191 192
|
||||
192 193
|
||||
193 194
|
||||
194 195
|
||||
195 196
|
||||
196 197
|
||||
197 198
|
||||
198 199
|
||||
199 200
|
||||
200 201
|
||||
201 202
|
||||
202 203
|
||||
203 204
|
||||
204 205
|
||||
205 206
|
||||
206 207
|
||||
207 208
|
||||
208 209
|
||||
209 210
|
||||
210 211
|
||||
211 212
|
||||
212 213
|
||||
213 214
|
||||
214 215
|
||||
215 216
|
||||
216 217
|
||||
217 218
|
||||
218 219
|
||||
219 220
|
||||
220 221
|
||||
221 222
|
||||
222 223
|
||||
223 224
|
||||
224 225
|
||||
225 226
|
||||
226 227
|
||||
227 228
|
||||
228 229
|
||||
229 230
|
||||
230 231
|
||||
231 232
|
||||
232 233
|
||||
233 234
|
||||
234 235
|
||||
235 236
|
||||
236 237
|
||||
237 238
|
||||
238 239
|
||||
239 240
|
||||
240 241
|
||||
241 242
|
||||
242 243
|
||||
243 244
|
||||
244 245
|
||||
245 246
|
||||
246 247
|
||||
247 248
|
||||
248 249
|
||||
249 250
|
||||
250 251
|
||||
251 252
|
||||
252 253
|
||||
253 254
|
||||
254 255
|
||||
255 256
|
||||
256 257
|
||||
257 258
|
||||
258 259
|
||||
259 260
|
||||
260 261
|
||||
261 262
|
||||
262 263
|
||||
263 264
|
||||
264 265
|
||||
265 266
|
||||
266 267
|
||||
267 268
|
||||
268 269
|
||||
269 270
|
||||
270 271
|
||||
271 272
|
||||
272 273
|
||||
273 274
|
||||
274 275
|
||||
275 276
|
||||
276 277
|
||||
277 278
|
||||
278 279
|
||||
279 280
|
||||
280 281
|
||||
281 282
|
||||
282 283
|
||||
283 284
|
||||
284 285
|
||||
285 286
|
||||
286 287
|
||||
287 288
|
||||
288 289
|
||||
289 290
|
||||
290 291
|
||||
291 292
|
||||
292 293
|
||||
293 294
|
||||
294 295
|
||||
295 296
|
||||
296 297
|
||||
297 298
|
||||
298 299
|
||||
299 300
|
||||
300 301
|
||||
301 302
|
||||
302 303
|
||||
303 304
|
||||
304 305
|
||||
305 306
|
||||
306 307
|
||||
307 308
|
||||
308 309
|
||||
309 310
|
||||
310 311
|
||||
311 312
|
||||
312 313
|
||||
313 314
|
||||
314 315
|
||||
315 316
|
||||
316 317
|
||||
317 318
|
||||
318 319
|
||||
319 320
|
||||
320 321
|
||||
321 322
|
||||
322 323
|
||||
323 324
|
||||
324 325
|
||||
325 326
|
||||
326 327
|
||||
327 328
|
||||
328 329
|
||||
329 330
|
||||
330 331
|
||||
331 332
|
||||
332 333
|
||||
333 334
|
||||
334 335
|
||||
335 336
|
||||
336 337
|
||||
337 338
|
||||
338 339
|
||||
339 340
|
||||
340 341
|
||||
341 342
|
||||
342 343
|
||||
343 344
|
||||
344 345
|
||||
345 346
|
||||
346 347
|
||||
347 348
|
||||
348 349
|
||||
349 350
|
||||
350 351
|
||||
351 352
|
||||
352 353
|
||||
353 354
|
||||
354 355
|
||||
355 356
|
||||
356 357
|
||||
357 358
|
||||
358 359
|
||||
359 360
|
||||
360 361
|
||||
361 362
|
||||
362 363
|
||||
363 364
|
||||
364 365
|
||||
365 366
|
||||
366 367
|
||||
367 368
|
||||
368 369
|
||||
369 370
|
||||
370 371
|
||||
371 372
|
||||
372 373
|
||||
373 374
|
||||
374 375
|
||||
375 376
|
||||
376 377
|
||||
377 378
|
||||
378 379
|
||||
379 380
|
||||
380 381
|
||||
381 382
|
||||
382 383
|
||||
383 384
|
||||
384 385
|
||||
385 386
|
||||
386 387
|
||||
387 388
|
||||
388 389
|
||||
389 390
|
||||
390 391
|
||||
391 392
|
||||
392 393
|
||||
393 394
|
||||
394 395
|
||||
395 396
|
||||
396 397
|
||||
397 398
|
||||
398 399
|
||||
399 400
|
||||
400 401
|
||||
401 402
|
||||
402 403
|
||||
403 404
|
||||
404 405
|
||||
405 406
|
||||
406 407
|
||||
407 408
|
||||
408 409
|
||||
409 410
|
||||
410 411
|
||||
411 412
|
||||
412 413
|
||||
413 414
|
||||
414 415
|
||||
415 416
|
||||
416 417
|
||||
417 418
|
||||
418 419
|
||||
419 420
|
||||
420 421
|
||||
421 422
|
||||
422 423
|
||||
423 424
|
||||
424 425
|
||||
425 426
|
||||
426 427
|
||||
427 428
|
||||
428 429
|
||||
429 430
|
||||
430 431
|
||||
431 432
|
||||
432 433
|
||||
433 434
|
||||
434 435
|
||||
435 436
|
||||
436 437
|
||||
437 438
|
||||
438 439
|
||||
439 440
|
||||
440 441
|
||||
441 442
|
||||
442 443
|
||||
443 444
|
||||
444 445
|
||||
445 446
|
||||
446 447
|
||||
447 448
|
||||
448 449
|
||||
449 450
|
||||
450 451
|
||||
451 452
|
||||
452 453
|
||||
453 454
|
||||
454 455
|
||||
455 456
|
||||
456 457
|
||||
457 458
|
||||
458 459
|
||||
459 460
|
||||
460 461
|
||||
461 462
|
||||
462 463
|
||||
463 464
|
||||
464 465
|
||||
465 466
|
||||
466 467
|
||||
467 468
|
||||
468 469
|
||||
469 470
|
||||
470 471
|
||||
471 472
|
||||
472 473
|
||||
473 474
|
||||
474 475
|
||||
475 476
|
||||
476 477
|
||||
477 478
|
||||
478 479
|
||||
479 480
|
||||
480 481
|
||||
481 482
|
||||
482 483
|
||||
483 484
|
||||
484 485
|
||||
485 486
|
||||
486 487
|
||||
487 488
|
||||
488 489
|
||||
489 490
|
||||
490 491
|
||||
491 492
|
||||
492 493
|
||||
493 494
|
||||
494 495
|
||||
495 496
|
||||
496 497
|
||||
497 498
|
||||
498 499
|
||||
499 500
|
||||
500 501
|
||||
501 502
|
||||
502 503
|
||||
503 504
|
||||
504 505
|
||||
505 506
|
||||
506 507
|
||||
507 508
|
||||
508 509
|
||||
509 510
|
||||
510 511
|
||||
511 512
|
||||
512 513
|
||||
513 514
|
||||
514 515
|
||||
515 516
|
||||
516 517
|
||||
517 518
|
||||
518 519
|
||||
519 520
|
||||
520 521
|
||||
521 522
|
||||
522 523
|
||||
523 524
|
||||
524 525
|
||||
525 526
|
||||
526 527
|
||||
527 528
|
||||
528 529
|
||||
529 530
|
||||
530 531
|
||||
531 532
|
||||
532 533
|
||||
533 534
|
||||
534 535
|
||||
535 536
|
||||
536 537
|
||||
537 538
|
||||
538 539
|
||||
539 540
|
||||
540 541
|
||||
541 542
|
||||
542 543
|
||||
543 544
|
||||
544 545
|
||||
545 546
|
||||
546 547
|
||||
547 548
|
||||
548 549
|
||||
549 550
|
||||
550 551
|
||||
551 552
|
||||
552 553
|
||||
553 554
|
||||
554 555
|
||||
555 556
|
||||
556 557
|
||||
557 558
|
||||
558 559
|
||||
559 560
|
||||
560 561
|
||||
561 562
|
||||
562 563
|
||||
563 564
|
||||
564 565
|
||||
565 566
|
||||
566 567
|
||||
567 568
|
||||
568 569
|
||||
569 570
|
||||
570 571
|
||||
571 572
|
||||
572 573
|
||||
573 574
|
||||
574 575
|
||||
575 576
|
||||
576 577
|
||||
577 578
|
||||
578 579
|
||||
579 580
|
||||
580 581
|
||||
581 582
|
||||
582 583
|
||||
583 584
|
||||
584 585
|
||||
585 586
|
||||
586 587
|
||||
587 588
|
||||
588 589
|
||||
589 590
|
||||
590 591
|
||||
591 592
|
||||
592 593
|
||||
593 594
|
||||
594 595
|
||||
595 596
|
||||
596 597
|
||||
597 598
|
||||
598 599
|
||||
599 600
|
||||
600 601
|
||||
601 602
|
||||
602 603
|
||||
603 604
|
||||
604 605
|
||||
605 606
|
||||
606 607
|
||||
607 608
|
||||
608 609
|
||||
609 610
|
||||
610 611
|
||||
611 612
|
||||
612 613
|
||||
613 614
|
||||
614 615
|
||||
615 616
|
||||
616 617
|
||||
617 618
|
||||
879
gatinhos/input/12
Normal file
879
gatinhos/input/12
Normal file
@@ -0,0 +1,879 @@
|
||||
878 106
|
||||
0 0 1 1 0 0 1 0 0 1 1 1 1 1 1 1 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 1 1 1 0 0 1 0 0 1 0 0 1 1 1 0 1 1 0 1 1 1 0 0 0 1 1 0 1 0 0 1 1 1 1 0 0 0 0 1 0 0 0 1 0 1 1 1 1 1 0 0 1 1 1 1 0 0 1 1 1 0 0 0 0 1 0 0 0 0 1 0 1 0 0 0 0 0 0 0 0 0 1 1 0 1 1 1 1 0 1 1 0 1 1 1 0 0 0 0 0 1 0 1 0 1 1 0 0 1 0 0 0 0 0 0 0 0 1 1 0 1 0 0 0 0 0 0 0 0 1 1 1 0 1 0 0 1 1 0 0 1 1 1 1 0 1 1 0 0 0 0 0 1 0 0 1 0 0 0 0 0 1 0 0 0 1 1 0 1 1 1 0 0 0 0 0 1 0 0 1 0 1 0 1 0 1 0 1 0 0 1 1 0 0 1 0 0 1 0 0 1 0 0 0 0 1 0 1 0 1 1 0 1 1 0 1 1 0 1 1 0 1 0 0 0 0 1 1 1 1 0 0 1 0 1 0 1 0 0 1 1 0 0 1 0 0 1 1 1 0 0 0 0 0 1 0 1 1 0 1 1 1 1 0 1 1 0 1 0 1 0 1 1 0 1 0 1 1 0 0 1 1 0 1 0 0 0 1 1 0 1 1 0 1 0 0 0 0 0 1 0 0 0 1 0 0 1 0 1 0 1 0 0 0 0 1 0 1 1 0 0 0 1 0 0 1 1 1 0 0 0 1 0 1 0 0 0 0 1 0 1 1 0 1 0 0 1 0 0 0 1 1 1 1 1 0 0 0 0 0 1 0 1 1 1 1 1 1 0 1 0 0 1 1 1 0 0 1 1 0 1 0 0 1 0 0 1 0 0 1 0 1 1 1 0 1 1 1 1 0 1 1 0 1 0 1 1 1 0 0 1 1 1 0 0 1 0 0 0 1 0 0 0 1 0 1 0 0 0 1 1 1 0 1 1 0 1 0 1 0 0 0 0 0 1 0 0 0 1 0 0 1 0 1 1 0 1 0 1 0 1 1 1 0 0 0 1 1 0 1 0 0 0 0 1 0 0 0 1 0 0 0 1 1 0 1 0 0 1 1 0 0 0 1 0 1 1 1 1 1 1 0 1 1 1 0 1 0 1 0 0 1 0 0 0 1 0 0 1 1 0 1 1 1 0 0 0 1 0 0 0 1 0 1 1 0 0 0 0 0 1 1 1 1 1 1 1 0 1 0 1 0 1 1 0 1 1 0 0 1 0 0 0 0 1 1 1 1 0 0 0 1 1 1 1 1 0 0 0 1 0 1 0 1 0 1 1 0 1 1 1 1 1 0 1 0 1 1 1 0 0 0 0 0 1 0 0 1 1 1 0 1 0 1 1 1 0 0 0 0 0 0 1 1 1 0 1 0 0 0 0 0 1 0 0 1 1 1 1 1 0 1 0 0 1 0 1 1 1 0 1 1 1 0 1 0 0 0 1 0 1 1 1 1 1 0 1 0 1 1 0 1 0 1 1 1 0 0 0 1 0 0 0 0 1 0 1 1 1 0 1 1 0 1 0 0 1 1 1 1 0 0 0 0 1 1 0 0 1 0 0 1 1 0 0 1 0 1 0 0 0 1 0 0 0 0 1 1 0 1 1 0 1 0 0 0 1 0 1 1 0 0 1 1 0 1 1 1 1 1 1 0 1 1 0 1 0 0 0 0 1 0 1 0 1 1 1 0 1 0 0 0 0 0 1 1 0 1 0 0 0 0 1 1 1 1 0 0 1 1 0 1 1 0 1 0 1 1 0 1 1 0 0 1 1 0 0 1 0 0 0 1 1 1 0 1 1 1 1 1 1 1 1 0 0 0 1 1 0 1 1 1 0 1 0 1 0 0 0 0 0 1 1 1 1 0 0
|
||||
1 2
|
||||
1 588
|
||||
2 3
|
||||
2 479
|
||||
2 527
|
||||
2 657
|
||||
2 699
|
||||
3 4
|
||||
4 5
|
||||
4 461
|
||||
4 526
|
||||
4 719
|
||||
5 6
|
||||
5 613
|
||||
5 825
|
||||
6 7
|
||||
7 8
|
||||
7 542
|
||||
7 787
|
||||
7 866
|
||||
8 9
|
||||
8 773
|
||||
8 844
|
||||
9 10
|
||||
10 11
|
||||
10 473
|
||||
10 653
|
||||
11 12
|
||||
11 597
|
||||
12 13
|
||||
12 533
|
||||
12 766
|
||||
13 14
|
||||
14 15
|
||||
14 754
|
||||
15 16
|
||||
16 17
|
||||
16 679
|
||||
17 18
|
||||
17 658
|
||||
18 19
|
||||
19 20
|
||||
19 836
|
||||
20 21
|
||||
20 596
|
||||
20 683
|
||||
20 849
|
||||
21 22
|
||||
21 627
|
||||
22 23
|
||||
22 793
|
||||
22 795
|
||||
23 24
|
||||
23 862
|
||||
24 25
|
||||
25 26
|
||||
25 686
|
||||
25 737
|
||||
26 27
|
||||
26 774
|
||||
26 839
|
||||
27 28
|
||||
27 450
|
||||
27 858
|
||||
28 29
|
||||
28 853
|
||||
29 30
|
||||
30 31
|
||||
30 814
|
||||
31 32
|
||||
31 667
|
||||
31 704
|
||||
32 33
|
||||
33 34
|
||||
33 525
|
||||
34 35
|
||||
35 36
|
||||
35 451
|
||||
36 37
|
||||
37 38
|
||||
38 39
|
||||
39 40
|
||||
39 488
|
||||
40 41
|
||||
40 477
|
||||
40 864
|
||||
41 42
|
||||
41 878
|
||||
42 43
|
||||
43 44
|
||||
44 45
|
||||
45 46
|
||||
46 47
|
||||
46 842
|
||||
46 851
|
||||
47 48
|
||||
48 49
|
||||
48 721
|
||||
48 724
|
||||
49 50
|
||||
49 784
|
||||
50 51
|
||||
50 459
|
||||
51 52
|
||||
51 872
|
||||
52 53
|
||||
53 54
|
||||
53 770
|
||||
54 55
|
||||
54 731
|
||||
55 56
|
||||
55 622
|
||||
55 732
|
||||
56 57
|
||||
56 504
|
||||
56 659
|
||||
57 58
|
||||
57 495
|
||||
58 59
|
||||
59 60
|
||||
60 61
|
||||
60 776
|
||||
60 846
|
||||
61 62
|
||||
61 614
|
||||
61 621
|
||||
61 848
|
||||
62 63
|
||||
62 744
|
||||
63 64
|
||||
64 65
|
||||
65 66
|
||||
66 67
|
||||
66 518
|
||||
67 68
|
||||
67 678
|
||||
67 753
|
||||
68 69
|
||||
69 70
|
||||
69 472
|
||||
69 729
|
||||
69 857
|
||||
70 71
|
||||
71 72
|
||||
71 638
|
||||
71 717
|
||||
72 73
|
||||
73 74
|
||||
73 756
|
||||
74 75
|
||||
75 76
|
||||
75 537
|
||||
76 77
|
||||
76 639
|
||||
77 78
|
||||
77 608
|
||||
77 665
|
||||
78 79
|
||||
79 80
|
||||
80 81
|
||||
81 82
|
||||
81 824
|
||||
82 83
|
||||
82 528
|
||||
82 644
|
||||
83 84
|
||||
84 85
|
||||
84 798
|
||||
85 86
|
||||
86 87
|
||||
87 88
|
||||
87 746
|
||||
88 89
|
||||
89 90
|
||||
89 855
|
||||
90 91
|
||||
90 748
|
||||
90 875
|
||||
91 92
|
||||
92 93
|
||||
92 535
|
||||
93 94
|
||||
93 578
|
||||
93 600
|
||||
93 612
|
||||
94 95
|
||||
95 96
|
||||
95 716
|
||||
95 743
|
||||
96 97
|
||||
96 476
|
||||
96 551
|
||||
96 680
|
||||
97 98
|
||||
97 468
|
||||
98 99
|
||||
98 534
|
||||
99 100
|
||||
99 739
|
||||
99 763
|
||||
100 101
|
||||
100 831
|
||||
101 102
|
||||
101 759
|
||||
101 863
|
||||
102 103
|
||||
103 104
|
||||
104 105
|
||||
105 106
|
||||
105 501
|
||||
105 524
|
||||
106 107
|
||||
106 571
|
||||
107 108
|
||||
108 109
|
||||
108 466
|
||||
109 110
|
||||
109 492
|
||||
110 111
|
||||
111 112
|
||||
112 113
|
||||
112 546
|
||||
112 592
|
||||
113 114
|
||||
113 532
|
||||
113 761
|
||||
114 115
|
||||
115 116
|
||||
116 117
|
||||
117 118
|
||||
117 513
|
||||
118 119
|
||||
118 822
|
||||
119 120
|
||||
119 470
|
||||
120 121
|
||||
120 765
|
||||
121 122
|
||||
121 620
|
||||
122 123
|
||||
122 482
|
||||
122 709
|
||||
123 124
|
||||
124 125
|
||||
125 126
|
||||
125 723
|
||||
126 127
|
||||
127 128
|
||||
127 467
|
||||
127 652
|
||||
128 129
|
||||
128 760
|
||||
129 130
|
||||
130 131
|
||||
131 132
|
||||
131 675
|
||||
132 133
|
||||
133 134
|
||||
133 523
|
||||
134 135
|
||||
134 449
|
||||
134 823
|
||||
135 136
|
||||
136 137
|
||||
136 749
|
||||
137 138
|
||||
138 139
|
||||
139 140
|
||||
139 819
|
||||
140 141
|
||||
140 455
|
||||
141 142
|
||||
141 448
|
||||
141 599
|
||||
141 693
|
||||
141 745
|
||||
142 143
|
||||
143 144
|
||||
143 544
|
||||
144 145
|
||||
144 626
|
||||
144 790
|
||||
145 146
|
||||
145 812
|
||||
146 147
|
||||
147 148
|
||||
147 783
|
||||
148 149
|
||||
148 583
|
||||
149 150
|
||||
149 593
|
||||
149 707
|
||||
149 861
|
||||
150 151
|
||||
150 457
|
||||
151 152
|
||||
151 779
|
||||
152 153
|
||||
153 154
|
||||
154 155
|
||||
155 156
|
||||
155 852
|
||||
156 157
|
||||
156 769
|
||||
156 807
|
||||
157 158
|
||||
158 159
|
||||
158 481
|
||||
158 720
|
||||
159 160
|
||||
159 758
|
||||
160 161
|
||||
160 641
|
||||
161 162
|
||||
161 568
|
||||
161 788
|
||||
161 803
|
||||
162 163
|
||||
162 800
|
||||
162 829
|
||||
163 164
|
||||
163 607
|
||||
163 873
|
||||
164 165
|
||||
165 166
|
||||
165 531
|
||||
165 615
|
||||
166 167
|
||||
167 168
|
||||
167 649
|
||||
168 169
|
||||
168 469
|
||||
169 170
|
||||
170 171
|
||||
171 172
|
||||
172 173
|
||||
173 174
|
||||
173 581
|
||||
173 674
|
||||
174 175
|
||||
174 703
|
||||
175 176
|
||||
175 718
|
||||
176 177
|
||||
176 701
|
||||
177 178
|
||||
177 728
|
||||
177 820
|
||||
178 179
|
||||
178 669
|
||||
178 818
|
||||
179 180
|
||||
179 602
|
||||
179 838
|
||||
180 181
|
||||
181 182
|
||||
182 183
|
||||
183 184
|
||||
183 633
|
||||
183 740
|
||||
184 185
|
||||
184 677
|
||||
185 186
|
||||
185 453
|
||||
185 636
|
||||
185 730
|
||||
186 187
|
||||
186 447
|
||||
186 797
|
||||
187 188
|
||||
188 189
|
||||
188 811
|
||||
189 190
|
||||
190 191
|
||||
190 494
|
||||
190 574
|
||||
190 804
|
||||
191 192
|
||||
191 573
|
||||
192 193
|
||||
192 539
|
||||
193 194
|
||||
193 786
|
||||
194 195
|
||||
195 196
|
||||
195 806
|
||||
196 197
|
||||
197 198
|
||||
197 815
|
||||
198 199
|
||||
198 752
|
||||
199 200
|
||||
199 802
|
||||
200 201
|
||||
200 859
|
||||
201 202
|
||||
201 624
|
||||
201 646
|
||||
202 203
|
||||
202 585
|
||||
202 660
|
||||
203 204
|
||||
203 565
|
||||
203 661
|
||||
204 205
|
||||
204 663
|
||||
205 206
|
||||
205 553
|
||||
206 207
|
||||
206 695
|
||||
207 208
|
||||
207 689
|
||||
207 876
|
||||
208 209
|
||||
209 210
|
||||
209 619
|
||||
210 211
|
||||
211 212
|
||||
211 656
|
||||
212 213
|
||||
212 471
|
||||
212 498
|
||||
212 817
|
||||
213 214
|
||||
214 215
|
||||
215 216
|
||||
215 877
|
||||
216 217
|
||||
216 692
|
||||
216 869
|
||||
217 218
|
||||
217 445
|
||||
217 517
|
||||
218 219
|
||||
219 220
|
||||
219 713
|
||||
220 221
|
||||
220 586
|
||||
221 222
|
||||
221 634
|
||||
222 223
|
||||
223 224
|
||||
223 789
|
||||
224 225
|
||||
225 226
|
||||
225 601
|
||||
226 227
|
||||
226 548
|
||||
226 603
|
||||
227 228
|
||||
227 781
|
||||
228 229
|
||||
228 502
|
||||
228 867
|
||||
229 230
|
||||
229 536
|
||||
230 231
|
||||
231 232
|
||||
231 845
|
||||
232 233
|
||||
232 508
|
||||
232 751
|
||||
232 791
|
||||
233 234
|
||||
234 235
|
||||
234 832
|
||||
235 236
|
||||
236 237
|
||||
236 549
|
||||
236 828
|
||||
237 238
|
||||
237 514
|
||||
237 726
|
||||
238 239
|
||||
239 240
|
||||
239 530
|
||||
239 545
|
||||
240 241
|
||||
241 242
|
||||
241 446
|
||||
241 490
|
||||
241 538
|
||||
242 243
|
||||
243 244
|
||||
244 245
|
||||
245 246
|
||||
245 698
|
||||
245 767
|
||||
246 247
|
||||
247 248
|
||||
248 249
|
||||
249 250
|
||||
249 547
|
||||
249 750
|
||||
250 251
|
||||
250 642
|
||||
250 780
|
||||
251 252
|
||||
251 555
|
||||
252 253
|
||||
252 694
|
||||
253 254
|
||||
254 255
|
||||
255 256
|
||||
256 257
|
||||
257 258
|
||||
257 519
|
||||
257 630
|
||||
257 821
|
||||
258 259
|
||||
258 572
|
||||
258 625
|
||||
259 260
|
||||
260 261
|
||||
261 262
|
||||
262 263
|
||||
262 556
|
||||
263 264
|
||||
263 598
|
||||
263 700
|
||||
263 755
|
||||
264 265
|
||||
264 474
|
||||
264 483
|
||||
265 266
|
||||
265 741
|
||||
266 267
|
||||
266 722
|
||||
267 268
|
||||
267 805
|
||||
268 269
|
||||
269 270
|
||||
269 558
|
||||
269 715
|
||||
270 271
|
||||
270 552
|
||||
270 648
|
||||
270 792
|
||||
271 272
|
||||
272 273
|
||||
273 274
|
||||
273 841
|
||||
274 275
|
||||
275 276
|
||||
275 837
|
||||
276 277
|
||||
277 278
|
||||
277 443
|
||||
278 279
|
||||
279 280
|
||||
279 506
|
||||
280 281
|
||||
280 559
|
||||
281 282
|
||||
281 480
|
||||
282 283
|
||||
282 664
|
||||
283 284
|
||||
283 456
|
||||
283 503
|
||||
284 285
|
||||
285 286
|
||||
285 684
|
||||
286 287
|
||||
286 654
|
||||
286 865
|
||||
287 288
|
||||
288 289
|
||||
288 493
|
||||
289 290
|
||||
290 291
|
||||
291 292
|
||||
291 772
|
||||
291 834
|
||||
292 293
|
||||
292 762
|
||||
293 294
|
||||
294 295
|
||||
295 296
|
||||
296 297
|
||||
296 587
|
||||
296 682
|
||||
297 298
|
||||
297 505
|
||||
297 605
|
||||
298 299
|
||||
298 696
|
||||
299 300
|
||||
300 301
|
||||
300 576
|
||||
300 666
|
||||
301 302
|
||||
302 303
|
||||
303 304
|
||||
304 305
|
||||
304 507
|
||||
304 830
|
||||
305 306
|
||||
305 570
|
||||
306 307
|
||||
306 670
|
||||
306 714
|
||||
306 840
|
||||
307 308
|
||||
307 645
|
||||
307 685
|
||||
307 711
|
||||
308 309
|
||||
308 520
|
||||
308 635
|
||||
308 813
|
||||
309 310
|
||||
310 311
|
||||
311 312
|
||||
311 782
|
||||
312 313
|
||||
313 314
|
||||
313 775
|
||||
314 315
|
||||
314 521
|
||||
315 316
|
||||
315 643
|
||||
316 317
|
||||
316 757
|
||||
316 850
|
||||
317 318
|
||||
318 319
|
||||
319 320
|
||||
319 452
|
||||
319 835
|
||||
320 321
|
||||
320 794
|
||||
321 322
|
||||
321 854
|
||||
322 323
|
||||
323 324
|
||||
323 463
|
||||
323 487
|
||||
324 325
|
||||
325 326
|
||||
325 557
|
||||
326 327
|
||||
326 491
|
||||
326 705
|
||||
327 328
|
||||
327 496
|
||||
327 725
|
||||
327 801
|
||||
328 329
|
||||
329 330
|
||||
329 590
|
||||
329 676
|
||||
330 331
|
||||
331 332
|
||||
331 632
|
||||
332 333
|
||||
333 334
|
||||
333 833
|
||||
334 335
|
||||
334 460
|
||||
334 604
|
||||
335 336
|
||||
335 697
|
||||
336 337
|
||||
337 338
|
||||
337 623
|
||||
337 734
|
||||
338 339
|
||||
338 541
|
||||
338 560
|
||||
338 712
|
||||
338 808
|
||||
338 826
|
||||
339 340
|
||||
339 485
|
||||
340 341
|
||||
341 342
|
||||
342 343
|
||||
342 610
|
||||
343 344
|
||||
344 345
|
||||
344 742
|
||||
345 346
|
||||
346 347
|
||||
346 486
|
||||
347 348
|
||||
347 673
|
||||
348 349
|
||||
348 454
|
||||
349 350
|
||||
349 562
|
||||
350 351
|
||||
350 637
|
||||
351 352
|
||||
351 668
|
||||
351 733
|
||||
352 353
|
||||
353 354
|
||||
354 355
|
||||
355 356
|
||||
356 357
|
||||
356 575
|
||||
356 650
|
||||
357 358
|
||||
358 359
|
||||
358 465
|
||||
359 360
|
||||
359 710
|
||||
360 361
|
||||
361 362
|
||||
362 363
|
||||
363 364
|
||||
363 706
|
||||
364 365
|
||||
364 616
|
||||
364 708
|
||||
365 366
|
||||
365 868
|
||||
366 367
|
||||
366 764
|
||||
367 368
|
||||
367 567
|
||||
368 369
|
||||
368 499
|
||||
369 370
|
||||
370 371
|
||||
371 372
|
||||
372 373
|
||||
372 543
|
||||
372 843
|
||||
373 374
|
||||
373 509
|
||||
374 375
|
||||
374 860
|
||||
375 376
|
||||
375 777
|
||||
376 377
|
||||
376 554
|
||||
377 378
|
||||
378 379
|
||||
379 380
|
||||
380 381
|
||||
380 444
|
||||
381 382
|
||||
382 383
|
||||
383 384
|
||||
383 629
|
||||
383 810
|
||||
384 385
|
||||
384 856
|
||||
385 386
|
||||
386 387
|
||||
386 516
|
||||
386 589
|
||||
387 388
|
||||
387 799
|
||||
388 389
|
||||
389 390
|
||||
389 478
|
||||
389 606
|
||||
389 640
|
||||
390 391
|
||||
391 392
|
||||
391 584
|
||||
392 393
|
||||
393 394
|
||||
393 582
|
||||
394 395
|
||||
394 727
|
||||
395 396
|
||||
395 500
|
||||
395 628
|
||||
396 397
|
||||
396 529
|
||||
396 580
|
||||
397 398
|
||||
397 662
|
||||
397 736
|
||||
397 871
|
||||
398 399
|
||||
398 475
|
||||
398 579
|
||||
399 400
|
||||
400 401
|
||||
400 566
|
||||
400 809
|
||||
401 402
|
||||
401 464
|
||||
402 403
|
||||
402 515
|
||||
403 404
|
||||
403 687
|
||||
404 405
|
||||
405 406
|
||||
405 489
|
||||
405 497
|
||||
405 595
|
||||
405 691
|
||||
405 747
|
||||
405 778
|
||||
405 785
|
||||
406 407
|
||||
406 577
|
||||
406 591
|
||||
406 594
|
||||
407 408
|
||||
408 409
|
||||
409 410
|
||||
409 688
|
||||
410 411
|
||||
411 412
|
||||
411 647
|
||||
412 413
|
||||
412 735
|
||||
413 414
|
||||
414 415
|
||||
415 416
|
||||
415 512
|
||||
416 417
|
||||
416 510
|
||||
416 561
|
||||
416 702
|
||||
417 418
|
||||
417 511
|
||||
417 569
|
||||
417 631
|
||||
417 651
|
||||
418 419
|
||||
418 690
|
||||
419 420
|
||||
420 421
|
||||
421 422
|
||||
422 423
|
||||
423 424
|
||||
423 484
|
||||
423 827
|
||||
424 425
|
||||
424 655
|
||||
425 426
|
||||
425 462
|
||||
426 427
|
||||
427 428
|
||||
428 429
|
||||
429 430
|
||||
430 431
|
||||
430 609
|
||||
430 738
|
||||
431 432
|
||||
431 681
|
||||
431 768
|
||||
432 433
|
||||
432 550
|
||||
432 564
|
||||
432 617
|
||||
433 434
|
||||
433 458
|
||||
433 522
|
||||
433 771
|
||||
434 435
|
||||
434 611
|
||||
434 870
|
||||
435 436
|
||||
435 618
|
||||
436 437
|
||||
436 847
|
||||
437 438
|
||||
437 540
|
||||
437 672
|
||||
438 439
|
||||
438 874
|
||||
439 440
|
||||
439 563
|
||||
439 796
|
||||
439 816
|
||||
440 441
|
||||
440 671
|
||||
441 442
|
||||
661
gatinhos/input/13
Normal file
661
gatinhos/input/13
Normal file
@@ -0,0 +1,661 @@
|
||||
660 350
|
||||
1 1 0 1 1 1 0 1 1 1 1 0 0 1 1 1 0 1 1 0 1 1 0 1 0 1 0 0 0 0 1 0 0 1 0 0 0 0 1 0 0 1 1 1 0 1 1 0 1 0 0 1 0 0 1 0 0 0 1 1 1 0 1 1 1 0 1 0 0 0 1 0 0 0 0 1 0 0 1 0 0 0 0 1 0 1 0 0 0 1 0 0 1 0 1 0 0 1 1 0 1 1 1 1 0 1 0 1 1 1 0 1 1 0 0 1 0 1 1 0 1 1 0 0 0 1 1 0 1 1 1 0 1 1 1 1 1 1 1 0 0 0 1 0 0 1 1 1 1 1 1 0 0 1 1 1 1 1 0 1 0 1 1 0 1 0 1 0 1 0 1 1 0 1 0 1 0 0 0 0 1 1 1 1 0 0 0 1 0 0 1 0 0 1 0 0 0 0 0 0 0 1 0 0 1 0 0 0 1 0 1 1 0 0 1 1 0 0 0 0 0 0 0 1 0 0 0 1 0 0 0 1 1 0 0 0 0 1 0 1 1 1 1 0 1 1 0 0 0 1 0 0 0 1 0 1 0 0 1 1 1 0 0 1 0 0 1 0 1 1 0 1 0 1 1 0 1 1 0 0 1 0 1 1 0 0 0 0 0 1 1 1 1 1 0 1 1 1 1 1 1 0 1 1 0 0 1 0 0 0 0 1 0 1 0 0 0 1 0 0 1 1 0 0 0 0 1 0 1 1 0 1 1 1 0 0 1 0 0 0 0 1 0 0 0 1 0 0 0 1 1 1 0 1 0 0 1 1 1 0 0 1 1 1 0 0 1 0 1 0 0 1 1 1 0 1 0 0 0 1 1 0 0 0 0 0 1 1 1 0 1 0 1 0 0 0 0 1 0 0 0 1 0 0 0 1 1 0 0 0 0 0 0 1 0 1 1 0 1 0 1 1 0 0 1 0 0 1 0 0 0 0 0 0 1 0 0 0 1 0 0 1 0 0 0 0 1 1 0 1 1 1 1 1 0 1 1 1 1 0 1 0 0 1 1 0 1 1 1 0 0 1 0 0 0 0 0 1 0 0 0 1 0 0 1 0 1 0 1 1 1 1 0 1 0 0 1 1 1 1 0 1 1 0 1 0 1 0 0 1 1 0 1 1 1 0 1 1 1 0 0 1 0 1 0 0 0 1 1 0 1 0 1 0 1 1 0 0 1 1 1 0 1 0 0 0 1 0 0 0 1 0 0 1 0 1 1 0 1 1 0 1 1 1 1 0 0 1 0 0 0 1 0 0 1 1 1 1 0 0 1 1 0 0 1 0 0 1 0 0 0 0 1 1 1 0 0 1 1 1 1 1 0 0 0 0 0 0 0 0 1 0 0 0 1 1 0 0 1 0 1 1 0 0 0 0 0 1 0 0 1 1 0 0 0 0 1 0 1 0 0 1 0 1 1 1 1 1 1 0 0 0 1 1 1 1 0 1 0 1
|
||||
1 11
|
||||
2 304
|
||||
3 323
|
||||
3 328
|
||||
3 594
|
||||
4 35
|
||||
4 370
|
||||
4 506
|
||||
5 175
|
||||
5 335
|
||||
6 87
|
||||
7 435
|
||||
8 460
|
||||
8 466
|
||||
8 611
|
||||
9 361
|
||||
9 432
|
||||
9 535
|
||||
10 65
|
||||
10 243
|
||||
10 362
|
||||
11 615
|
||||
12 478
|
||||
13 331
|
||||
14 21
|
||||
14 297
|
||||
14 298
|
||||
15 169
|
||||
15 170
|
||||
15 230
|
||||
16 165
|
||||
17 207
|
||||
18 556
|
||||
19 438
|
||||
20 96
|
||||
20 537
|
||||
21 176
|
||||
22 378
|
||||
22 454
|
||||
23 155
|
||||
23 440
|
||||
23 625
|
||||
24 492
|
||||
25 176
|
||||
25 461
|
||||
26 131
|
||||
26 568
|
||||
26 601
|
||||
26 646
|
||||
27 416
|
||||
27 434
|
||||
27 543
|
||||
28 548
|
||||
29 326
|
||||
29 539
|
||||
30 483
|
||||
31 69
|
||||
32 170
|
||||
32 522
|
||||
33 463
|
||||
33 526
|
||||
34 165
|
||||
36 313
|
||||
36 540
|
||||
36 548
|
||||
37 294
|
||||
37 653
|
||||
38 345
|
||||
39 574
|
||||
39 582
|
||||
40 162
|
||||
40 555
|
||||
41 279
|
||||
42 396
|
||||
43 228
|
||||
43 248
|
||||
43 620
|
||||
44 252
|
||||
44 403
|
||||
44 569
|
||||
45 371
|
||||
45 569
|
||||
46 634
|
||||
47 257
|
||||
47 489
|
||||
48 240
|
||||
49 530
|
||||
49 591
|
||||
50 150
|
||||
51 157
|
||||
51 555
|
||||
51 648
|
||||
52 239
|
||||
52 271
|
||||
52 279
|
||||
53 519
|
||||
54 214
|
||||
55 115
|
||||
55 563
|
||||
56 348
|
||||
56 423
|
||||
56 470
|
||||
57 425
|
||||
58 120
|
||||
58 449
|
||||
59 232
|
||||
59 594
|
||||
60 410
|
||||
61 203
|
||||
61 519
|
||||
62 140
|
||||
63 498
|
||||
64 581
|
||||
66 196
|
||||
66 267
|
||||
67 314
|
||||
67 380
|
||||
68 647
|
||||
69 89
|
||||
69 448
|
||||
70 78
|
||||
71 164
|
||||
72 345
|
||||
72 656
|
||||
73 186
|
||||
73 380
|
||||
73 638
|
||||
74 423
|
||||
74 657
|
||||
75 275
|
||||
75 540
|
||||
76 436
|
||||
76 485
|
||||
77 542
|
||||
78 250
|
||||
78 451
|
||||
78 483
|
||||
78 528
|
||||
79 557
|
||||
80 151
|
||||
80 326
|
||||
80 431
|
||||
81 188
|
||||
81 640
|
||||
82 199
|
||||
83 411
|
||||
84 225
|
||||
85 186
|
||||
86 641
|
||||
87 202
|
||||
87 217
|
||||
87 615
|
||||
88 366
|
||||
89 284
|
||||
89 398
|
||||
89 415
|
||||
90 650
|
||||
91 397
|
||||
91 600
|
||||
92 340
|
||||
93 505
|
||||
94 588
|
||||
95 469
|
||||
96 202
|
||||
97 458
|
||||
98 460
|
||||
99 176
|
||||
99 249
|
||||
99 443
|
||||
100 316
|
||||
101 107
|
||||
101 404
|
||||
102 628
|
||||
103 173
|
||||
103 596
|
||||
104 236
|
||||
104 618
|
||||
105 248
|
||||
105 649
|
||||
106 618
|
||||
107 363
|
||||
108 224
|
||||
108 335
|
||||
108 357
|
||||
109 366
|
||||
109 656
|
||||
110 557
|
||||
110 633
|
||||
111 276
|
||||
111 414
|
||||
111 567
|
||||
112 235
|
||||
112 367
|
||||
113 209
|
||||
114 193
|
||||
114 548
|
||||
115 301
|
||||
116 456
|
||||
117 527
|
||||
117 630
|
||||
118 497
|
||||
118 623
|
||||
119 185
|
||||
120 420
|
||||
120 503
|
||||
121 605
|
||||
122 218
|
||||
122 594
|
||||
123 557
|
||||
124 176
|
||||
124 285
|
||||
124 326
|
||||
124 480
|
||||
124 492
|
||||
125 442
|
||||
126 435
|
||||
127 436
|
||||
127 579
|
||||
128 197
|
||||
128 210
|
||||
128 245
|
||||
128 465
|
||||
129 198
|
||||
129 582
|
||||
130 313
|
||||
131 187
|
||||
131 282
|
||||
131 327
|
||||
132 316
|
||||
132 370
|
||||
132 424
|
||||
133 601
|
||||
134 225
|
||||
135 564
|
||||
136 388
|
||||
136 621
|
||||
137 390
|
||||
138 439
|
||||
138 498
|
||||
139 537
|
||||
139 570
|
||||
140 180
|
||||
141 565
|
||||
142 304
|
||||
143 617
|
||||
144 586
|
||||
145 567
|
||||
146 354
|
||||
147 274
|
||||
147 506
|
||||
148 378
|
||||
149 499
|
||||
150 166
|
||||
151 188
|
||||
152 652
|
||||
153 437
|
||||
153 512
|
||||
154 165
|
||||
154 246
|
||||
155 312
|
||||
156 245
|
||||
156 559
|
||||
156 628
|
||||
157 494
|
||||
158 469
|
||||
159 204
|
||||
159 461
|
||||
160 361
|
||||
161 315
|
||||
161 484
|
||||
163 212
|
||||
163 581
|
||||
164 216
|
||||
164 266
|
||||
166 307
|
||||
166 310
|
||||
166 324
|
||||
166 442
|
||||
167 291
|
||||
167 381
|
||||
168 183
|
||||
168 460
|
||||
168 478
|
||||
170 220
|
||||
170 329
|
||||
170 513
|
||||
171 574
|
||||
172 553
|
||||
173 311
|
||||
174 614
|
||||
177 409
|
||||
178 210
|
||||
178 321
|
||||
178 505
|
||||
178 549
|
||||
179 272
|
||||
179 407
|
||||
180 541
|
||||
181 660
|
||||
182 345
|
||||
183 482
|
||||
184 325
|
||||
185 212
|
||||
187 474
|
||||
189 236
|
||||
189 536
|
||||
190 575
|
||||
191 222
|
||||
191 359
|
||||
191 618
|
||||
192 226
|
||||
192 389
|
||||
193 486
|
||||
193 586
|
||||
194 311
|
||||
194 349
|
||||
195 380
|
||||
196 441
|
||||
196 445
|
||||
197 258
|
||||
197 657
|
||||
198 384
|
||||
198 560
|
||||
199 501
|
||||
200 358
|
||||
201 421
|
||||
202 303
|
||||
202 390
|
||||
203 309
|
||||
205 322
|
||||
205 479
|
||||
205 590
|
||||
206 460
|
||||
207 579
|
||||
208 654
|
||||
209 283
|
||||
209 575
|
||||
209 608
|
||||
211 229
|
||||
211 231
|
||||
211 596
|
||||
212 383
|
||||
213 333
|
||||
213 357
|
||||
213 496
|
||||
214 231
|
||||
215 521
|
||||
215 567
|
||||
217 301
|
||||
217 376
|
||||
218 306
|
||||
218 342
|
||||
219 322
|
||||
219 567
|
||||
219 660
|
||||
220 263
|
||||
221 326
|
||||
221 331
|
||||
221 501
|
||||
222 627
|
||||
223 626
|
||||
223 650
|
||||
224 385
|
||||
225 378
|
||||
225 439
|
||||
226 491
|
||||
227 428
|
||||
227 613
|
||||
228 233
|
||||
228 410
|
||||
229 659
|
||||
230 295
|
||||
230 467
|
||||
231 242
|
||||
231 435
|
||||
232 251
|
||||
232 277
|
||||
232 320
|
||||
232 354
|
||||
232 603
|
||||
233 377
|
||||
233 613
|
||||
234 263
|
||||
234 439
|
||||
237 352
|
||||
237 412
|
||||
237 453
|
||||
238 322
|
||||
240 326
|
||||
241 381
|
||||
241 561
|
||||
241 570
|
||||
243 255
|
||||
243 496
|
||||
244 464
|
||||
245 425
|
||||
245 515
|
||||
246 288
|
||||
246 332
|
||||
246 350
|
||||
246 637
|
||||
247 361
|
||||
247 467
|
||||
248 445
|
||||
250 253
|
||||
250 496
|
||||
251 475
|
||||
252 343
|
||||
254 353
|
||||
255 402
|
||||
256 412
|
||||
256 451
|
||||
257 505
|
||||
258 271
|
||||
259 263
|
||||
259 633
|
||||
260 277
|
||||
260 417
|
||||
260 617
|
||||
261 660
|
||||
262 600
|
||||
264 517
|
||||
265 337
|
||||
265 374
|
||||
265 401
|
||||
265 455
|
||||
265 529
|
||||
266 545
|
||||
268 491
|
||||
269 315
|
||||
270 577
|
||||
270 581
|
||||
272 397
|
||||
272 422
|
||||
272 639
|
||||
273 508
|
||||
274 485
|
||||
275 631
|
||||
278 298
|
||||
279 426
|
||||
279 629
|
||||
280 418
|
||||
280 530
|
||||
280 533
|
||||
281 414
|
||||
281 415
|
||||
285 391
|
||||
286 305
|
||||
286 560
|
||||
287 320
|
||||
287 583
|
||||
288 311
|
||||
288 392
|
||||
289 317
|
||||
290 385
|
||||
290 427
|
||||
291 385
|
||||
292 400
|
||||
292 623
|
||||
293 623
|
||||
294 632
|
||||
296 487
|
||||
297 353
|
||||
299 413
|
||||
300 520
|
||||
300 550
|
||||
301 456
|
||||
301 489
|
||||
302 351
|
||||
302 508
|
||||
303 367
|
||||
304 359
|
||||
305 585
|
||||
307 612
|
||||
308 581
|
||||
309 587
|
||||
310 313
|
||||
310 379
|
||||
311 554
|
||||
314 512
|
||||
314 531
|
||||
317 598
|
||||
318 516
|
||||
318 551
|
||||
319 366
|
||||
320 612
|
||||
322 655
|
||||
323 625
|
||||
324 458
|
||||
324 490
|
||||
324 524
|
||||
325 462
|
||||
325 487
|
||||
330 471
|
||||
334 601
|
||||
336 490
|
||||
336 651
|
||||
337 546
|
||||
338 634
|
||||
339 574
|
||||
340 635
|
||||
341 412
|
||||
341 509
|
||||
341 638
|
||||
342 488
|
||||
343 609
|
||||
344 347
|
||||
345 381
|
||||
346 527
|
||||
346 598
|
||||
346 645
|
||||
347 363
|
||||
347 569
|
||||
350 473
|
||||
353 373
|
||||
355 502
|
||||
355 549
|
||||
356 380
|
||||
356 636
|
||||
358 590
|
||||
359 604
|
||||
360 478
|
||||
360 586
|
||||
363 396
|
||||
363 564
|
||||
364 589
|
||||
365 447
|
||||
365 658
|
||||
366 463
|
||||
366 523
|
||||
368 550
|
||||
368 562
|
||||
369 455
|
||||
369 469
|
||||
372 425
|
||||
373 573
|
||||
375 577
|
||||
375 610
|
||||
376 382
|
||||
376 578
|
||||
376 606
|
||||
376 640
|
||||
377 504
|
||||
380 605
|
||||
383 554
|
||||
383 621
|
||||
384 568
|
||||
386 423
|
||||
386 552
|
||||
386 558
|
||||
387 508
|
||||
390 544
|
||||
391 598
|
||||
393 552
|
||||
394 562
|
||||
395 614
|
||||
395 644
|
||||
397 447
|
||||
398 534
|
||||
398 592
|
||||
398 603
|
||||
399 499
|
||||
401 624
|
||||
403 468
|
||||
404 599
|
||||
405 546
|
||||
406 459
|
||||
408 429
|
||||
409 648
|
||||
411 516
|
||||
413 481
|
||||
414 632
|
||||
416 450
|
||||
416 461
|
||||
418 550
|
||||
419 564
|
||||
421 527
|
||||
423 602
|
||||
428 547
|
||||
429 446
|
||||
429 448
|
||||
429 536
|
||||
430 433
|
||||
430 482
|
||||
432 532
|
||||
435 571
|
||||
436 491
|
||||
438 592
|
||||
438 641
|
||||
439 503
|
||||
443 542
|
||||
444 634
|
||||
446 648
|
||||
447 495
|
||||
447 655
|
||||
452 535
|
||||
453 507
|
||||
457 506
|
||||
459 596
|
||||
460 619
|
||||
461 575
|
||||
462 516
|
||||
464 516
|
||||
464 616
|
||||
469 647
|
||||
471 634
|
||||
472 592
|
||||
473 508
|
||||
473 587
|
||||
476 615
|
||||
477 530
|
||||
481 530
|
||||
483 579
|
||||
484 606
|
||||
490 643
|
||||
492 572
|
||||
493 527
|
||||
494 535
|
||||
494 593
|
||||
495 517
|
||||
495 637
|
||||
499 587
|
||||
500 526
|
||||
500 545
|
||||
506 541
|
||||
506 603
|
||||
507 516
|
||||
509 644
|
||||
510 550
|
||||
510 589
|
||||
511 559
|
||||
513 565
|
||||
514 581
|
||||
518 607
|
||||
520 566
|
||||
525 628
|
||||
529 653
|
||||
535 553
|
||||
538 579
|
||||
540 622
|
||||
543 599
|
||||
543 634
|
||||
551 582
|
||||
556 574
|
||||
556 623
|
||||
557 595
|
||||
558 566
|
||||
575 650
|
||||
576 647
|
||||
577 588
|
||||
580 610
|
||||
584 625
|
||||
592 642
|
||||
597 618
|
||||
604 654
|
||||
607 631
|
||||
613 625
|
||||
626 635
|
||||
627 652
|
||||
10573
gatinhos/input/14
Normal file
10573
gatinhos/input/14
Normal file
File diff suppressed because one or more lines are too long
15086
gatinhos/input/15
Normal file
15086
gatinhos/input/15
Normal file
File diff suppressed because one or more lines are too long
14900
gatinhos/input/16
Normal file
14900
gatinhos/input/16
Normal file
File diff suppressed because one or more lines are too long
15246
gatinhos/input/17
Normal file
15246
gatinhos/input/17
Normal file
File diff suppressed because one or more lines are too long
19982
gatinhos/input/18
Normal file
19982
gatinhos/input/18
Normal file
File diff suppressed because one or more lines are too long
100001
gatinhos/input/19
Normal file
100001
gatinhos/input/19
Normal file
File diff suppressed because one or more lines are too long
8
gatinhos/input/2
Normal file
8
gatinhos/input/2
Normal file
@@ -0,0 +1,8 @@
|
||||
7 1
|
||||
1 0 1 1 0 0 0
|
||||
1 2
|
||||
1 3
|
||||
2 4
|
||||
2 5
|
||||
3 6
|
||||
3 7
|
||||
100001
gatinhos/input/20
Normal file
100001
gatinhos/input/20
Normal file
File diff suppressed because one or more lines are too long
100001
gatinhos/input/21
Normal file
100001
gatinhos/input/21
Normal file
File diff suppressed because one or more lines are too long
100001
gatinhos/input/22
Normal file
100001
gatinhos/input/22
Normal file
File diff suppressed because one or more lines are too long
11
gatinhos/input/3
Normal file
11
gatinhos/input/3
Normal file
@@ -0,0 +1,11 @@
|
||||
10 10
|
||||
0 1 0 1 0 0 0 0 1 1
|
||||
1 5
|
||||
1 10
|
||||
2 6
|
||||
2 7
|
||||
3 8
|
||||
3 9
|
||||
4 5
|
||||
7 8
|
||||
7 10
|
||||
11
gatinhos/input/4
Normal file
11
gatinhos/input/4
Normal file
@@ -0,0 +1,11 @@
|
||||
10 1
|
||||
0 1 0 1 0 1 0 0 0 1
|
||||
1 10
|
||||
2 6
|
||||
2 7
|
||||
3 7
|
||||
3 10
|
||||
4 8
|
||||
4 10
|
||||
5 7
|
||||
7 9
|
||||
7
gatinhos/input/5
Normal file
7
gatinhos/input/5
Normal file
@@ -0,0 +1,7 @@
|
||||
6 1
|
||||
0 0 1 0 0 0
|
||||
1 2
|
||||
1 3
|
||||
1 4
|
||||
1 5
|
||||
1 6
|
||||
4
gatinhos/input/6
Normal file
4
gatinhos/input/6
Normal file
@@ -0,0 +1,4 @@
|
||||
3 3
|
||||
0 0 1
|
||||
1 2
|
||||
2 3
|
||||
4
gatinhos/input/7
Normal file
4
gatinhos/input/7
Normal file
@@ -0,0 +1,4 @@
|
||||
3 2
|
||||
1 1 1
|
||||
1 2
|
||||
1 3
|
||||
8
gatinhos/input/8
Normal file
8
gatinhos/input/8
Normal file
@@ -0,0 +1,8 @@
|
||||
7 4
|
||||
0 1 1 1 1 1 1
|
||||
1 3
|
||||
2 7
|
||||
3 4
|
||||
4 6
|
||||
5 7
|
||||
6 7
|
||||
709
gatinhos/input/9
Normal file
709
gatinhos/input/9
Normal file
@@ -0,0 +1,709 @@
|
||||
708 245
|
||||
0 0 1 1 0 0 0 1 0 0 1 1 1 1 1 0 0 1 0 0 1 0 1 1 0 0 0 0 1 1 0 1 1 1 1 0 1 1 1 0 0 0 1 0 0 1 1 0 0 0 1 1 1 1 0 0 0 1 0 0 1 1 1 0 0 0 0 1 1 1 1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 0 1 0 0 0 0 0 1 1 1 0 1 1 0 1 0 0 0 1 0 1 0 1 1 1 1 0 0 0 1 0 0 1 0 1 0 1 0 1 1 0 0 0 1 1 1 1 0 1 1 0 0 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 1 1 1 1 1 1 1 1 1 0 0 0 0 1 1 0 1 1 1 0 1 1 0 1 1 1 0 1 0 0 0 0 1 0 1 0 0 0 0 1 1 0 0 1 0 1 1 0 1 1 1 1 1 0 1 1 0 0 1 1 0 1 0 1 1 1 1 1 0 0 1 1 1 0 1 1 1 1 0 1 0 1 1 1 0 0 0 1 1 1 0 1 0 1 0 0 0 1 1 0 1 1 1 1 1 1 0 0 1 0 1 0 1 0 1 1 0 0 1 1 1 0 1 1 0 0 0 0 1 0 0 0 1 0 0 0 1 0 1 1 0 1 1 1 0 1 0 0 1 1 1 0 0 0 0 1 1 0 0 1 0 1 0 0 0 1 1 0 1 0 0 1 1 1 1 0 1 1 1 1 1 1 0 0 1 0 0 0 1 0 0 0 0 1 0 0 1 0 0 1 1 1 1 0 1 1 0 0 0 0 0 0 1 1 1 0 0 0 1 0 1 1 1 0 1 0 0 1 1 1 0 1 1 0 1 1 1 1 0 1 1 1 1 1 1 1 0 0 1 0 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 0 1 1 1 0 1 1 0 1 1 0 1 1 1 1 0 0 1 0 1 0 0 1 1 1 0 0 0 1 1 1 1 1 0 0 0 1 0 0 1 1 1 0 0 0 1 1 1 0 1 0 1 1 0 1 1 1 0 0 1 1 1 1 1 1 0 1 1 0 1 1 1 0 1 0 0 1 0 0 1 1 0 1 0 1 1 1 0 1 0 1 1 0 1 0 1 1 0 0 0 0 1 0 0 0 0 1 0 0 0 1 1 1 1 1 1 0 0 0 1 1 1 1 0 1 1 0 0 1 0 0 0 0 0 1 1 1 1 0 0 0 1 0 1 0 1 0 0 1 0 1 1 1 0 0 0 0 1 1 0 1 0 1 0 0 0 1 0 1 1 1 0 0 1 0 0 0 1 0 1 0 1 1 0 0 0 1 0 0 0 0 1 1 0 0 0 0 0 1 0 1 0 0 1 1 0 1 1 1 0 0 0 0 1 0 1 1 1 1 1 0 0 1 0 1 1 1 0 1 1 1 0 1 1 0 0 0 1 1 1 0 1 0 0 1 1 0 1 0 0 0 0 0 0 0 1 1 1 1 0 0 0 0 0 0 1 0 0 1 0 0 1 1 1 0 1 0 1 0 0 1 1 0 0 1 1 1 0 1
|
||||
1 411
|
||||
2 127
|
||||
2 623
|
||||
3 120
|
||||
3 660
|
||||
3 663
|
||||
4 5
|
||||
4 524
|
||||
6 647
|
||||
7 130
|
||||
7 221
|
||||
7 706
|
||||
8 264
|
||||
8 395
|
||||
9 52
|
||||
9 279
|
||||
9 495
|
||||
9 656
|
||||
10 113
|
||||
10 183
|
||||
11 350
|
||||
12 616
|
||||
13 194
|
||||
13 230
|
||||
14 331
|
||||
14 430
|
||||
15 423
|
||||
15 478
|
||||
15 688
|
||||
16 224
|
||||
16 418
|
||||
16 445
|
||||
17 160
|
||||
18 362
|
||||
18 421
|
||||
18 513
|
||||
19 200
|
||||
19 295
|
||||
19 560
|
||||
20 352
|
||||
20 424
|
||||
21 136
|
||||
21 567
|
||||
21 703
|
||||
22 375
|
||||
23 212
|
||||
24 48
|
||||
24 118
|
||||
24 505
|
||||
24 508
|
||||
24 680
|
||||
25 228
|
||||
26 579
|
||||
27 250
|
||||
27 333
|
||||
28 232
|
||||
28 292
|
||||
29 143
|
||||
29 275
|
||||
29 513
|
||||
30 302
|
||||
30 350
|
||||
31 539
|
||||
32 523
|
||||
33 170
|
||||
33 569
|
||||
34 540
|
||||
34 701
|
||||
35 244
|
||||
35 306
|
||||
35 312
|
||||
35 561
|
||||
35 607
|
||||
36 226
|
||||
36 252
|
||||
36 396
|
||||
36 691
|
||||
37 129
|
||||
37 632
|
||||
38 196
|
||||
38 327
|
||||
39 496
|
||||
40 633
|
||||
41 77
|
||||
41 95
|
||||
41 393
|
||||
42 78
|
||||
42 389
|
||||
43 44
|
||||
43 119
|
||||
43 601
|
||||
44 297
|
||||
44 572
|
||||
45 247
|
||||
45 418
|
||||
46 242
|
||||
46 370
|
||||
46 503
|
||||
47 363
|
||||
48 79
|
||||
48 459
|
||||
48 649
|
||||
49 59
|
||||
49 433
|
||||
50 151
|
||||
50 206
|
||||
50 562
|
||||
50 617
|
||||
51 209
|
||||
51 697
|
||||
52 463
|
||||
53 360
|
||||
54 673
|
||||
55 59
|
||||
56 701
|
||||
57 315
|
||||
57 346
|
||||
58 218
|
||||
60 144
|
||||
61 329
|
||||
61 592
|
||||
62 375
|
||||
63 74
|
||||
63 81
|
||||
63 93
|
||||
64 479
|
||||
65 487
|
||||
66 211
|
||||
66 259
|
||||
66 582
|
||||
66 588
|
||||
67 272
|
||||
68 306
|
||||
68 309
|
||||
68 669
|
||||
69 232
|
||||
69 272
|
||||
69 511
|
||||
70 416
|
||||
70 660
|
||||
71 130
|
||||
72 309
|
||||
73 79
|
||||
73 491
|
||||
74 422
|
||||
75 141
|
||||
75 393
|
||||
75 591
|
||||
76 83
|
||||
76 438
|
||||
77 479
|
||||
77 641
|
||||
78 282
|
||||
79 580
|
||||
80 677
|
||||
81 191
|
||||
81 658
|
||||
82 499
|
||||
84 121
|
||||
85 517
|
||||
85 518
|
||||
86 635
|
||||
87 693
|
||||
88 133
|
||||
88 232
|
||||
88 407
|
||||
88 460
|
||||
89 109
|
||||
89 394
|
||||
90 414
|
||||
91 395
|
||||
91 647
|
||||
92 208
|
||||
92 574
|
||||
93 286
|
||||
93 595
|
||||
94 129
|
||||
94 346
|
||||
94 433
|
||||
96 469
|
||||
97 392
|
||||
98 432
|
||||
98 608
|
||||
99 260
|
||||
99 404
|
||||
100 685
|
||||
101 325
|
||||
102 581
|
||||
102 648
|
||||
103 617
|
||||
104 316
|
||||
104 379
|
||||
105 470
|
||||
106 151
|
||||
107 134
|
||||
107 308
|
||||
108 435
|
||||
109 420
|
||||
110 225
|
||||
110 323
|
||||
111 293
|
||||
111 439
|
||||
111 639
|
||||
112 216
|
||||
113 226
|
||||
114 621
|
||||
115 212
|
||||
115 444
|
||||
115 625
|
||||
115 699
|
||||
116 523
|
||||
117 661
|
||||
117 678
|
||||
118 443
|
||||
120 300
|
||||
121 343
|
||||
121 570
|
||||
122 141
|
||||
123 160
|
||||
123 683
|
||||
124 524
|
||||
124 602
|
||||
124 694
|
||||
125 532
|
||||
126 163
|
||||
127 165
|
||||
128 174
|
||||
128 392
|
||||
130 290
|
||||
130 665
|
||||
130 692
|
||||
131 268
|
||||
131 633
|
||||
132 451
|
||||
132 656
|
||||
133 214
|
||||
134 429
|
||||
134 455
|
||||
135 475
|
||||
136 145
|
||||
136 353
|
||||
136 483
|
||||
137 383
|
||||
138 233
|
||||
138 497
|
||||
139 246
|
||||
139 255
|
||||
140 632
|
||||
142 153
|
||||
144 529
|
||||
145 241
|
||||
145 676
|
||||
146 596
|
||||
147 268
|
||||
147 448
|
||||
148 226
|
||||
149 460
|
||||
149 640
|
||||
150 345
|
||||
151 342
|
||||
151 701
|
||||
152 416
|
||||
153 476
|
||||
153 573
|
||||
154 466
|
||||
155 361
|
||||
156 322
|
||||
156 380
|
||||
156 430
|
||||
157 370
|
||||
157 417
|
||||
157 637
|
||||
158 594
|
||||
159 424
|
||||
160 471
|
||||
160 684
|
||||
161 210
|
||||
162 323
|
||||
162 616
|
||||
163 228
|
||||
163 675
|
||||
164 390
|
||||
164 669
|
||||
165 192
|
||||
165 307
|
||||
166 281
|
||||
166 348
|
||||
167 532
|
||||
168 479
|
||||
169 330
|
||||
171 326
|
||||
171 579
|
||||
172 285
|
||||
172 527
|
||||
172 611
|
||||
173 205
|
||||
173 464
|
||||
174 215
|
||||
174 674
|
||||
175 222
|
||||
176 187
|
||||
176 587
|
||||
177 557
|
||||
177 593
|
||||
178 619
|
||||
179 452
|
||||
180 475
|
||||
180 502
|
||||
181 361
|
||||
181 548
|
||||
181 644
|
||||
182 487
|
||||
182 595
|
||||
183 394
|
||||
184 209
|
||||
184 428
|
||||
185 619
|
||||
186 194
|
||||
186 612
|
||||
187 401
|
||||
188 489
|
||||
188 662
|
||||
189 568
|
||||
189 583
|
||||
190 226
|
||||
193 329
|
||||
194 264
|
||||
194 636
|
||||
195 508
|
||||
197 361
|
||||
198 643
|
||||
199 353
|
||||
200 339
|
||||
200 675
|
||||
201 598
|
||||
202 319
|
||||
202 520
|
||||
203 604
|
||||
204 236
|
||||
204 674
|
||||
205 491
|
||||
207 267
|
||||
208 304
|
||||
209 328
|
||||
210 363
|
||||
210 543
|
||||
211 438
|
||||
211 475
|
||||
211 485
|
||||
212 638
|
||||
213 249
|
||||
216 305
|
||||
217 594
|
||||
218 305
|
||||
219 239
|
||||
219 400
|
||||
220 526
|
||||
220 663
|
||||
222 403
|
||||
223 277
|
||||
223 281
|
||||
223 571
|
||||
223 584
|
||||
224 249
|
||||
225 687
|
||||
227 344
|
||||
227 526
|
||||
229 619
|
||||
230 517
|
||||
230 700
|
||||
231 361
|
||||
231 374
|
||||
232 613
|
||||
233 482
|
||||
234 520
|
||||
235 334
|
||||
236 373
|
||||
237 320
|
||||
238 257
|
||||
238 460
|
||||
239 596
|
||||
240 412
|
||||
240 427
|
||||
241 354
|
||||
241 355
|
||||
242 532
|
||||
243 552
|
||||
244 654
|
||||
245 352
|
||||
245 635
|
||||
246 419
|
||||
246 589
|
||||
246 707
|
||||
247 278
|
||||
248 454
|
||||
248 466
|
||||
250 524
|
||||
251 324
|
||||
251 431
|
||||
251 432
|
||||
252 477
|
||||
253 317
|
||||
254 257
|
||||
255 311
|
||||
255 359
|
||||
256 446
|
||||
256 531
|
||||
257 307
|
||||
257 327
|
||||
257 450
|
||||
257 543
|
||||
258 640
|
||||
260 388
|
||||
260 425
|
||||
260 553
|
||||
261 643
|
||||
261 644
|
||||
262 322
|
||||
263 573
|
||||
263 583
|
||||
264 674
|
||||
265 655
|
||||
266 611
|
||||
267 332
|
||||
267 359
|
||||
268 433
|
||||
269 321
|
||||
269 513
|
||||
269 528
|
||||
270 658
|
||||
271 330
|
||||
271 371
|
||||
271 385
|
||||
271 622
|
||||
272 620
|
||||
273 688
|
||||
274 479
|
||||
275 622
|
||||
276 552
|
||||
277 548
|
||||
278 463
|
||||
278 510
|
||||
280 311
|
||||
280 397
|
||||
281 465
|
||||
281 631
|
||||
282 434
|
||||
283 473
|
||||
284 400
|
||||
285 370
|
||||
285 705
|
||||
287 532
|
||||
288 541
|
||||
289 296
|
||||
289 699
|
||||
291 581
|
||||
292 474
|
||||
293 488
|
||||
293 506
|
||||
294 705
|
||||
297 466
|
||||
298 320
|
||||
298 348
|
||||
298 682
|
||||
299 546
|
||||
299 616
|
||||
300 666
|
||||
301 344
|
||||
301 490
|
||||
301 550
|
||||
301 673
|
||||
302 629
|
||||
302 659
|
||||
303 500
|
||||
304 607
|
||||
305 426
|
||||
305 502
|
||||
308 396
|
||||
309 378
|
||||
309 398
|
||||
309 517
|
||||
310 549
|
||||
313 588
|
||||
314 375
|
||||
314 401
|
||||
317 413
|
||||
318 328
|
||||
318 364
|
||||
322 410
|
||||
324 391
|
||||
325 566
|
||||
325 664
|
||||
332 624
|
||||
333 341
|
||||
334 364
|
||||
334 442
|
||||
334 652
|
||||
335 475
|
||||
336 500
|
||||
337 397
|
||||
338 507
|
||||
339 422
|
||||
340 397
|
||||
341 357
|
||||
343 630
|
||||
345 486
|
||||
345 592
|
||||
346 651
|
||||
347 489
|
||||
348 414
|
||||
348 650
|
||||
349 420
|
||||
351 574
|
||||
352 659
|
||||
356 463
|
||||
358 511
|
||||
359 617
|
||||
360 383
|
||||
360 533
|
||||
363 554
|
||||
364 708
|
||||
365 419
|
||||
365 597
|
||||
366 586
|
||||
367 441
|
||||
367 680
|
||||
368 555
|
||||
368 585
|
||||
369 470
|
||||
369 619
|
||||
370 600
|
||||
371 458
|
||||
372 424
|
||||
372 641
|
||||
375 535
|
||||
376 694
|
||||
377 640
|
||||
379 511
|
||||
380 472
|
||||
381 631
|
||||
382 624
|
||||
383 603
|
||||
383 695
|
||||
384 462
|
||||
384 517
|
||||
385 507
|
||||
386 490
|
||||
386 505
|
||||
387 574
|
||||
388 458
|
||||
389 652
|
||||
391 463
|
||||
391 555
|
||||
394 552
|
||||
395 575
|
||||
396 588
|
||||
398 609
|
||||
399 564
|
||||
399 690
|
||||
400 654
|
||||
401 522
|
||||
402 652
|
||||
403 639
|
||||
405 521
|
||||
405 629
|
||||
406 453
|
||||
408 487
|
||||
409 505
|
||||
410 542
|
||||
410 698
|
||||
411 653
|
||||
412 570
|
||||
413 535
|
||||
413 538
|
||||
414 679
|
||||
415 485
|
||||
427 539
|
||||
427 550
|
||||
429 699
|
||||
432 591
|
||||
434 594
|
||||
435 486
|
||||
436 549
|
||||
437 555
|
||||
438 499
|
||||
440 651
|
||||
445 457
|
||||
446 486
|
||||
447 619
|
||||
449 681
|
||||
450 696
|
||||
451 466
|
||||
451 471
|
||||
452 549
|
||||
453 508
|
||||
453 594
|
||||
456 471
|
||||
457 667
|
||||
461 565
|
||||
465 549
|
||||
466 537
|
||||
466 694
|
||||
467 541
|
||||
467 661
|
||||
468 544
|
||||
468 628
|
||||
469 488
|
||||
469 616
|
||||
471 586
|
||||
472 494
|
||||
473 519
|
||||
473 664
|
||||
474 551
|
||||
478 698
|
||||
480 553
|
||||
481 520
|
||||
481 559
|
||||
482 525
|
||||
482 599
|
||||
484 601
|
||||
487 615
|
||||
489 565
|
||||
490 496
|
||||
492 608
|
||||
492 626
|
||||
493 617
|
||||
494 598
|
||||
494 611
|
||||
495 556
|
||||
495 638
|
||||
496 564
|
||||
498 537
|
||||
500 575
|
||||
501 671
|
||||
504 660
|
||||
505 558
|
||||
506 670
|
||||
507 665
|
||||
507 689
|
||||
509 529
|
||||
509 572
|
||||
512 680
|
||||
512 702
|
||||
514 524
|
||||
515 628
|
||||
516 690
|
||||
519 637
|
||||
520 673
|
||||
522 639
|
||||
523 536
|
||||
523 562
|
||||
523 577
|
||||
527 703
|
||||
530 708
|
||||
531 616
|
||||
532 599
|
||||
534 698
|
||||
538 662
|
||||
541 610
|
||||
545 640
|
||||
545 697
|
||||
547 582
|
||||
552 619
|
||||
553 659
|
||||
557 610
|
||||
557 686
|
||||
560 641
|
||||
563 650
|
||||
564 657
|
||||
567 588
|
||||
568 677
|
||||
569 664
|
||||
570 604
|
||||
570 646
|
||||
571 645
|
||||
576 584
|
||||
578 634
|
||||
578 662
|
||||
579 588
|
||||
581 604
|
||||
589 621
|
||||
590 624
|
||||
591 655
|
||||
596 668
|
||||
596 671
|
||||
602 631
|
||||
603 696
|
||||
605 703
|
||||
606 620
|
||||
607 697
|
||||
611 642
|
||||
614 652
|
||||
618 627
|
||||
618 636
|
||||
621 672
|
||||
624 669
|
||||
627 681
|
||||
628 653
|
||||
628 688
|
||||
629 657
|
||||
633 671
|
||||
638 661
|
||||
639 677
|
||||
640 693
|
||||
641 685
|
||||
649 677
|
||||
699 704
|
||||
188
gatinhos/maratona.cls
Normal file
188
gatinhos/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
gatinhos/output/1
Normal file
1
gatinhos/output/1
Normal file
@@ -0,0 +1 @@
|
||||
2
|
||||
1
gatinhos/output/10
Normal file
1
gatinhos/output/10
Normal file
@@ -0,0 +1 @@
|
||||
537
|
||||
1
gatinhos/output/11
Normal file
1
gatinhos/output/11
Normal file
@@ -0,0 +1 @@
|
||||
1
|
||||
1
gatinhos/output/12
Normal file
1
gatinhos/output/12
Normal file
@@ -0,0 +1 @@
|
||||
437
|
||||
1
gatinhos/output/13
Normal file
1
gatinhos/output/13
Normal file
@@ -0,0 +1 @@
|
||||
245
|
||||
1
gatinhos/output/14
Normal file
1
gatinhos/output/14
Normal file
@@ -0,0 +1 @@
|
||||
3917
|
||||
1
gatinhos/output/15
Normal file
1
gatinhos/output/15
Normal file
@@ -0,0 +1 @@
|
||||
15084
|
||||
1
gatinhos/output/16
Normal file
1
gatinhos/output/16
Normal file
@@ -0,0 +1 @@
|
||||
1
|
||||
1
gatinhos/output/17
Normal file
1
gatinhos/output/17
Normal file
@@ -0,0 +1 @@
|
||||
13067
|
||||
1
gatinhos/output/18
Normal file
1
gatinhos/output/18
Normal file
@@ -0,0 +1 @@
|
||||
7341
|
||||
1
gatinhos/output/19
Normal file
1
gatinhos/output/19
Normal file
@@ -0,0 +1 @@
|
||||
36757
|
||||
1
gatinhos/output/2
Normal file
1
gatinhos/output/2
Normal file
@@ -0,0 +1 @@
|
||||
2
|
||||
1
gatinhos/output/20
Normal file
1
gatinhos/output/20
Normal file
@@ -0,0 +1 @@
|
||||
99999
|
||||
1
gatinhos/output/21
Normal file
1
gatinhos/output/21
Normal file
@@ -0,0 +1 @@
|
||||
1
|
||||
1
gatinhos/output/22
Normal file
1
gatinhos/output/22
Normal file
@@ -0,0 +1 @@
|
||||
35521
|
||||
1
gatinhos/output/3
Normal file
1
gatinhos/output/3
Normal file
@@ -0,0 +1 @@
|
||||
3
|
||||
1
gatinhos/output/4
Normal file
1
gatinhos/output/4
Normal file
@@ -0,0 +1 @@
|
||||
2
|
||||
1
gatinhos/output/5
Normal file
1
gatinhos/output/5
Normal file
@@ -0,0 +1 @@
|
||||
5
|
||||
1
gatinhos/output/6
Normal file
1
gatinhos/output/6
Normal file
@@ -0,0 +1 @@
|
||||
1
|
||||
1
gatinhos/output/7
Normal file
1
gatinhos/output/7
Normal file
@@ -0,0 +1 @@
|
||||
2
|
||||
1
gatinhos/output/8
Normal file
1
gatinhos/output/8
Normal file
@@ -0,0 +1 @@
|
||||
0
|
||||
1
gatinhos/output/9
Normal file
1
gatinhos/output/9
Normal file
@@ -0,0 +1 @@
|
||||
266
|
||||
64
gatinhos/problem.json
Normal file
64
gatinhos/problem.json
Normal file
@@ -0,0 +1,64 @@
|
||||
{
|
||||
"version": "1.0",
|
||||
"problem": {
|
||||
"title": "Gatinhos",
|
||||
"event": "",
|
||||
"time_limit": 1.0,
|
||||
"memory_limit_mb": 256,
|
||||
"input_file": "stdin",
|
||||
"output_file": "stdout",
|
||||
"interactive": false,
|
||||
"grader": false,
|
||||
"subject": {
|
||||
"en_us": [
|
||||
"dfs", "trees", "bfs"
|
||||
],
|
||||
"pt_br": [
|
||||
"busca-em-profundidade", "arvores", "busca-em-largura"
|
||||
],
|
||||
"es": [
|
||||
""
|
||||
]
|
||||
}
|
||||
},
|
||||
"author": {
|
||||
"name": "Arthur Andrade D'Olival",
|
||||
"affiliation": "",
|
||||
"country": "",
|
||||
"email": ""
|
||||
},
|
||||
"build": {
|
||||
"run_generator": true,
|
||||
"run_validator": true,
|
||||
"produce_outputs": true,
|
||||
"run_checker": true,
|
||||
"run_all_solutions": true,
|
||||
"run_specific_solution": "",
|
||||
"generate_io_only": false,
|
||||
"generate_pdf_only": false,
|
||||
"cpu_count": 1,
|
||||
"build_pdf": true,
|
||||
"pdf_format": "ds",
|
||||
"io_samples": 2
|
||||
},
|
||||
"solutions": {
|
||||
"main-ac": "ac.cpp",
|
||||
"alternative-ac": ["alternative-ac.py"],
|
||||
"wrong-answer": ["wa.cpp"],
|
||||
"time-limit": [],
|
||||
"time-limit-or-ac": [],
|
||||
"time-limit-or-memory-limit": [],
|
||||
"memory-limit": [],
|
||||
"presentation-error": [],
|
||||
"runtime-error": []
|
||||
},
|
||||
"polygon_config": {
|
||||
"id": ""
|
||||
},
|
||||
"boca_config": {
|
||||
"time_limit": 1,
|
||||
"number_of_repetitions": 1,
|
||||
"maximum_memory_mb": 512,
|
||||
"maximum_output_size_kb": 24096
|
||||
}
|
||||
}
|
||||
BIN
gatinhos/sample-01.png
Normal file
BIN
gatinhos/sample-01.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 3.1 KiB |
BIN
gatinhos/sample-02.png
Normal file
BIN
gatinhos/sample-02.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 5.0 KiB |
62
gatinhos/src/ac.cpp
Normal file
62
gatinhos/src/ac.cpp
Normal file
@@ -0,0 +1,62 @@
|
||||
#include <bits/stdc++.h>
|
||||
|
||||
using namespace std;
|
||||
using vi = vector<int>;
|
||||
|
||||
const int MAXN = 1e5 + 10;
|
||||
|
||||
vector<vi> g(MAXN);
|
||||
bitset<MAXN> vis;
|
||||
bitset<MAXN> cats;
|
||||
|
||||
int n, m;
|
||||
|
||||
int dfs(int x, int catsSoFar = 0){
|
||||
vis[x]=1;
|
||||
if (cats[x]) {
|
||||
catsSoFar++;
|
||||
if (catsSoFar > m) return 0;
|
||||
} else {
|
||||
catsSoFar = 0;
|
||||
}
|
||||
if (g[x].size() == 1 && x != 1) return 1;
|
||||
int paths = 0;
|
||||
for (auto n : g[x]) {
|
||||
if (!vis[n]) paths+=dfs(n, catsSoFar);
|
||||
}
|
||||
return paths;
|
||||
}
|
||||
|
||||
void solve()
|
||||
{
|
||||
vis.reset();
|
||||
cats.reset();
|
||||
cin >> n >> m;
|
||||
for (int i = 1; i <= n; i++) {
|
||||
int b; cin >> b;
|
||||
cats[i] = b;
|
||||
}
|
||||
|
||||
for (int i = 1; i <= n - 1; i++) {
|
||||
int u, v; cin >> u >> v;
|
||||
g[u].push_back(v);
|
||||
g[v].push_back(u);
|
||||
}
|
||||
|
||||
cout << dfs(1) << endl;
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
int main()
|
||||
{
|
||||
ios::sync_with_stdio(0);
|
||||
cin.tie(0); cout.tie(0);
|
||||
int testCases = 1;
|
||||
// cin >> testCases;
|
||||
for (int t = 1; t <= testCases; t++){
|
||||
// cout << "Case #" << t << ": ";
|
||||
solve();
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
52
gatinhos/src/alternative-ac.py
Normal file
52
gatinhos/src/alternative-ac.py
Normal file
@@ -0,0 +1,52 @@
|
||||
import sys
|
||||
|
||||
sys.setrecursionlimit(200000)
|
||||
|
||||
def solve():
|
||||
input_data = sys.stdin.read().split()
|
||||
if not input_data:
|
||||
return
|
||||
|
||||
n = int(input_data[0])
|
||||
m = int(input_data[1])
|
||||
|
||||
cats = [0] * (n + 1)
|
||||
for i in range(1, n + 1):
|
||||
cats[i] = int(input_data[1 + i])
|
||||
|
||||
adj = [[] for _ in range(n + 1)]
|
||||
idx = 2 + n
|
||||
for _ in range(n - 1):
|
||||
u = int(input_data[idx])
|
||||
v = int(input_data[idx+1])
|
||||
idx += 2
|
||||
adj[u].append(v)
|
||||
adj[v].append(u)
|
||||
|
||||
ans = 0
|
||||
stack = [(1, 0, 0)]
|
||||
|
||||
while stack:
|
||||
u, p, c = stack.pop()
|
||||
|
||||
if cats[u]:
|
||||
c += 1
|
||||
else:
|
||||
c = 0
|
||||
|
||||
if c > m:
|
||||
continue
|
||||
|
||||
is_leaf = True
|
||||
for v in adj[u]:
|
||||
if v != p:
|
||||
is_leaf = False
|
||||
stack.append((v, u, c))
|
||||
|
||||
if is_leaf:
|
||||
ans += 1
|
||||
|
||||
print(ans)
|
||||
|
||||
if __name__ == '__main__':
|
||||
solve()
|
||||
15
gatinhos/src/checker.cpp
Normal file
15
gatinhos/src/checker.cpp
Normal file
@@ -0,0 +1,15 @@
|
||||
#include "testlib.h"
|
||||
|
||||
using namespace std;
|
||||
|
||||
int main(int argc, char * argv[]) {
|
||||
registerTestlibCmd(argc, argv);
|
||||
|
||||
int ja = ans.readInt();
|
||||
int pa = ouf.readInt();
|
||||
|
||||
if (ja != pa)
|
||||
quitf(_wa, "expected %d, found %d", ja, pa);
|
||||
|
||||
quitf(_ok, "answer is %d", ja);
|
||||
}
|
||||
108
gatinhos/src/generator.cpp
Normal file
108
gatinhos/src/generator.cpp
Normal file
@@ -0,0 +1,108 @@
|
||||
#include "jngen.h"
|
||||
#include <bits/stdc++.h>
|
||||
|
||||
using namespace std;
|
||||
|
||||
const int MIN_N = 2;
|
||||
const int MAX_N = 100000;
|
||||
|
||||
template <typename T> void append(vector<T> &dest, const vector<T> &orig) {
|
||||
dest.insert(dest.end(), orig.begin(), orig.end());
|
||||
}
|
||||
|
||||
string output_tc_file(int n, int type = 0) {
|
||||
ostringstream oss;
|
||||
int m = rnd.next(1, n);
|
||||
oss << n << " " << m << "\n";
|
||||
|
||||
for (int i = 1; i <= n; i++) {
|
||||
oss << rnd.next(0, 1) << (i == n ? "" : " ");
|
||||
}
|
||||
oss << "\n";
|
||||
|
||||
Tree tree;
|
||||
if (type == 0) tree = Tree::random(n);
|
||||
else if (type == 1) tree = Tree::star(n);
|
||||
else if (type == 2) tree = Tree::bamboo(n);
|
||||
else if (type == 3) tree = Tree::caterpillar(n, max(1, rnd.next(1, n)));
|
||||
else tree = Tree::random(n);
|
||||
|
||||
vector<pair<int, int>> edges = tree.edges();
|
||||
for (auto e : edges) {
|
||||
oss << e.first + 1 << " " << e.second + 1 << "\n";
|
||||
}
|
||||
return oss.str();
|
||||
}
|
||||
|
||||
string generate_random_tc_file(int min_n, int max_n, int type) {
|
||||
int n = rnd.next(min_n, max_n);
|
||||
return output_tc_file(n, type);
|
||||
}
|
||||
|
||||
string generate_manual_sample(int n, int m, vector<int> cats, const vector<pair<int, int>>& edges) {
|
||||
ostringstream oss;
|
||||
oss << n << " " << m << "\n";
|
||||
for (int i = 0; i < n; i++) {
|
||||
oss << cats[i] << (i == n - 1 ? "" : " ");
|
||||
}
|
||||
oss << "\n";
|
||||
for (auto e : edges) {
|
||||
oss << e.first << " " << e.second << "\n";
|
||||
}
|
||||
return oss.str();
|
||||
}
|
||||
|
||||
vector<string> generate_sample_tests() {
|
||||
vector<string> tests;
|
||||
tests.push_back(generate_manual_sample(4, 1, {1, 1, 0, 0}, {{1, 2}, {1, 3}, {1, 4}}));
|
||||
tests.push_back(generate_manual_sample(7, 1, {1, 0, 1, 1, 0, 0, 0}, {{1, 2}, {1, 3}, {2, 4}, {2, 5}, {3, 6}, {3, 7}}));
|
||||
return tests;
|
||||
}
|
||||
|
||||
vector<string> generate_manual_tests() {
|
||||
vector<string> tests;
|
||||
tests.push_back(output_tc_file(10));
|
||||
return tests;
|
||||
}
|
||||
|
||||
vector<string> generate_random_tests() {
|
||||
vector<string> tests;
|
||||
|
||||
for (int i = 0; i < 5; i++) {
|
||||
tests.push_back(generate_random_tc_file(MIN_N, 10, i % 4));
|
||||
}
|
||||
|
||||
for (int i = 0; i < 5; i++) {
|
||||
tests.push_back(generate_random_tc_file(10, 1000, i % 4));
|
||||
}
|
||||
|
||||
for (int i = 0; i < 5; i++) {
|
||||
tests.push_back(generate_random_tc_file(10000, 20000, i % 4));
|
||||
}
|
||||
|
||||
return tests;
|
||||
}
|
||||
|
||||
vector<string> generate_extreme_tests(){
|
||||
vector<string> tests;
|
||||
tests.push_back(output_tc_file(MAX_N, 0));
|
||||
tests.push_back(output_tc_file(MAX_N, 1));
|
||||
tests.push_back(output_tc_file(MAX_N, 2));
|
||||
tests.push_back(output_tc_file(MAX_N, 3));
|
||||
return tests;
|
||||
}
|
||||
|
||||
int main(int argc, char *argv[]) {
|
||||
registerGen(argc, argv, 1);
|
||||
vector<string> tests;
|
||||
size_t test = 0;
|
||||
append(tests, generate_sample_tests());
|
||||
append(tests, generate_manual_tests());
|
||||
append(tests, generate_random_tests());
|
||||
append(tests, generate_extreme_tests());
|
||||
for (const auto &t : tests) {
|
||||
startTest(++test);
|
||||
cout << t;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
7293
gatinhos/src/jngen.h
Normal file
7293
gatinhos/src/jngen.h
Normal file
File diff suppressed because it is too large
Load Diff
1
gatinhos/src/script.sh
Normal file
1
gatinhos/src/script.sh
Normal file
@@ -0,0 +1 @@
|
||||
generator
|
||||
5963
gatinhos/src/testlib.h
Normal file
5963
gatinhos/src/testlib.h
Normal file
File diff suppressed because it is too large
Load Diff
56
gatinhos/src/validator.cpp
Normal file
56
gatinhos/src/validator.cpp
Normal file
@@ -0,0 +1,56 @@
|
||||
#include "testlib.h"
|
||||
#include <vector>
|
||||
|
||||
using namespace std;
|
||||
|
||||
struct DSU {
|
||||
vector<int> parent;
|
||||
DSU(int n) {
|
||||
parent.resize(n + 1);
|
||||
for (int i = 1; i <= n; i++) parent[i] = i;
|
||||
}
|
||||
int find(int i) {
|
||||
if (parent[i] == i)
|
||||
return i;
|
||||
return parent[i] = find(parent[i]);
|
||||
}
|
||||
bool unite(int i, int j) {
|
||||
int root_i = find(i);
|
||||
int root_j = find(j);
|
||||
if (root_i != root_j) {
|
||||
parent[root_i] = root_j;
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
};
|
||||
|
||||
int main(int argc, char* argv[]) {
|
||||
registerValidation(argc, argv);
|
||||
|
||||
int n = inf.readInt(2, 1e5, "n");
|
||||
inf.readSpace();
|
||||
int m = inf.readInt(1, n, "m");
|
||||
inf.readEoln();
|
||||
|
||||
for (int i = 1; i <= n; i++) {
|
||||
inf.readInt(0, 1, "a_i");
|
||||
if (i < n) inf.readSpace();
|
||||
else inf.readEoln();
|
||||
}
|
||||
|
||||
DSU dsu(n);
|
||||
for (int i = 0; i < n - 1; i++) {
|
||||
int u = inf.readInt(1, n, "u");
|
||||
inf.readSpace();
|
||||
int v = inf.readInt(1, n, "v");
|
||||
inf.readEoln();
|
||||
|
||||
ensuref(u != v, "Edge must connect two different vertices");
|
||||
ensuref(dsu.unite(u, v), "Graph contains a cycle or is disconnected (not a tree)");
|
||||
}
|
||||
|
||||
inf.readEof();
|
||||
|
||||
return 0;
|
||||
}
|
||||
62
gatinhos/src/wa.cpp
Normal file
62
gatinhos/src/wa.cpp
Normal file
@@ -0,0 +1,62 @@
|
||||
#include <bits/stdc++.h>
|
||||
|
||||
using namespace std;
|
||||
using vi = vector<int>;
|
||||
|
||||
const int MAXN = 1e5 + 10;
|
||||
|
||||
vector<vi> g(MAXN);
|
||||
bitset<MAXN> vis;
|
||||
bitset<MAXN> cats;
|
||||
|
||||
int n, m;
|
||||
|
||||
int dfs(int x, int catsSoFar = 0){
|
||||
vis[x]=1;
|
||||
if (cats[x]) {
|
||||
catsSoFar++;
|
||||
if (catsSoFar > m) return 0;
|
||||
} else {
|
||||
catsSoFar = 0;
|
||||
}
|
||||
if (g[x].size() == 1) return 1;
|
||||
int paths = 0;
|
||||
for (auto n : g[x]) {
|
||||
if (!vis[n]) paths+=dfs(n, catsSoFar);
|
||||
}
|
||||
return paths;
|
||||
}
|
||||
|
||||
void solve()
|
||||
{
|
||||
vis.reset();
|
||||
cats.reset();
|
||||
cin >> n >> m;
|
||||
for (int i = 1; i <= n; i++) {
|
||||
int b; cin >> b;
|
||||
cats[i] = b;
|
||||
}
|
||||
|
||||
for (int i = 1; i <= n - 1; i++) {
|
||||
int u, v; cin >> u >> v;
|
||||
g[u].push_back(v);
|
||||
g[v].push_back(u);
|
||||
}
|
||||
|
||||
cout << dfs(1) << endl;
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
int main()
|
||||
{
|
||||
ios::sync_with_stdio(0);
|
||||
cin.tie(0); cout.tie(0);
|
||||
int testCases = 1;
|
||||
// cin >> testCases;
|
||||
for (int t = 1; t <= testCases; t++){
|
||||
// cout << "Case #" << t << ": ";
|
||||
solve();
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
12
gatinhos/statement/description.tex
Normal file
12
gatinhos/statement/description.tex
Normal file
@@ -0,0 +1,12 @@
|
||||
Bibi está visitando um grande abrigo de animais que tem o formato de uma árvore.
|
||||
O abrigo possui $n$ salas conectadas por $n-1$ corredores, e a entrada principal fica na sala $1$.
|
||||
Como é uma árvore, existe exatamente um caminho simples entre quaisquer duas salas.
|
||||
|
||||
Em algumas salas, há lindos gatinhos brincando. Bibi ama gatinhos, mas infelizmente ela tem uma leve alergia a eles.
|
||||
Ela sabe que, se passar por \textbf{mais de} $m$ salas consecutivas contendo gatinhos ao longo de seu caminho, sua alergia vai atacar e ela começará a espirrar sem parar!
|
||||
|
||||
As saídas do abrigo estão localizadas nas salas que são "folhas" dessa árvore.
|
||||
Uma sala é considerada uma folha se ela tem apenas um corredor conectado a ela e não é a sala da entrada principal.
|
||||
|
||||
Bibi sempre caminha se afastando da entrada principal.
|
||||
Ela quer saber: quantas saídas diferentes do abrigo ela consegue alcançar a partir da entrada sem que sua alergia ataque em nenhum momento do caminho?
|
||||
5
gatinhos/statement/input.tex
Normal file
5
gatinhos/statement/input.tex
Normal file
@@ -0,0 +1,5 @@
|
||||
A primeira linha da entrada contém dois inteiros $n$ e $m$ ($2 \le n \le 10^5, 1 \le m \le n$), indicando o número de salas no abrigo e o número máximo tolerado de salas consecutivas com gatinhos.
|
||||
|
||||
A segunda linha contém $n$ inteiros $a_1, a_2, \ldots, a_n$ ($a_i \in \{0, 1\}$). Se $a_i = 1$, a sala $i$ tem gatinhos. Se $a_i = 0$, a sala $i$ não tem gatinhos.
|
||||
|
||||
As próximas $n-1$ linhas descrevem os corredores do abrigo. Cada linha contém dois inteiros $u$ e $v$ ($1 \le u, v \le n, u \neq v$), indicando um corredor entre as salas $u$ e $v$. É garantido que os corredores formam uma árvore válida enraizada em $1$.
|
||||
21
gatinhos/statement/notes.tex
Normal file
21
gatinhos/statement/notes.tex
Normal file
@@ -0,0 +1,21 @@
|
||||
Vamos lembrar que uma árvore é um grafo conexo com $n$ vértices (salas) e $n-1$ arestas (corredores). Uma árvore enraizada é uma árvore com um vértice especial chamado raiz (neste problema, a sala 1). Em uma árvore enraizada, entre quaisquer dois vértices conectados por uma aresta, um vértice é o pai (o que está mais próximo da raiz), e o outro é o filho. Um vértice é chamado de folha se não tiver filhos.
|
||||
|
||||
\vspace{0.5cm}
|
||||
|
||||
\textbf{Nota para o primeiro caso de teste:} As salas contendo gatinhos estão marcadas em vermelho. As saídas (folhas) estão localizadas nas salas 2, 3 e 4. Bibi só não consegue ir para a saída localizada na sala 2.
|
||||
|
||||
\begin{figure}[h]
|
||||
\centering
|
||||
\includegraphics[width=0.25\textwidth]{sample-01.png}
|
||||
\end{figure}
|
||||
|
||||
\vspace{0.5cm}
|
||||
|
||||
\textbf{Nota para o segundo caso de teste:} As saídas (folhas) estão localizadas nas salas 4, 5, 6 e 7. Bibi não consegue ir para as saídas 6 e 7.
|
||||
|
||||
\begin{figure}[h]
|
||||
\centering
|
||||
\includegraphics[width=0.4\textwidth]{sample-02.png}
|
||||
\end{figure}
|
||||
|
||||
Problema adaptado de \href{https://codeforces.com/contest/580/problem/C}{Codeforces Round 321 (Div. 2, Problem C)}.
|
||||
1
gatinhos/statement/output.tex
Normal file
1
gatinhos/statement/output.tex
Normal file
@@ -0,0 +1 @@
|
||||
Imprima um único inteiro: o número de saídas do abrigo que Bibi consegue alcançar sem passar por mais de $m$ salas com gatinhos consecutivas.
|
||||
0
gatinhos/statement/preamble.tex
Normal file
0
gatinhos/statement/preamble.tex
Normal file
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user