flâneur

tencent/AutoCodeBenchmark · Datasets at Hugging Face

huggingface.co · 2,554 words · saved by 1 readers

We’re on a journey to advance and democratize artificial intelligence through open source and open science.

# 3D Shape Analyzer Problem ## Problem Description You are tasked with implementing a `ShapeAnalyzer` class that can analyze 3D shapes represented as 2D grids of cube heights. Each cell in the grid represents a stack of cubes, where the integer value indicates how many cubes are stacked at that position. The class sho... #include <vector> #include <algorithm> #include <cmath> #include <map> using namespace std; class ShapeAnalyzer { public: // Calculate total surface area considering all cubes in the grid int calculateSurfaceArea(const vector<vector<int>>& grid) { if (grid.empty() ||…

saved by

related reading