Please read the new rule regarding the restriction on the use of AI tools. ×

Help me in Codeforces Polygon checker writing
Difference between en1 and en2, changed 38 character(s)
Hi everyone, i am creating a contest for my group but i dont'n know how to check in a many answer problem. ↵
This is my checker code:↵
\begin{lstlisting}

#include <bits/stdc++.h>↵
#include "testlib.h"↵
typedef long long ll;↵
using namespace std;↵
int a[1000100], b[1000100];↵
int main(int argc, char * argv[])↵
{↵
    setName("Compare test");↵
    registerTestlibCmd(argc, argv);↵
    int n = ans.readInt();↵
    int m = inf.readInt();↵
    if (n == m && n == 0) quitf(_ok, "correct !!");↵

    if (n > m) quitf(_wa, "Are you kidding me ??");↵
    for (int i=1; i<=m; i++) b[i] = inf.readInt();↵
    for (int i=1; i<=n; i++) a[i] = ans.readInt();↵
    int our = b[1];↵
    ll s = 0, t = our;↵
    for (int i=2; i<=m; i++)↵
    {↵
        t += (ll)b[i];↵
    }↵
    for (int i=1; i<=n; i++)↵
    {↵
        if (b[a[i]] > our/2 && a[i] > 1) quitf(_wa,"nooooo!!");↵
        s += (ll)b[a[i]];↵
    }↵
    if (s > t/2) quitf(_ok,"Correct!!");↵
    else quitf(_wa, "False!!");↵
}↵
\end{lstlisting}

I don't know why when my test is true it have to quit _ok but it return ERROR: Unexpected verdict PRESENTATION_ERROR↵
wrong output format Extra information in the output file.↵
Anyone can help me?? please!!!

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en5 English npgnghi2003 2020-12-01 11:43:03 833
en4 English npgnghi2003 2020-12-01 11:41:42 24
en3 English npgnghi2003 2020-12-01 11:40:24 4
en2 English npgnghi2003 2020-12-01 11:36:12 38
en1 English npgnghi2003 2020-12-01 11:35:42 1247 Initial revision (published)