QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#449501#8583. 팰린드롬 판별하기thangthang0 0ms3668kbC++20776b2024-06-21 12:31:032024-06-21 12:31:03

Judging History

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

  • [2024-06-21 12:31:03]
  • 评测
  • 测评结果:0
  • 用时:0ms
  • 内存:3668kb
  • [2024-06-21 12:31:03]
  • 提交

answer

#include <bits/stdc++.h>

using namespace std;

extern int count_pair(int, int, int);
extern int find_character(int, std::vector<int>);

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 = count_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

Tip: Click on the bar to expand more detailed information

Subtask #1:

score: 0
Wrong Answer

Test #1:

score: 100
Accepted
time: 0ms
memory: 3524kb

input:

wHBDO4-INPUT-K2FZ4z
1
10
1 1 1 1 1 1 1 2 1 1

output:

ppme3h-OUTPUT-dzfJFL
100

result:

ok Correct

Test #2:

score: 0
Wrong Answer
time: 0ms
memory: 3668kb

input:

wHBDO4-INPUT-K2FZ4z
500
10
1 1 1 1 1 1 2 1 1 1
10
1 1 1 2 1 1 1 1 1 1
10
1 1 1 1 1 1 1 1 1 2
10
1 1 2 1 1 1 1 1 1 1
10
1 1 2 1 1 1 1 1 1 1
10
1 1 1 1 1 1 1 2 1 1
10
1 1 1 1 1 2 1 1 1 1
10
1 1 1 1 1 1 2 1 1 1
10
1 1 2 1 1 1 1 1 1 1
10
1 1 1 1 1 2 1 1 1 1
10
1 1 1 2 1 1 1 1 1 1
10
1 2 1 1 1 1 1 1 1 1
...

output:

Unauthorized output

result:

wrong answer Security violation [37]