Cody

# Problem 44368. Inscribed Pentagon?

Solution 1400055

Submitted on 1 Jan 2018 by Qi Zhang
This solution is locked. To view this solution, you need to provide a solution of the same size or smaller.

### Test Suite

Test Status Code Input and Output
1   Pass
p = [0,5; 4.76,1.55; 2.94,-4.05; -2.94,-4.05; -4.76,1.55]; cp = [0,0]; r = 5; y_correct = 1; assert(isequal(inscribed_pentagon(p,cp,r),y_correct))

2   Pass
p = [0,6.58; 6.42,1.92; 3.97,-5.63; -3.97,-5.63; -6.42,1.92]; cp = [0,0]; r = 5; y_correct = 2; assert(isequal(inscribed_pentagon(p,cp,r),y_correct))

3   Pass
p = [0,4.55; 4.28,1.44; 2.65,-3.59; -2.65,-3.59; -4.28,1.44]; cp = [0,0]; r = 5; y_correct = 0; assert(isequal(inscribed_pentagon(p,cp,r),y_correct))

4   Pass
cp = [20,8]; p = [0,5; 4.76,1.55; 2.94,-4.05; -2.94,-4.05; -4.76,1.55] + repmat(cp,[5,1]); r = 5; y_correct = 1; assert(isequal(inscribed_pentagon(p,cp,r),y_correct))

5   Pass
cp = [20,8]; p = [0,6.58; 6.42,1.92; 3.97,-5.63; -3.97,-5.63; -6.42,1.92] + repmat(cp,[5,1]); r = 5; y_correct = 2; assert(isequal(inscribed_pentagon(p,cp,r),y_correct))

6   Pass
cp = [20,8]; p = [0,4.55; 4.28,1.44; 2.65,-3.59; -2.65,-3.59; -4.28,1.44] + repmat(cp,[5,1]); r = 5; y_correct = 0; assert(isequal(inscribed_pentagon(p,cp,r),y_correct))

7   Pass
p = [23.66,11.42; 24.37,5.58; 19.05,3.10; 15.04,7.40; 17.89,12.54]; cp = [20,8]; r = 5; y_correct = 1; assert(isequal(inscribed_pentagon(p,cp,r),y_correct))

8   Pass
p = [25.01,12.47; 25.98,4.58; 18.78,1.23; 13.37,7.03; 17.22,13.97]; cp = [20,8]; r = 5; y_correct = 2; assert(isequal(inscribed_pentagon(p,cp,r),y_correct))

9   Pass
p = [23.27,11.12; 23.92,5.87; 19.12,3.63; 15.52,7.50; 18.08,12.13]; cp = [20,8]; r = 5; y_correct = 0; assert(isequal(inscribed_pentagon(p,cp,r),y_correct))

10   Pass
p = [30.94,36.26; 35.61,27.09; 28.34,19.82; 19.17,24.49; 20.78,34.65]; cp = [26.97,28.45]; r = 8.75; y_correct = 1; assert(isequal(inscribed_pentagon(p,cp,r),y_correct))

11   Pass
p = [32.54,38.78; 38.84,26.41; 29.02,16.59; 16.65,22.89; 18.83,36.61]; cp = [26.97,28.45]; r = 8.75; y_correct = 2; assert(isequal(inscribed_pentagon(p,cp,r),y_correct))

12   Pass
p = [30.49,35.54; 34.69,27.29; 28.14,20.74; 19.89,24.95; 21.34,34.09]; cp = [26.97,28.45]; r = 8.75; y_correct = 0; assert(isequal(inscribed_pentagon(p,cp,r),y_correct))
{"found_math": false, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "url": "https://in.mathworks.com/matlabcentral/cody/problems/44368-inscribed-pentagon/solutions/1400055", "fetch_time": 1600799247000000000, "content_mime_type": "text/html", "warc_filename": "crawl-data/CC-MAIN-2020-40/segments/1600400206329.28/warc/CC-MAIN-20200922161302-20200922191302-00200.warc.gz", "warc_record_offset": 478490113, "warc_record_length": 17115, "token_count": 1112, "char_count": 2313, "score": 3.6875, "int_score": 4, "crawl": "CC-MAIN-2020-40", "snapshot_type": "latest", "language": "en", "language_score": 0.5329545140266418, "file_path": "/sailhome/yjruan/project/latent-lm/data/processed/finemath-4plus/finemath-4plus/train-00041-of-00064.parquet"}