# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
411219 | faresbasbs | Art Class (IOI13_artclass) | C++14 | 83 ms | 3216 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include <bits/stdc++.h>
#include "artclass.h"
using namespace std;
int style(int H, int W, int R[500][500], int G[500][500], int B[500][500]) {
long long sum = 0 , diff = 0 , sum1 = 0 , sum2 = 0 , sum3 = 0;
for(int i = 0 ; i < H ; i += 1){
for(int j = 0 ; j < W ; j += 1){
sum1 += R[i][j];
sum2 += G[i][j];
sum3 += B[i][j];
}
}
// cout << sum1 << " " << sum2 << " " << sum3 << endl;
sum = sum1+sum2+sum3 , diff = max({sum1,sum2,sum3})-min({sum1,sum2,sum3});
if(sum >= 100000000){
return 1;
}
if(diff <= 4500000){
return 3;
}
if(diff <= 12000000){
return 2;
}
return 4;
// cout << sum << " " << diff << endl;
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |