关于CF-EducationalCodeforcesRound44(RatedforDiv.2)-A-ChessPlacing的问题就给大家分享到这里,感谢你花时间阅读本站内容,更多关于A.Creat
关于CF-Educational Codeforces Round 44 (Rated for Div. 2)-A-Chess Placing的问题就给大家分享到这里,感谢你花时间阅读本站内容,更多关于A. Creating a Character(Educational Codeforces Round 72 (Rated for Div. 2) )、CF-Educational Codeforces Round 44 (Rated for Div. 2) A~E、CF-Educational Codeforces Round 44 (Rated for Div. 2)-B-Switches and Lamps、CF-Educational Codeforces Round 44 (Rated for Div. 2)-C-Liebig's Barrels等相关知识的信息别忘了在本站进行查找喔。
本文目录一览:- CF-Educational Codeforces Round 44 (Rated for Div. 2)-A-Chess Placing
- A. Creating a Character(Educational Codeforces Round 72 (Rated for Div. 2) )
- CF-Educational Codeforces Round 44 (Rated for Div. 2) A~E
- CF-Educational Codeforces Round 44 (Rated for Div. 2)-B-Switches and Lamps
- CF-Educational Codeforces Round 44 (Rated for Div. 2)-C-Liebig's Barrels
CF-Educational Codeforces Round 44 (Rated for Div. 2)-A-Chess Placing
总结
以上是小编为你收集整理的CF-Educational Codeforces Round 44 (Rated for Div. 2)-A-Chess Placing全部内容。
如果觉得小编网站内容还不错,欢迎将小编网站推荐给好友。
A. Creating a Character(Educational Codeforces Round 72 (Rated for Div. 2) )
You play your favourite game yet another time. You chose the character you didn‘t play before. It has strstr points of strength and intint points of intelligence. Also,at start,the character has expexp free experience points you can invest either in strength or in intelligence (by investing one point you can either raise strength by 11 or raise intelligence by 11).
Since you‘d like to make some fun you want to create a jock character,so it has more strength than intelligence points (resulting strength is strictly greater than the resulting intelligence).
Calculate the number of different character builds you can create (for the purpose of replayability) if you must invest all free points. Two character builds are different if their strength and/or intellect are different.
The first line contains the single integer TT (1≤T≤1001≤T≤100) — the number of queries. Next TT lines contain descriptions of queries — one per line.
This line contains three integers strstr, intint and expexp (1≤str,int≤1081≤str,int≤108, 0≤exp≤1080≤exp≤108) — the initial strength and intelligence of the character and the number of free points,respectively.
Print TT integers — one per query. For each query print the number of different character builds you can create.
4 5 3 4 2 1 0 3 5 5 4 10 6
3 1 2 0
In the first query there are only three appropriate character builds: (str=7,int=5)(str=7,int=5), (8,4)(8,4) and (9,3)(9,3). All other builds are either too smart or don‘t use all free points.
In the second query there is only one possible build: (2,1)(2,1).
In the third query there are two appropriate builds: (7,6)(7,6), (8,5)(8,5).
In the fourth query all builds have too much brains.
int main() { int cnt,n,m,k; while(cin>>n) { while(n--) { cin>>m>>k>>cnt; cout<<min( max( (m+cnt-k+1)/2,0 ),cnt+1 )<<endl; } } ok; }
CF-Educational Codeforces Round 44 (Rated for Div. 2) A~E
总结
以上是小编为你收集整理的CF-Educational Codeforces Round 44 (Rated for Div. 2) A~E全部内容。
如果觉得小编网站内容还不错,欢迎将小编网站推荐给好友。
CF-Educational Codeforces Round 44 (Rated for Div. 2)-B-Switches and Lamps
总结
以上是小编为你收集整理的CF-Educational Codeforces Round 44 (Rated for Div. 2)-B-Switches and Lamps全部内容。
如果觉得小编网站内容还不错,欢迎将小编网站推荐给好友。
CF-Educational Codeforces Round 44 (Rated for Div. 2)-C-Liebig's Barrels
总结
以上是小编为你收集整理的CF-Educational Codeforces Round 44 (Rated for Div. 2)-C-Liebig''s Barrels全部内容。
如果觉得小编网站内容还不错,欢迎将小编网站推荐给好友。
关于CF-Educational Codeforces Round 44 (Rated for Div. 2)-A-Chess Placing的问题我们已经讲解完毕,感谢您的阅读,如果还想了解更多关于A. Creating a Character(Educational Codeforces Round 72 (Rated for Div. 2) )、CF-Educational Codeforces Round 44 (Rated for Div. 2) A~E、CF-Educational Codeforces Round 44 (Rated for Div. 2)-B-Switches and Lamps、CF-Educational Codeforces Round 44 (Rated for Div. 2)-C-Liebig's Barrels等相关内容,可以在本站寻找。
本文标签: