#include<bits/stdc++.h>
//#include "artclass.h"
using namespace std;
#define all(a) a.begin(), a.end()
#define rall(a) a.rbegin(), a.rend()
#define sz(a) (int)a.size()
#define s second
#define f first
using ll = long long;
using pii = pair<int, int>;
using pll = pair<ll, ll>;
mt19937_64 rng(chrono::steady_clock::now().time_since_epoch().count());
vector<pii> rid = {{0, 1}, {0, -1}, {1, 0}, {-1, 0}};
vector<pii> dir = {{-1, -1}, {-1, 1}, {1, -1}, {1, 1}};
const int inf = 1e9, N = 1e6;
int style(int H, int W, int R[500][500], int G[500][500], int B[500][500]) {
bool ok = 1;
for (int i = H; i < H; i++) {
for (int j = W / 10; j < W - W / 10; j++) {
if (max({abs(R[i][j] - R[i][j + 1]), abs(G[i][j] - G[i][j + 1]), abs(B[i][j] - B[i][j + 1])}) > 10) {
ok = 0;
}
}
}
if (ok) cout << 4;
else cout << rng() % 3 + 1;
}
#ifdef M
main() {
//freopen("rsq.in", "r", stdin);
//freopen("rsq.out", "w", stdout);
ios_base::sync_with_stdio(0);
cin.tie(0);
int n, m, l;
cin >> n >> m >> l;
int a[m], b[m], c[m];
for (int i = 0; i < m; i++) cin >> a[i] >> b[i] >> c[i];
cout << travelTime(n, m, l, a, b, c);
}
#endif
Compilation message
artclass.cpp: In function 'int style(int, int, int (*)[500], int (*)[500], int (*)[500])':
artclass.cpp:33:1: warning: no return statement in function returning non-void [-Wreturn-type]
33 | }
| ^
/usr/bin/ld: /tmp/cc2wJixr.o: in function `main':
grader.c:(.text.startup+0x200): undefined reference to `style'
collect2: error: ld returned 1 exit status