oj mrJudge
Toggle navigation
  • Login
    • Forget Password
      Login
User Image

Hello, Stranger

Guest
  • Analysis Mode
  • Problems
    • All Problems
    • Latest Problems
  • Join Us Now
  • Registration
  • Contact Us
  • Infomation
  • About
    • Terms of Use
    • Technical Specifications
    • Credits

shapes Batch , stdin/stdout

Registered Users Only

Please login to utilize this feature.

Do note that this website only supports submissions in C++.

shapes.html

Problem Description

Euclid's Elements was one of the most influential textbooks ever written.
It resulted in well known results such as the Triangle Sum theorem, Pythagorean theorem as well as Thales' theorem, that involved shapes such as squares, triangles and circles.
In this problem, your task is to write a program to recognise those three important shapes.

Input

The input is a 200 by 200 pixels image, given in the form of scan lines that consist of only 1s and 0s (representing black and white pixels)
  • Images only contain squares, equilateral triangles, and circles
  • Each image contains at least one valid shape
  • All black pixels are part of a valid shape, and black pixels that touch each other are part of the same shape
  • The shapes will not touch
  • Shapes may be magnified, minified or rotated, but will not be otherwise distorted

Output

Output a string containing one character for each shape in the image, using the following notation:

Circle: C
Square: S
Triangle: T

Print the letters in alphabetical order.

Sample Input

Due to space constraints, only an image of the sample input can be shown here.

Sample Output

STT

1.6.png

Tags

Creative

Subtasks and Limits

Subtask Score #TC Time Memory Scoring
1100151s32MBAverage

Judge Compile Command

g++-8 ans.cpp -o shapes -Wall -Wshadow -static -O2 -lm -m64 -s -w -std=gnu++17 -fmax-errors=512

Accepted Submissions

subIDUserTimeMax Time

Past Submissions

subIDUserTimeScore
mrJudge 09.05.20
Copyright © 2020 mrJudge. All rights reserved.