Submission #1333676

#TimeUsernameProblemLanguageResultExecution timeMemory
1333676SmuggingSpunArt Class (IOI13_artclass)C++20
100 / 100
40 ms3344 KiB
#include "artclass.h"
#include<bits/stdc++.h>
using namespace std;
int style(int H, int W, int R[500][500], int G[500][500], int B[500][500]) {
  int value = 0.0;
  for(int i = 0; i < H; i++){
    for(int j = 0; j + 1 < W; j++){
      value += abs(R[i][j] - R[i][j + 1]) + abs(G[i][j] - G[i][j + 1]) + abs(B[i][j] - B[i][j + 1]);
    }
  }
  if((value /= H * (W - 1)) <= 8){
    return 4;
  }
  if(value <= 22){
    return 1;
  }
  return value <= 54 ? 2 : 3;
}
#Verdict Execution timeMemoryGrader output
Fetching results...