Submission #259794

#TimeUsernameProblemLanguageResultExecution timeMemory
259794SamAndArt Class (IOI13_artclass)C++17
Compilation error
0 ms0 KiB

#include <bits/stdc++.h>
using namespace std;
const int N = 503;

int n, m;

int style(int H, int W, int R[500][500], int G[500][500], int B[500][500])
{
    srand(time(0));
    n = H;
    m = W;
    double gg = 0;
    for (int i = 0; i < n - 1; ++i)
    {
        for (int j = 0; j < m - 1; ++j)
        {
            gg += abs(R[i][j] - R[i][j + 1]);
            gg += abs(R[i][j] - R[i + 1][j]);
            gg += abs(G[i][j] - G[i][j + 1]);
            gg += abs(G[i][j] - G[i + 1][j]);
            gg += abs(B[i][j] - B[i][j + 1]);
            gg += abs(B[i][j] - B[i + 1][j]);
        }
    }
    gg /= (n - 1) * (m - 1);
    if (gg < 100)
    {
        if (rand() % 2)
            return 4;
        return 1;
    }
    if (rand() % 2)
        return 2;
    return 3;
}

Compilation message (stderr)

/tmp/cc3hBGq9.o: In function `main':
grader.c:(.text.startup+0x21a): undefined reference to `style'
collect2: error: ld returned 1 exit status