A. Angry Students】的更多相关文章

网址:http://codeforces.com/problemset/problem/1287/A It's a walking tour day in SIS.Winter, so tt groups of students are visiting Torzhok. Streets of Torzhok are so narrow that students have to go in a row one after another. Initially, some students ar…
It's a walking tour day in SIS.Winter, so t groups of students are visiting Torzhok. Streets of Torzhok are so narrow that students have to go in a row one after another. Initially, some students are angry. Let's describe a group of students by a str…
这场比赛的出题人挺有意思,全部magic成了青色. 还有题目中的图片特别有趣. 晚上没打,开virtual contest打的,就会前三道,我太菜了. 最后看着题解补了第四道. 比赛传送门 A. Angry Students 题目大意:有t队学生,每个学生有两种状态,生气(A)或不生气(P).(话说为什么生气的戴着圣诞帽哇)所有生气的人都会往前一个人丢雪球,被丢到的人也会变得生气,也会丢雪球.问你每队人中最后一个学生变得生气的时刻. 这题就是统计最长的连续的'P'当然前提是左边有生气的人. 代码…
https://codeforces.com/contest/1287/ A - Angry Students 题意:求A后面的P最长连续有几个? 题解:? int n; char s[200005]; void test_case() { scanf("%d%s", &n, s + 1); int cnt = 0, ans = 0; int b = 1; while(b <= n && s[b] == 'P') ++b; for(int i = b; i…
Don't make a promise when you are in Joy. Don't reply when you are Sad.Don't take decisions when you are Angry.Think Twice.Act Wise. 当你喜悦时,不要轻易地承诺.当你悲伤时,不要轻易地回复.当你愤怒时,不要轻易做出决定.三思而后行,明智之法.…
原文地址:http://www.mimno.org/articles/ml-learn/ written by david mimno One of my students recently asked me for advice on learning ML. Here’s what I wrote. It’s biased toward my own experience, but should generalize. My current favorite introduction is…
染色判读二分图+Hungary匹配 The Accomodation of Students Time Limit: 5000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 1705    Accepted Submission(s): 821 Problem Description There are a group of students. Some of them…
Save the Students Time Limit:134MS     Memory Limit:0KB     64bit IO Format:%lld & %llu   Description Hogwarts is under attack by the Dark Lord, He-Who-Must-Not-Be-Named. To protect the students, Harry Potter must cast protective spells so that those…
The Accomodation of Students Time Limit: 5000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 4091    Accepted Submission(s): 1876 Problem Description There are a group of students. Some of them may know each ot…
题目链接:http://codeforces.com/problemset/problem/357/A 题目意思:将一堆人分成两组:beginners 和 intermediate coders .每一个人都有一个point,给出每一个point里的总人数(Ci 个人有分数 i )和 x,y,需要找出划分为两组后,每一个组的人数(假设为a,b)符合 x <=  a  <= y 并且 x<= b <= y 的条件,输出这a个人是小于哪个point的,这个point还应该满足另一组的b…