QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#449498#8583. 팰린드롬 판별하기thangthangCompile Error//C++20683b2024-06-21 12:28:312024-06-21 12:28:33

Judging History

你现在查看的是最新测评结果

  • [2024-06-21 12:28:33]
  • 评测
  • [2024-06-21 12:28:31]
  • 提交

answer

#include <bits/stdc++.h>

using namespace std;

int guess_palindromicity(int n){
    vector <int> n1, n2;

    for (int i = 1; i <= (n - 1) / 2; ++ i){
        int gg = count_pair(0, i, n - 1 - i);
        if (!gg) return 0;
        if (gg == 1) n1.push_back(i);
        else n2.push_back(i);
    }

    if (find_character(0, n1)) return 0;

    if (n2.size()){
        int i = n2.back();
        if (count_pair(n - 1, n - 1 - i, i) == 1) return 0;
        return 1;
    }
    int i = n1.back();
    int gg = cout_pair(0, n - 1, i);
    if (!gg) return 0;
    if (gg == 3) return 1;
    if (count_pair(n - 1, i, n - i - 1) == 3) return 0;
    return 1;
}

Details

answer.code: In function ‘int guess_palindromicity(int)’:
answer.code:9:18: error: ‘count_pair’ was not declared in this scope
    9 |         int gg = count_pair(0, i, n - 1 - i);
      |                  ^~~~~~~~~~
answer.code:15:9: error: ‘find_character’ was not declared in this scope
   15 |     if (find_character(0, n1)) return 0;
      |         ^~~~~~~~~~~~~~
answer.code:19:13: error: ‘count_pair’ was not declared in this scope
   19 |         if (count_pair(n - 1, n - 1 - i, i) == 1) return 0;
      |             ^~~~~~~~~~
answer.code:23:14: error: ‘cout_pair’ was not declared in this scope
   23 |     int gg = cout_pair(0, n - 1, i);
      |              ^~~~~~~~~
answer.code:26:9: error: ‘count_pair’ was not declared in this scope
   26 |     if (count_pair(n - 1, i, n - i - 1) == 3) return 0;
      |         ^~~~~~~~~~