| # | User | Rating |
|---|---|---|
| 1 | Benq | 3676 |
| 2 | Kevin114514 | 3659 |
| 3 | jiangly | 3640 |
| 4 | turmax | 3450 |
| 5 | tourist | 3382 |
| 6 | strapple | 3360 |
| 7 | Um_nik | 3354 |
| 8 | squareOf105 | 3348 |
| 9 | maroonrk | 3312 |
| 10 | idontwannadothis…e | 3191 |
| # | User | Contrib. |
|---|---|---|
| 1 | Qingyu | 155 |
| 2 | nik_exists | 151 |
| 3 | maspy | 149 |
| 4 | AmShZ | 145 |
| 5 | Um_nik | 143 |
| 6 | Errichto | 139 |
| 7 | BledDest | 136 |
| 8 | adamant | 134 |
| 9 | maroonrk | 132 |
| 10 | cry | 130 |
|
+4
You can use merge Sort Tree to solve this problems. Here you can see sample code of merger sort tree |
|
-64
I quit . |
|
-27
I enjoy Codeforces comment section more than Facebook. But what's happened today!! Almost 3 hours past and only 2 comments. |
|
0
It took me one year to become pupil.I still can remember how much glad I was on that time. And Best wishes for you. |
|
-8
My little progress came when I start doing contest regularly.And If the contest was good that's good , if bad then it works as motivation to solve more problems and do good in later contest.So participating in regular contest is a very important part. |
|
+3
Online courses are unnecessary..Just solve problems..read editorials..see others solution..most importantly give time on that. |
|
0
Is there any speciality with this problem Or you just loved that ! |
|
+8
I think , I am late if compare with you, I started both coding and competitive programming at the age of 23 . Before that I didn't knew that what coding is . But I love this and trying my best. |
|
+3
Truly said — I become more excited when I see the score distribution like this way.. |
|
0
Consider the following graph 4 1 2 2 3 3 4 then subtree of 1 is 2 3 4,subtree of 2 is 3 4 and subtree of 3 is 4 . then you are given some value of b and c . if value of b is 1 and value of c is 0 then you can shuffling between them ,and at the mean time you will consider the cost of the parent which cost is less. suppose you can shuffling node ( 2 , 4 ) or ( 3 , 4 ) .but the cost of 2 is 10 and 3 is 20 . so you will choose 2 as parent . and you will perform dfs and track down the minimum cost . To understand better you can watch this solution : https://codeforces.me/contest/1363/submission/82224132 |
|
+8
I love the way you guys made this editorial. The concept of Key Idea and Detailed Explanation was really good . |
|
0
That really wonders me how you think in that much easier way. |
|
+1
I become expert today for the first time..That's a great feeling . |
|
0
I don't get the points why too many arguments against the division-4 . If It's too easy for you then make a race to finish all the problems in the shortest time and enjoy the contest or skip that. |
|
0
Contest and Ramadan ... Both are enjoyable... |
|
On
MikeMirzayanov →
Codeforces Round 606(Div.1, Div.2) and Technocup — Elimination Round 4, 7 years ago
-9
Tomorrow is a great day.. Make a contest..take 2 hours rest..Then again...Boom.. Feeling very much excited... |
|
-13
Div-3 is Love... True Love... Pure Love... |
|
+21
Multiple contest in a Queue.. Thanks codeforces ... |
|
-52
Everyone is too much excited for the contest because of tourist.... I am also excited and also frightened about the difficulty level... Anyway hope this will be interesting... |
|
0
And you are going to get more up-vote Mr.PaPaSmurf |
|
0
Yeah..Learn from today... But It made a lose to me.. |
|
-34
At first full input need to be taken.. If the code can't take full input ... How the problem can be Ac...!! correct ans or not is the later priority... I got 50 negative for this in hacking phase... **** |
|
0
Finally Div-3... Want more contest of Div-3.. In fact one in every week.... |
|
On
ch_egor →
Codeforces Round #583 (based on Olympiad of Metropolises) (div. 1 + div. 2), 7 years ago
0
The problems in ( Div-1 & Div-2 ) combined contest are always interesting.... |
|
+15
My Final exam is going on... But I won't miss div-3.. Div-3 is love.. |
|
-34
That means It's also a tricky part... You guys makes me disappinted.. |
|
-34
After this contest my final exam will be started....But I will keep doing contest |
|
-8
Hmmm.. |
|
-11
sorry for us |
|
-11
how much you understand? |
|
-11
I am not being able to understand the question of Div-2 (C) Hide and Seek... please someone explain me the question?? |
|
-19
I can only handle A,B,C after contest.Bt during contest time I was a great looser |
|
-9
I just want to be expert in this year. |
|
-12
I think that was Sarcasm..because everybody knows that tourist is the best... |
|
0
package Practice; import java.util.Scanner; public class Main { public static void main(String[] args) {
Scanner input = new Scanner(System.in);
int a,n,sum=0,c1=0,c2=0,c3=0,c4=0;
n=input.nextInt();
for (int i = 0; i < n; i++) {
a=input.nextInt();
switch (a) {
case 1:
c1++;
break;
case 2:
c2++;
break;
case 3:
c3++;
break;
default:
c4++;
break;
}
}
sum=sum+c4;
c4=0;
sum=sum+(c2/2);
c2=c2%2;
if(c1>=c3){
sum=sum+c3;
c1=c1-c3;
c3=0;
sum=sum+(c1/4);
c1=c1%4;
if((c1+(c2*2))<=4 && (c1+(c2*2))>0){
sum++;
c1=0;
c2=0;
}else if(c1==3 && c2==1){
sum=sum+2;
c1=0;
c2=0;
}
}
else if(c1<c3){
sum=sum+c1;
c3=c3-c1;
c1=0;
sum=sum+c3+c2;
}
System.out.println(sum);
}} Hope you will get this. |
| Name |
|---|


