Skip to content

Commit

Permalink
[string/palindromes_in_deque] fix according to review comment
Browse files Browse the repository at this point in the history
  • Loading branch information
NachiaVivias committed May 26, 2024
1 parent 9be66b9 commit 88a8003
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions string/palindromes_in_deque/verifier.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,16 @@ using namespace std;
int main() {
registerValidation();

int q = inf.readInt(1, Q_MAX, "Q");
int q = inf.readInt(Q_MIN, Q_MAX, "Q");
inf.readChar('\n');

int length = 0;
for (int i = 0; i < q; i++) {
int t = inf.readInt(0, 3, "t");
if (t == 0 || t == 1) {
inf.readSpace();
inf.readChar();
char ch = inf.readChar();
ensure('a' <= ch && ch <= 'z');
length++;
} else if (t == 2 || t == 3) {
length--;
Expand Down

0 comments on commit 88a8003

Please sign in to comment.