CodeForces 617D CodeForces 617D

E - Polyline
Time Limit:1000MS     Memory Limit:262144KB     64bit IO Format:%I64d & %I64u
Submit  Status  Practice  CodeForces 617D

Description

There are three points marked on the coordinate plane. The goal is to make a simple polyline, without self-intersections and self-touches, such that it passes through all these points. Also, the polyline must consist of only segments parallel to the coordinate axes. You are to find the minimum number of segments this polyline may consist of.

Input

Each of the three lines of the input contains two integers. The i-th line contains integers xi and yi ( - 109 ≤ xi, yi ≤ 109) — the coordinates of the i-th point. It is guaranteed that all points are distinct.

Output

Print a single number — the minimum possible number of segments of the polyline.

Sample Input

Input
1 -1
1 1
1 2
Output
1
Input
-1 -1
-1 3
4 3
Output
2
Input
1 1
2 3
3 2
Output
3

Hint

The variant of the polyline in the first sample:  The variant of the polyline in the second sample:  The variant of the polyline in the third sample: 

FAQ | About Virtual Judge |  Forum |  Discuss |  Open Source Project
题意 :  三个点 求用几条平行于坐标轴的直线才能把它们连接起来。
<span class="sh-preproc" style="margin: 0px; padding: 0px; line-height: 1.1em; color: rgb(0, 184, 0);">#include</span><span class="sh-string" style="margin: 0px; padding: 0px; line-height: 1.1em; color: rgb(255, 0, 0);"><iostream></span>
<span class="sh-preproc" style="margin: 0px; padding: 0px; line-height: 1.1em; color: rgb(0, 184, 0);">#include</span><span class="sh-string" style="margin: 0px; padding: 0px; line-height: 1.1em; color: rgb(255, 0, 0);"><algorithm></span>
<span class="sh-preproc" style="margin: 0px; padding: 0px; line-height: 1.1em; color: rgb(0, 184, 0);">#include</span><span class="sh-string" style="margin: 0px; padding: 0px; line-height: 1.1em; color: rgb(255, 0, 0);"><cstdio></span>
<span class="sh-preproc" style="margin: 0px; padding: 0px; line-height: 1.1em; color: rgb(0, 184, 0);">#include</span><span class="sh-string" style="margin: 0px; padding: 0px; line-height: 1.1em; color: rgb(255, 0, 0);"><cstring></span>
<span class="sh-preproc" style="margin: 0px; padding: 0px; line-height: 1.1em; color: rgb(0, 184, 0);">#include</span><span class="sh-string" style="margin: 0px; padding: 0px; line-height: 1.1em; color: rgb(255, 0, 0);"><cmath></span>
<span class="sh-preproc" style="margin: 0px; padding: 0px; line-height: 1.1em; color: rgb(0, 184, 0);">#include</span><span class="sh-string" style="margin: 0px; padding: 0px; line-height: 1.1em; color: rgb(255, 0, 0);"><queue></span>
<span class="sh-preproc" style="margin: 0px; padding: 0px; line-height: 1.1em; color: rgb(0, 184, 0);">#include</span><span class="sh-string" style="margin: 0px; padding: 0px; line-height: 1.1em; color: rgb(255, 0, 0);"><cctype></span>
<span class="sh-preproc" style="margin: 0px; padding: 0px; line-height: 1.1em; color: rgb(0, 184, 0);">#include</span> <span class="sh-string" style="margin: 0px; padding: 0px; line-height: 1.1em; color: rgb(255, 0, 0);"><map></span>
<span class="sh-comment" style="margin: 0px; padding: 0px; line-height: 1.1em; color: rgb(102, 102, 102); font-style: italic;">//#define max(a,b)(a>b?a:b)</span>
<span class="sh-comment" style="margin: 0px; padding: 0px; line-height: 1.1em; color: rgb(102, 102, 102); font-style: italic;">//#define min(a,b)(a<b?a:b)</span>
<span class="sh-preproc" style="margin: 0px; padding: 0px; line-height: 1.1em; color: rgb(0, 184, 0);">#define</span> INF <span class="sh-number" style="margin: 0px; padding: 0px; line-height: 1.1em; color: rgb(169, 0, 169);">0x3f3f3f3f</span>
<span class="sh-keyword" style="margin: 0px; padding: 0px; line-height: 1.1em; color: rgb(0, 0, 255); font-weight: bold;">typedef</span> <span class="sh-type" style="margin: 0px; padding: 0px; line-height: 1.1em; color: rgb(0, 0, 255);">long</span> <span class="sh-type" style="margin: 0px; padding: 0px; line-height: 1.1em; color: rgb(0, 0, 255);">long</span> ll<span class="sh-symbol" style="margin: 0px; padding: 0px; line-height: 1.1em; color: rgb(255, 0, 0);">;</span>

