CF1217A

题意:

配exp点经验给力量str和智力int,求有多少种分配情况使str比int高

解法:

打表找规律,没了。

CODE;

#include <bits/stdc++.h>

using namespace std;

#define LL long long

int T,a,b,c,ans;

int main() {
scanf("%d",&T);
while(T--) {
scanf("%d%d%d",&a,&b,&c);
int ans = (b + c - a + 2) / 2;
ans = max(ans , 0);
ans = (c - ans + 1);
if(ans <= 0) puts("0");
else printf("%d \n",ans);
}
//system("pause");
return 0;
}

CF1217A的更多相关文章

  1. CF1217A Creating a Character

    You play your favourite game yet another time. You chose the character you didn't play before. It ha ...

随机推荐

  1. vue引入警告:There are multiple modules with names that only differ in casing. This can lead to unexpected behavior when compiling on a filesystem with other case-semantic. Use equal casing. Compare these

    在写vue项目的时候 当我使用 : import dataSource from '../overseaProduct/house/dataSource'; 引入dataSource文件的时候:控制台 ...

  2. sqlserver使用EF模型经验

    sqlserver使用EF模型经验 EF模型使用本人在之前两三年中从没使用过,所以刚开始使用就会踩上许多的坑.今天我不单单说下自己所踩的一些坑与当前公司中使用EF模型设计的理念,即是为我自己做个笔记, ...

  3. nodejs实现邮件发送

    需要安装的node模块 nodemailer 新建项目目录 mail-test 进入这个项目里使用终端初始化package.json(npm init) 安装express和nodemailer并保存 ...

  4. 四、TreeSet

    HashSet 是无序的,如果要对集合实现排序,那么就需要使用TreeSet 让TreeSet 实现集合有序有两种方法 一.让元素自身具备比较排序功能,具备比较排序功能的元素只需要实现Comparab ...

  5. Go 接口使用

    本文来自:CSDN博客 感谢作者:fengfengdiandia 查看原文:go 接口 Go 语言不是一种 “传统” 的面向对象编程语言:它里面没有类和继承的概念. 但是 Go 语言里有非常灵活的接口 ...

  6. iOS8中UIActionSheet弹出UIImagePickerController异常处理

    iOS8之后,UIActionSheet改父于UIAlertController.带来了一丢丢兼容性的问题. 比如在弹出的actionsheet中选择从相册选择图片或者拍照,之后弹出UIImagePi ...

  7. menustrip选项怎么设置竖向分割线

    效果图: 解决方案: 选中一个项--[右键]--[插入]--[separator]

  8. MYSQL的B+Tree索引树高度如何计算

    前一段被问到一个平时没有关注到有关于MYSQL索引相关的问题点,被问到一个表有3000万记录,假如有一列占8位字节的字段,根据这一列建索引的话索引树的高度是多少? 这一问当时就被问蒙了,平时这也只关注 ...

  9. 将用户赋予sudo权限:配置sudoers文件

    xxx is not in the sudoers file.This incident will be reported.的解决方法   1.切换到root用户下,怎么切换就不用说了吧,不会的自己百 ...

  10. 二零一八阿里p7笔试116题

    1. junit用法,before,beforeClass,after, afterClass的执行顺序 2. 分布式锁 3. nginx的请求转发算法,如何配置根据权重转发 4. 用hashmap实 ...