# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1174087 | Lithanium | Art Class (IOI13_artclass) | C++20 | 0 ms | 0 KiB |
#include <bits/stdc++.h>
using namespace std;
int dt[505][505];
int getR(int RGB) { return (RGB >> 16) & 0xFF; }
int getG(int RGB) { return (RGB >> 8) & 0xFF; }
int getB(int RGB) { return RGB & 0xFF; }
void solve(int test) {
int R, C;
cin >> R >> C;
double green = 0;
for (int i = 1; i <= R; i ++) {
for (int j = 1; j <= C; j ++) {
cin >> dt[i][j];
green += getG(dt[i][j]);
}
}
green /= (double)R*C;
if (75.0 < green and green < 105.0) cout << "2\n";
else cout << "1\n";
}
int main() {
ios_base::sync_with_stdio(false);
cin.tie(0);
int T;
cin >> T;
for (int i = 1; i <= T; i ++) solve(i);
}