<span class="sh-keyword" style="margin: 0px; padding: 0px; line-height: 1.1em; color: rgb(0, 0, 255); font-weight: bold;">using</span> <span class="sh-keyword" style="margin: 0px; padding: 0px; line-height: 1.1em; color: rgb(0, 0, 255); font-weight: bold;">namespace</span> std<span class="sh-symbol" style="margin: 0px; padding: 0px; line-height: 1.1em; color: rgb(255, 0, 0);">;</span>

<span class="sh-usertype" style="margin: 0px; padding: 0px; line-height: 1.1em;">ll</span><span class="sh-normal" style="margin: 0px; padding: 0px; line-height: 1.1em;"> </span><span class="sh-function" style="margin: 0px; padding: 0px; line-height: 1.1em; font-weight: bold;">max</span><span class="sh-symbol" style="margin: 0px; padding: 0px; line-height: 1.1em; color: rgb(255, 0, 0);">(</span><span class="sh-usertype" style="margin: 0px; padding: 0px; line-height: 1.1em;">ll</span><span class="sh-normal" style="margin: 0px; padding: 0px; line-height: 1.1em;"> </span>a<span class="sh-symbol" style="margin: 0px; padding: 0px; line-height: 1.1em; color: rgb(255, 0, 0);">,</span><span class="sh-usertype" style="margin: 0px; padding: 0px; line-height: 1.1em;">ll</span><span class="sh-normal" style="margin: 0px; padding: 0px; line-height: 1.1em;"> </span>b<span class="sh-symbol" style="margin: 0px; padding: 0px; line-height: 1.1em; color: rgb(255, 0, 0);">)</span>
<span class="sh-cbracket" style="margin: 0px; padding: 0px; line-height: 1.1em; color: rgb(255, 0, 0);">{</span>
    <span class="sh-keyword" style="margin: 0px; padding: 0px; line-height: 1.1em; color: rgb(0, 0, 255); font-weight: bold;">if</span><span class="sh-symbol" style="margin: 0px; padding: 0px; line-height: 1.1em; color: rgb(255, 0, 0);">(</span>a<span class="sh-symbol" style="margin: 0px; padding: 0px; line-height: 1.1em; color: rgb(255, 0, 0);">></span>b<span class="sh-symbol" style="margin: 0px; padding: 0px; line-height: 1.1em; color: rgb(255, 0, 0);">)</span>
        <span class="sh-keyword" style="margin: 0px; padding: 0px; line-height: 1.1em; color: rgb(0, 0, 255); font-weight: bold;">return</span> a<span class="sh-symbol" style="margin: 0px; padding: 0px; line-height: 1.1em; color: rgb(255, 0, 0);">;</span>
    <span class="sh-keyword" style="margin: 0px; padding: 0px; line-height: 1.1em; color: rgb(0, 0, 255); font-weight: bold;">return</span> b<span class="sh-symbol" style="margin: 0px; padding: 0px; line-height: 1.1em; color: rgb(255, 0, 0);">;</span>
<span class="sh-cbracket" style="margin: 0px; padding: 0px; line-height: 1.1em; color: rgb(255, 0, 0);">}</span>
<span class="sh-usertype" style="margin: 0px; padding: 0px; line-height: 1.1em;">ll</span><span class="sh-normal" style="margin: 0px; padding: 0px; line-height: 1.1em;"> </span><span class="sh-function" style="margin: 0px; padding: 0px; line-height: 1.1em; font-weight: bold;">min</span><span class="sh-symbol" style="margin: 0px; padding: 0px; line-height: 1.1em; color: rgb(255, 0, 0);">(</span><span class="sh-usertype" style="margin: 0px; padding: 0px; line-height: 1.1em;">ll</span><span class="sh-normal" style="margin: 0px; padding: 0px; line-height: 1.1em;"> </span>a<span class="sh-symbol" style="margin: 0px; padding: 0px; line-height: 1.1em; color: rgb(255, 0, 0);">,</span><span class="sh-usertype" style="margin: 0px; padding: 0px; line-height: 1.1em;">ll</span><span class="sh-normal" style="margin: 0px; padding: 0px; line-height: 1.1em;"> </span>b<span class="sh-symbol" style="margin: 0px; padding: 0px; line-height: 1.1em; color: rgb(255, 0, 0);">)</span>
<span class="sh-cbracket" style="margin: 0px; padding: 0px; line-height: 1.1em; color: rgb(255, 0, 0);">{</span>
    <span class="sh-keyword" style="margin: 0px; padding: 0px; line-height: 1.1em; color: rgb(0, 0, 255); font-weight: bold;">if</span><span class="sh-symbol" style="margin: 0px; padding: 0px; line-height: 1.1em; color: rgb(255, 0, 0);">(</span>a<span class="sh-symbol" style="margin: 0px; padding: 0px; line-height: 1.1em; color: rgb(255, 0, 0);"><</span>b<span class="sh-symbol" style="margin: 0px; padding: 0px; line-height: 1.1em; color: rgb(255, 0, 0);">)</span>
        <span class="sh-keyword" style="margin: 0px; padding: 0px; line-height: 1.1em; color: rgb(0, 0, 255); font-weight: bold;">return</span> a<span class="sh-symbol" style="margin: 0px; padding: 0px; line-height: 1.1em; color: rgb(255, 0, 0);">;</span>
    <span class="sh-keyword" style="margin: 0px; padding: 0px; line-height: 1.1em; color: rgb(0, 0, 255); font-weight: bold;">return</span> b<span class="sh-symbol" style="margin: 0px; padding: 0px; line-height: 1.1em; color: rgb(255, 0, 0);">;</span>
<span class="sh-cbracket" style="margin: 0px; padding: 0px; line-height: 1.1em; color: rgb(255, 0, 0);">}</span>

