Submission #13322

#TimeUsernameProblemLanguageResultExecution timeMemory
13322ggohArt Class (IOI13_artclass)C++98
0 / 100
133 ms3580 KiB
#include<cstdio> #include "artclass.h" int abs(int A,int B) { return A>B?A-B:B-A; } int style(int H,int W,int R[500][500],int G[500][500],int B[500][500]) { int i,j,c=0; for(i=1;i<=H;i++) { for(j=2;j<=W;j++) { if(abs(R[i][j],R[i][j-1])+abs(G[i][j],G[i][j-1])+abs(B[i][j],B[i][j-1])<30)c++; } } if(c<=10)return 4; else if(c<=H+W)return 1; else if(c<=H*W/3)return 2; else return 3; }
#Verdict Execution timeMemoryGrader output
Fetching results...