From 4e25acfb47e7c7787e19f8069c7da5af9b40d781 Mon Sep 17 00:00:00 2001 From: Konano Date: Fri, 14 Feb 2020 16:51:50 +0800 Subject: [PATCH] fix bug --- .gitignore | 2 +- src/MultField/mult-choose.cpp | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index ba5a0fa..dec6035 100644 --- a/.gitignore +++ b/.gitignore @@ -25,5 +25,5 @@ _deps !*-sample.txt .vscode -build +build* release.* diff --git a/src/MultField/mult-choose.cpp b/src/MultField/mult-choose.cpp index faf2522..0a86824 100644 --- a/src/MultField/mult-choose.cpp +++ b/src/MultField/mult-choose.cpp @@ -186,7 +186,8 @@ int main() { } } sort(q.begin(), q.end()); - maxLayer = 0; + maxLayer = 1; + for (int i = 0; i < C_num; i++) layer[i] = 0; for (int i = 0; i < (int)q.size(); i++) { layer[q[i].second] = 1; for (int j = 0; j < i; j++) if (layer[q[i].second] < layer[q[j].second] + 1) { @@ -221,7 +222,8 @@ int main() { } } sort(q.begin(), q.end()); - maxLayer = 0; + maxLayer = 1; + for (int i = 0; i < C_num; i++) layer[i] = 0; for (int i = 0; i < (int)q.size(); i++) { layer[q[i].second] = 1; for (int j = 0; j < i; j++) if (layer[q[i].second] < layer[q[j].second] + 1) {