<span class="sh-type" style="margin: 0px; padding: 0px; line-height: 1.1em; color: rgb(0, 0, 255);">int</span> <span class="sh-function" style="margin: 0px; padding: 0px; line-height: 1.1em; font-weight: bold;">main</span><span class="sh-symbol" style="margin: 0px; padding: 0px; line-height: 1.1em; color: rgb(255, 0, 0);">()</span>
<span class="sh-cbracket" style="margin: 0px; padding: 0px; line-height: 1.1em; color: rgb(255, 0, 0);">{</span>
    <span class="sh-type" style="margin: 0px; padding: 0px; line-height: 1.1em; color: rgb(0, 0, 255);">long</span> <span class="sh-type" style="margin: 0px; padding: 0px; line-height: 1.1em; color: rgb(0, 0, 255);">long</span> x1<span class="sh-symbol" style="margin: 0px; padding: 0px; line-height: 1.1em; color: rgb(255, 0, 0);">,</span> y1<span class="sh-symbol" style="margin: 0px; padding: 0px; line-height: 1.1em; color: rgb(255, 0, 0);">,</span> x2<span class="sh-symbol" style="margin: 0px; padding: 0px; line-height: 1.1em; color: rgb(255, 0, 0);">,</span> y2<span class="sh-symbol" style="margin: 0px; padding: 0px; line-height: 1.1em; color: rgb(255, 0, 0);">,</span> x3<span class="sh-symbol" style="margin: 0px; padding: 0px; line-height: 1.1em; color: rgb(255, 0, 0);">,</span> y3<span class="sh-symbol" style="margin: 0px; padding: 0px; line-height: 1.1em; color: rgb(255, 0, 0);">;</span>
    <span class="sh-type" style="margin: 0px; padding: 0px; line-height: 1.1em; color: rgb(0, 0, 255);">int</span> count<span class="sh-symbol" style="margin: 0px; padding: 0px; line-height: 1.1em; color: rgb(255, 0, 0);">;</span>
    <span class="sh-keyword" style="margin: 0px; padding: 0px; line-height: 1.1em; color: rgb(0, 0, 255); font-weight: bold;">while</span><span class="sh-symbol" style="margin: 0px; padding: 0px; line-height: 1.1em; color: rgb(255, 0, 0);">(</span><span class="sh-function" style="margin: 0px; padding: 0px; line-height: 1.1em; font-weight: bold;">scanf</span><span class="sh-symbol" style="margin: 0px; padding: 0px; line-height: 1.1em; color: rgb(255, 0, 0);">(</span><span class="sh-string" style="margin: 0px; padding: 0px; line-height: 1.1em; color: rgb(255, 0, 0);">"%lld%lld%lld%lld%lld%lld"</span><span class="sh-symbol" style="margin: 0px; padding: 0px; line-height: 1.1em; color: rgb(255, 0, 0);">,&</span>x1<span class="sh-symbol" style="margin: 0px; padding: 0px; line-height: 1.1em; color: rgb(255, 0, 0);">,&</span>y1<span class="sh-symbol" style="margin: 0px; padding: 0px; line-height: 1.1em; color: rgb(255, 0, 0);">,&</span>x2<span class="sh-symbol" style="margin: 0px; padding: 0px; line-height: 1.1em; color: rgb(255, 0, 0);">,&</span>y2<span class="sh-symbol" style="margin: 0px; padding: 0px; line-height: 1.1em; color: rgb(255, 0, 0);">,&</span>x3<span class="sh-symbol" style="margin: 0px; padding: 0px; line-height: 1.1em; color: rgb(255, 0, 0);">,&</span>y3<span class="sh-symbol" style="margin: 0px; padding: 0px; line-height: 1.1em; color: rgb(255, 0, 0);">)!=</span>EOF<span class="sh-symbol" style="margin: 0px; padding: 0px; line-height: 1.1em; color: rgb(255, 0, 0);">)</span>
    <span class="sh-cbracket" style="margin: 0px; padding: 0px; line-height: 1.1em; color: rgb(255, 0, 0);">{</span>
        <span class="sh-keyword" style="margin: 0px; padding: 0px; line-height: 1.1em; color: rgb(0, 0, 255); font-weight: bold;">if</span><span class="sh-symbol" style="margin: 0px; padding: 0px; line-height: 1.1em; color: rgb(255, 0, 0);">((</span>x1<span class="sh-symbol" style="margin: 0px; padding: 0px; line-height: 1.1em; color: rgb(255, 0, 0);">==</span>x2 <span class="sh-symbol" style="margin: 0px; padding: 0px; line-height: 1.1em; color: rgb(255, 0, 0);">&&</span> x1<span class="sh-symbol" style="margin: 0px; padding: 0px; line-height: 1.1em; color: rgb(255, 0, 0);">==</span>x3<span class="sh-symbol" style="margin: 0px; padding: 0px; line-height: 1.1em; color: rgb(255, 0, 0);">)</span> <span class="sh-symbol" style="margin: 0px; padding: 0px; line-height: 1.1em; color: rgb(255, 0, 0);">||</span> <span class="sh-symbol" style="margin: 0px; padding: 0px; line-height: 1.1em; color: rgb(255, 0, 0);">(</span>y1<span class="sh-symbol" style="margin: 0px; padding: 0px; line-height: 1.1em; color: rgb(255, 0, 0);">==</span>y2 <span class="sh-symbol" style="margin: 0px; padding: 0px; line-height: 1.1em; color: rgb(255, 0, 0);">&&</span> y1<span class="sh-symbol" style="margin: 0px; padding: 0px; line-height: 1.1em; color: rgb(255, 0, 0);">==</span>y3<span class="sh-symbol" style="margin: 0px; padding: 0px; line-height: 1.1em; color: rgb(255, 0, 0);">))</span>
            count<span class="sh-symbol" style="margin: 0px; padding: 0px; line-height: 1.1em; color: rgb(255, 0, 0);">=</span><span class="sh-number" style="margin: 0px; padding: 0px; line-height: 1.1em; color: rgb(169, 0, 169);">1</span><span class="sh-symbol" style="margin: 0px; padding: 0px; line-height: 1.1em; color: rgb(255, 0, 0);">;</span>
        <span class="sh-keyword" style="margin: 0px; padding: 0px; line-height: 1.1em; color: rgb(0, 0, 255); font-weight: bold;">else</span> <span class="sh-keyword" style="margin: 0px; padding: 0px; line-height: 1.1em; color: rgb(0, 0, 255); font-weight: bold;">if</span><span class="sh-symbol" style="margin: 0px; padding: 0px; line-height: 1.1em; color: rgb(255, 0, 0);">((</span>x1<span class="sh-symbol" style="margin: 0px; padding: 0px; line-height: 1.1em; color: rgb(255, 0, 0);">==</span>x2 <span class="sh-symbol" style="margin: 0px; padding: 0px; line-height: 1.1em; color: rgb(255, 0, 0);">&&</span> <span class="sh-symbol" style="margin: 0px; padding: 0px; line-height: 1.1em; color: rgb(255, 0, 0);">(</span>y3<span class="sh-symbol" style="margin: 0px; padding: 0px; line-height: 1.1em; color: rgb(255, 0, 0);">>=</span><span class="sh-function" style="margin: 0px; padding: 0px; line-height: 1.1em; font-weight: bold;">max</span><span class="sh-symbol" style="margin: 0px; padding: 0px; line-height: 1.1em; color: rgb(255, 0, 0);">(</span>y1<span class="sh-symbol" style="margin: 0px; padding: 0px; line-height: 1.1em; color: rgb(255, 0, 0);">,</span>y2<span class="sh-symbol" style="margin: 0px; padding: 0px; line-height: 1.1em; color: rgb(255, 0, 0);">)||</span>y3<span class="sh-symbol" style="margin: 0px; padding: 0px; line-height: 1.1em; color: rgb(255, 0, 0);"><=</span><span class="sh-function" style="margin: 0px; padding: 0px; line-height: 1.1em; font-weight: bold;">min</span><span class="sh-symbol" style="margin: 0px; padding: 0px; line-height: 1.1em; color: rgb(255, 0, 0);">(</span>y1<span class="sh-symbol" style="margin: 0px; padding: 0px; line-height: 1.1em; color: rgb(255, 0, 0);">,</span>y2<span class="sh-symbol" style="margin: 0px; padding: 0px; line-height: 1.1em; color: rgb(255, 0, 0);">)))</span> <span class="sh-symbol" style="margin: 0px; padding: 0px; line-height: 1.1em; color: rgb(255, 0, 0);">||</span> <span class="sh-symbol" style="margin: 0px; padding: 0px; line-height: 1.1em; color: rgb(255, 0, 0);">(</span>x1<span class="sh-symbol" style="margin: 0px; padding: 0px; line-height: 1.1em; color: rgb(255, 0, 0);">==</span>x3 <span class="sh-symbol" style="margin: 0px; padding: 0px; line-height: 1.1em; color: rgb(255, 0, 0);">&&</span> <span class="sh-symbol" style="margin: 0px; padding: 0px; line-height: 1.1em; color: rgb(255, 0, 0);">(</span>y2<span class="sh-symbol" style="margin: 0px; padding: 0px; line-height: 1.1em; color: rgb(255, 0, 0);">>=</span><span class="sh-function" style="margin: 0px; padding: 0px; line-height: 1.1em; font-weight: bold;">max</span><span class="sh-symbol" style="margin: 0px; padding: 0px; line-height: 1.1em; color: rgb(255, 0, 0);">(</span>y1<span class="sh-symbol" style="margin: 0px; padding: 0px; line-height: 1.1em; color: rgb(255, 0, 0);">,</span>y3<span class="sh-symbol" style="margin: 0px; padding: 0px; line-height: 1.1em; color: rgb(255, 0, 0);">)||</span>y2<span class="sh-symbol" style="margin: 0px; padding: 0px; line-height: 1.1em; color: rgb(255, 0, 0);"><=</span><span class="sh-function" style="margin: 0px; padding: 0px; line-height: 1.1em; font-weight: bold;">min</span><span class="sh-symbol" style="margin: 0px; padding: 0px; line-height: 1.1em; color: rgb(255, 0, 0);">(</span>y1<span class="sh-symbol" style="margin: 0px; padding: 0px; line-height: 1.1em; color: rgb(255, 0, 0);">,</span>y3<span class="sh-symbol" style="margin: 0px; padding: 0px; line-height: 1.1em; color: rgb(255, 0, 0);">)))||(</span>x3<span class="sh-symbol" style="margin: 0px; padding: 0px; line-height: 1.1em; color: rgb(255, 0, 0);">==</span>x2 <span class="sh-symbol" style="margin: 0px; padding: 0px; line-height: 1.1em; color: rgb(255, 0, 0);">&&</span> <span class="sh-symbol" style="margin: 0px; padding: 0px; line-height: 1.1em; color: rgb(255, 0, 0);">(</span>y1<span class="sh-symbol" style="margin: 0px; padding: 0px; line-height: 1.1em; color: rgb(255, 0, 0);">>=</span><span class="sh-function" style="margin: 0px; padding: 0px; line-height: 1.1em; font-weight: bold;">max</span><span class="sh-symbol" style="margin: 0px; padding: 0px; line-height: 1.1em; color: rgb(255, 0, 0);">(</span>y3<span class="sh-symbol" style="margin: 0px; padding: 0px; line-height: 1.1em; color: rgb(255, 0, 0);">,</span>y2<span class="sh-symbol" style="margin: 0px; padding: 0px; line-height: 1.1em; color: rgb(255, 0, 0);">)||</span>y1<span class="sh-symbol" style="margin: 0px; padding: 0px; line-height: 1.1em; color: rgb(255, 0, 0);"><=</span><span class="sh-function" style="margin: 0px; padding: 0px; line-height: 1.1em; font-weight: bold;">min</span><span class="sh-symbol" style="margin: 0px; padding: 0px; line-height: 1.1em; color: rgb(255, 0, 0);">(</span>y3<span class="sh-symbol" style="margin: 0px; padding: 0px; line-height: 1.1em; color: rgb(255, 0, 0);">,</span>y2<span class="sh-symbol" style="margin: 0px; padding: 0px; line-height: 1.1em; color: rgb(255, 0, 0);">)))</span> <span class="sh-symbol" style="margin: 0px; padding: 0px; line-height: 1.1em; color: rgb(255, 0, 0);">||(</span>y1<span class="sh-symbol" style="margin: 0px; padding: 0px; line-height: 1.1em; color: rgb(255, 0, 0);">==</span>y2 <span class="sh-symbol" style="margin: 0px; padding: 0px; line-height: 1.1em; color: rgb(255, 0, 0);">&&</span> <span class="sh-symbol" style="margin: 0px; padding: 0px; line-height: 1.1em; color: rgb(255, 0, 0);">(</span>x3<span class="sh-symbol" style="margin: 0px; padding: 0px; line-height: 1.1em; color: rgb(255, 0, 0);">>=</span><span class="sh-function" style="margin: 0px; padding: 0px; line-height: 1.1em; font-weight: bold;">max</span><span class="sh-symbol" style="margin: 0px; padding: 0px; line-height: 1.1em; color: rgb(255, 0, 0);">(</span>x1<span class="sh-symbol" style="margin: 0px; padding: 0px; line-height: 1.1em; color: rgb(255, 0, 0);">,</span>x2<span class="sh-symbol" style="margin: 0px; padding: 0px; line-height: 1.1em; color: rgb(255, 0, 0);">)||</span>x3<span class="sh-symbol" style="margin: 0px; padding: 0px; line-height: 1.1em; color: rgb(255, 0, 0);"><=</span><span class="sh-function" style="margin: 0px; padding: 0px; line-height: 1.1em; font-weight: bold;">min</span><span class="sh-symbol" style="margin: 0px; padding: 0px; line-height: 1.1em; color: rgb(255, 0, 0);">(</span>x1<span class="sh-symbol" style="margin: 0px; padding: 0px; line-height: 1.1em; color: rgb(255, 0, 0);">,</span>x2<span class="sh-symbol" style="margin: 0px; padding: 0px; line-height: 1.1em; color: rgb(255, 0, 0);">)))</span> <span class="sh-symbol" style="margin: 0px; padding: 0px; line-height: 1.1em; color: rgb(255, 0, 0);">||</span> <span class="sh-symbol" style="margin: 0px; padding: 0px; line-height: 1.1em; color: rgb(255, 0, 0);">(</span>y1<span class="sh-symbol" style="margin: 0px; padding: 0px; line-height: 1.1em; color: rgb(255, 0, 0);">==</span>y3 <span class="sh-symbol" style="margin: 0px; padding: 0px; line-height: 1.1em; color: rgb(255, 0, 0);">&&</span> <span class="sh-symbol" style="margin: 0px; padding: 0px; line-height: 1.1em; color: rgb(255, 0, 0);">(</span>x2<span class="sh-symbol" style="margin: 0px; padding: 0px; line-height: 1.1em; color: rgb(255, 0, 0);">>=</span><span class="sh-function" style="margin: 0px; padding: 0px; line-height: 1.1em; font-weight: bold;">max</span><span class="sh-symbol" style="margin: 0px; padding: 0px; line-height: 1.1em; color: rgb(255, 0, 0);">(</span>x1<span class="sh-symbol" style="margin: 0px; padding: 0px; line-height: 1.1em; color: rgb(255, 0, 0);">,</span>x3<span class="sh-symbol" style="margin: 0px; padding: 0px; line-height: 1.1em; color: rgb(255, 0, 0);">)||</span>x2<span class="sh-symbol" style="margin: 0px; padding: 0px; line-height: 1.1em; color: rgb(255, 0, 0);"><=</span><span class="sh-function" style="margin: 0px; padding: 0px; line-height: 1.1em; font-weight: bold;">min</span><span class="sh-symbol" style="margin: 0px; padding: 0px; line-height: 1.1em; color: rgb(255, 0, 0);">(</span>x1<span class="sh-symbol" style="margin: 0px; padding: 0px; line-height: 1.1em; color: rgb(255, 0, 0);">,</span>x3<span class="sh-symbol" style="margin: 0px; padding: 0px; line-height: 1.1em; color: rgb(255, 0, 0);">)))||(</span>y3<span class="sh-symbol" style="margin: 0px; padding: 0px; line-height: 1.1em; color: rgb(255, 0, 0);">==</span>y2 <span class="sh-symbol" style="margin: 0px; padding: 0px; line-height: 1.1em; color: rgb(255, 0, 0);">&&</span> <span class="sh-symbol" style="margin: 0px; padding: 0px; line-height: 1.1em; color: rgb(255, 0, 0);">(</span>x1<span class="sh-symbol" style="margin: 0px; padding: 0px; line-height: 1.1em; color: rgb(255, 0, 0);">>=</span><span class="sh-function" style="margin: 0px; padding: 0px; line-height: 1.1em; font-weight: bold;">max</span><span class="sh-symbol" style="margin: 0px; padding: 0px; line-height: 1.1em; color: rgb(255, 0, 0);">(</span>x3<span class="sh-symbol" style="margin: 0px; padding: 0px; line-height: 1.1em; color: rgb(255, 0, 0);">,</span>x2<span class="sh-symbol" style="margin: 0px; padding: 0px; line-height: 1.1em; color: rgb(255, 0, 0);">)||</span>x1<span class="sh-symbol" style="margin: 0px; padding: 0px; line-height: 1.1em; color: rgb(255, 0, 0);"><=</span><span class="sh-function" style="margin: 0px; padding: 0px; line-height: 1.1em; font-weight: bold;">min</span><span class="sh-symbol" style="margin: 0px; padding: 0px; line-height: 1.1em; color: rgb(255, 0, 0);">(</span>x3<span class="sh-symbol" style="margin: 0px; padding: 0px; line-height: 1.1em; color: rgb(255, 0, 0);">,</span>x2<span class="sh-symbol" style="margin: 0px; padding: 0px; line-height: 1.1em; color: rgb(255, 0, 0);">)))</span> <span class="sh-symbol" style="margin: 0px; padding: 0px; line-height: 1.1em; color: rgb(255, 0, 0);">)</span>
            count<span class="sh-symbol" style="margin: 0px; padding: 0px; line-height: 1.1em; color: rgb(255, 0, 0);">=</span><span class="sh-number" style="margin: 0px; padding: 0px; line-height: 1.1em; color: rgb(169, 0, 169);">2</span><span class="sh-symbol" style="margin: 0px; padding: 0px; line-height: 1.1em; color: rgb(255, 0, 0);">;</span>
        <span class="sh-keyword" style="margin: 0px; padding: 0px; line-height: 1.1em; color: rgb(0, 0, 255); font-weight: bold;">else</span>
            count<span class="sh-symbol" style="margin: 0px; padding: 0px; line-height: 1.1em; color: rgb(255, 0, 0);">=</span><span class="sh-number" style="margin: 0px; padding: 0px; line-height: 1.1em; color: rgb(169, 0, 169);">3</span><span class="sh-symbol" style="margin: 0px; padding: 0px; line-height: 1.1em; color: rgb(255, 0, 0);">;</span>
        <span class="sh-function" style="margin: 0px; padding: 0px; line-height: 1.1em; font-weight: bold;">printf</span><span class="sh-symbol" style="margin: 0px; padding: 0px; line-height: 1.1em; color: rgb(255, 0, 0);">(</span><span class="sh-string" style="margin: 0px; padding: 0px; line-height: 1.1em; color: rgb(255, 0, 0);">"%d</span><span class="sh-specialchar" style="margin: 0px; padding: 0px; line-height: 1.1em; color: rgb(196, 45, 168);">\n</span><span class="sh-string" style="margin: 0px; padding: 0px; line-height: 1.1em; color: rgb(255, 0, 0);">"</span><span class="sh-symbol" style="margin: 0px; padding: 0px; line-height: 1.1em; color: rgb(255, 0, 0);">,</span>count<span class="sh-symbol" style="margin: 0px; padding: 0px; line-height: 1.1em; color: rgb(255, 0, 0);">);</span>
    <span class="sh-cbracket" style="margin: 0px; padding: 0px; line-height: 1.1em; color: rgb(255, 0, 0);">}</span>
    <span class="sh-keyword" style="margin: 0px; padding: 0px; line-height: 1.1em; color: rgb(0, 0, 255); font-weight: bold;">return</span> <span class="sh-number" style="margin: 0px; padding: 0px; line-height: 1.1em; color: rgb(169, 0, 169);">0</span><span class="sh-symbol" style="margin: 0px; padding: 0px; line-height: 1.1em; color: rgb(255, 0, 0);">;</span>
<span class="sh-cbracket" style="margin: 0px; padding: 0px; line-height: 1.1em; color: rgb(255, 0, 0);">}</span>

咦~~~  额额 写的太挫了!!!!!

你可能感兴趣的:(CodeForces 617D CodeForces 617D)