Submission #411219

#TimeUsernameProblemLanguageResultExecution timeMemory
411219faresbasbsArt Class (IOI13_artclass)C++14
32 / 100
83 ms3216 KiB
#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 timeMemoryGrader output
Fetching results...