Submission #206981

#TimeUsernameProblemLanguageResultExecution timeMemory
206981okoArt Class (IOI13_artclass)C++14
96 / 100
81 ms3320 KiB
#include<bits/stdc++.h> #include "artclass.h" using namespace std; const long long mod=1e9+7; int style(int H, int W, int R[500][500], int G[500][500], int B[500][500]) { int n=H,m=W,sum=0; for(int i=1;i<n;i++) { for(int j=1;j<m;j++) { sum+=abs(R[i][j]-R[i][j-1])+abs(R[i][j]-R[i-1][j])+abs(B[i][j]-B[i][j-1])+abs(B[i][j]-B[i-1][j])+abs(G[i][j]-G[i][j-1])+abs(G[i][j]-G[i-1][j]); } } sum/=n*m; if(sum<=15)return 4; if(sum>=105)return 3; if(sum<=45)return 1; return 2; }
#Verdict Execution timeMemoryGrader output
Fetching results...