There are N little kids sitting in a circle, each of them are carrying some java beans in their hand. Their teacher want to select M kids who seated in M consecutive seats and collect java beans from them. The teacher knows the number of java beans e…
/*很简单的一题,求连续的m位,求总和最多的值,循环找一下,就出来了*/ #include<stdio.h> ]; int main(int argc, char* argv[]) { int t,i,j; int n,m,sum,max; while(scanf("%d",&t)!=EOF) { while(t--) { scanf("%d%d",&n,&m); ;i<n;i++) scanf("%d"…
The balance was the first mass measuring instrument invented. In its traditional form, it consists of a pivoted horizontal lever of equal length arms, called the beam, with a weighing pan, also called scale, suspended from each arm (which is the orig…
MightyHorse is playing a music game called osu!. After playing for several months, MightyHorse discovered the way of calculating score in osu!: 1. While playing osu!, player need to click some circles following the rhythm. Each time a player clicks,…
水题你要信了 Time Limit: 2000/1000ms (Java/Others) Problem Description: 某发最近又认识了很多妹(han)子,可是妹(han)子一多不免有时会忘记那么一两个,为了记得他们的名字,发哥设计了一个记录器.对于每个他刚认识的妹(han)子,他都把妹子的名字放进记录器里,如果记录器已经有这个妹子的名字,则在这个妹子的名字后面加上一个数字(数字从1开始),输出妹子的名字加上数字.若记录器没有这个妹子的记录,则输出OH GOD. Input: (EO…
题目传送门 /* 水题:找排序找中间的价格,若有两个,选价格大的: 写的是有点搓:) */ #include <cstdio> #include <iostream> #include <algorithm> #include <cmath> #include <cstring> #include <string> #include <map> #include <set> #include <queue…
题目传送门 /* 水题:已知1928年1月1日是星期日,若是闰年加1,总天数对7取余判断就好了: */ #include <cstdio> #include <iostream> #include <algorithm> #include <cmath> #include <cstring> #include <string> #include <map> #include <set> #include <…
题目传送门 /* 水题:) */ #include <cstdio> #include <iostream> #include <algorithm> #include <cmath> #include <cstring> #include <string> #include <map> #include <set> #include <queue> #include <vector>…
水题你信吗 Time Limit: 2000/1000ms (Java/Others) Problem Description: 某发最近又认识了很多妹(han)子,可是妹(han)子一多不免有时会忘记那么一两个,为了记得他们的名字,发哥设计了一个记录器.对于每个他刚认识的妹(han)子,他都把妹子的名字放进记录器里,如果记录器已经有这个妹子的名字,则在这个妹子的名字后面加上一个数字(数字从1开始),输出妹子的名字加上数字.若记录器没有这个妹子的记录,则输出OH GOD. Input: (EOF…
题目传送门 水题,找出出现次数最多的数字,若多个输出Nobody //#include <bits/stdc++.h> //using namespace std; #include <cstdio> //stdio.h #include <cstring> //string.h #include <algorithm> const int N = 1e3 + 5; struct Hash { int num, cnt; bool operator <…