我们只需要知道这个取完模最大是 a / 2 + 1就可以了,不过超时了几次,换了visual C++才过,oj还真是傲娇啊. #include<iostream> #include<cstdio> #include<cstring> using namespace std; int main() { int t; long long a,b; ; scanf("%d",&t); while(t--) { scanf("%lld %l…
A-B Game Time Limit:1000MS Memory Limit:32768KB 64bit IO Format:%I64d & %I64u Submit Status Practice FZU 2147 Description Fat brother and Maze are playing a kind of special (hentai) game by two integers A and B. First Fat brother write an int…
主要思路:求出蚊子到达球的时间区间(用方程得解),对区间做一个贪心的选择,选择尽可能多的区间有交集的区间段(结构体排序即可),然后计数. #include <cstdio> #include <cmath> #include <iostream> #include <algorithm> using namespace std; #define ll long long #define maxn 100025 int n, m, x,y; ll r; int…
FZU 2110 Star Time Limit:1000MS Memory Limit:32768KB 64bit IO Format:%I64d & %I64u Practice Description Overpower often go to the playground with classmates. They play and chat on the playground. One day, there are a lot of stars in the sk…
Yinyangshi is a famous RPG game on mobile phones. Kim enjoys collecting cards in this game. Suppose there are n kinds of cards. If you want to get a new card, you need to pay W coins to draw a card. Each time you can only draw one card, all the cards…
Yinyangshi is a famous RPG game on mobile phones. Kim enjoys collecting cards in this game. Suppose there are n kinds of cards. If you want to get a new card, you need to pay W coins to draw a card. Each time you can only draw one card, all the cards…
Problem Description 题目描述 ZB loves watching RunningMan! There's a game in RunningMan called 100 vs 100. There are two teams, each of many people. There are 3 rounds of fighting, in each round the two teams send some people to fight. In each round, whi…