Skip to content
Snippets Groups Projects
Commit 3443622d authored by Nicolas M. Thiéry's avatar Nicolas M. Thiéry
Browse files

WIMS: Correctif bug exos avec plusieurs entrees valides + ajout alerte automatique

parent 9aa7547c
No related branches found
No related tags found
No related merge requests found
......@@ -11,8 +11,12 @@ data/index: $(PROGRAMS)
done
data/%.answer: data/%.bin
if echo $< | grep -q _input.cpp; then \
for i in `seq 0 99`; do if [ x`echo $$i | $<` = 'x42' ]; then echo $$i; fi; done > $@; \
@if echo $< | grep -q _input.cpp; then \
count=0; \
for i in `seq 0 99`; do if [ x`echo $$i | $<` = 'x42' ]; then echo $$i; count=$$((count+1)); fi; done > $@; \
if [ $$count != 1 ]; then \
echo "ATTENTION IL N'Y A PAS EXACTEMENT UNE BONNE RÉPONSE pour $<"; \
fi; \
else \
./$< > $@; \
fi
......@@ -21,7 +25,7 @@ data/%.cpp.bin: data/%.cpp
g++ -Wall -Wno-sign-compare -Wno-unused-value -pedantic -std=c++11 $< -o $@
clean:
rm data/*.bin data/*.answer data/index
-rm data/*.bin data/*.answer data/index
# Pour restauration
archive:
......
......@@ -12,5 +12,6 @@ int main(void) {
};
int j;
cin >> j;
cout << tab[3][j] << endl;
if (0<=j and j<5)
cout << tab[3][j] << endl;
}
......@@ -19,5 +19,6 @@ int main(void) {
};
int j;
cin >> j;
cout << mystere(tab,j) << endl;
if (0<=j and j<4)
cout << mystere(tab,j) << endl;
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment