Submitrankingsqueue Status Logout: Home Rules Profile Problems My Submissions

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 2

8/20/13

ZCO-2013, Afternoon Session

Home | Rules | Profile ProblemsSubmitRankingsQueue StatusMy SubmissionsLogout Submission ID: 1055 Submission Time: 05:30:00 Language: cpp User: 751 Problem: CHEWING State: Accepted Total score for this submission: 70 Test Case #0 for 10 points Correct Answer Runtime: 0.01 Test Case #1 for 10 points Correct Answer Runtime: 0.03 Test Case #2 for 10 points Correct Answer Runtime: 0.01 Test Case #3 for 10 points Correct Answer Runtime: 0.03 Test Case #4 for 10 points Correct Answer Runtime: 0.22 Test Case #5 for 10 points Correct Answer Runtime: 0.16 Test Case #6 for 10 points Correct Answer Runtime: 0.2 Your submitted code:
www.iarcs.org.in/zco2013/index.php/contests/zco2013afternoon/results/1055

Download
1/2

8/20/13

ZCO-2013, Afternoon Session

1# i n c l u d e < i o s t r e a m > 2# i n c l u d e < v e c t o r > 3# i n c l u d e < a l g o r i t h m > 4u s i n gn a m e s p a c es t d ; 5 6i n tm a i n ( ) 7{ 8 l o n gl o n gi n tn , k ; 9 c i n > > n > > k ; 1 0 v e c t o r < i n t >i n p ( n ) ; 1 1 f o r ( i n ti = 0 ; i < n ; i + + ) 1 2 { 1 3 i n tt e m p ; 1 4 c i n > > t e m p ; 1 5 i n p [ i ]=t e m p ; 1 6 } 1 7 s o r t ( i n p . b e g i n ( ) , i n p . e n d ( ) ) ; 1 8 i n ti = 0 , j = n 1 ; 1 9 l o n gl o n gi n tc o u n t = 0 ; 2 0 w h i l e ( 1 ) 2 1 { 2 2 i f ( i = = j ) 2 3 b r e a k ; 2 4 i f ( i n p [ j ]<k i n p [ i ] ) 2 5 { 2 6 c o u n t+ = j i ; 2 7 i + + ; 2 8 } 2 9 e l s e 3 0 { 3 1 j ; 3 2 } 3 3 } 3 4 c o u t < < c o u n t < < e n d l ; 3 5 c i n . g e t ( ) ; 3 6 c i n . g e t ( ) ; 3 7 r e t u r n0 ; 3 8} 3 9 Current Server Time: Tue, 20 Aug 2013 22:27:26 +0530 ZCO-2013, Afternoon Session has ended.

www.iarcs.org.in/zco2013/index.php/contests/zco2013afternoon/results/1055

2/2

You might also like