https://codeforces.com/contest/1196/problem/A

题解:

/*
*@Author:   STZG
*@Language: C++
*/
#include <bits/stdc++.h>
#include<iostream>
#include<algorithm>
#include<cstdlib>
#include<cstring>
#include<cstdio>
#include<string>
#include<vector>
#include<bitset>
#include<queue>
#include<deque>
#include<stack>
#include<cmath>
#include<list>
#include<map>
#include<set>
//#define DEBUG
#define RI register int
#define endl "\n"
using namespace std;
typedef long long ll;
//typedef __int128 lll;
const int N=100000+10;
const int M=100000+10;
const int MOD=1e9+7;
const double PI = acos(-1.0);
const double EXP = 1E-8;
const int INF = 0x3f3f3f3f;
int t,n,m,k,p,l,r,u,v;
int ans,cnt,flag,temp,sum;
ll a,b,c;
char str;
struct node{};
int main()
{
#ifdef DEBUGfreopen("input.in", "r", stdin);//freopen("output.out", "w", stdout);
#endif//ios::sync_with_stdio(false);//cin.tie(0);//cout.tie(0);scanf("%d",&t);while(t--){scanf("%I64d%I64d%I64d",&a,&b,&c);cout<<(a+b+c)/2<<endl;}#ifdef DEBUGprintf("Time cost : %lf s\n",(double)clock()/CLOCKS_PER_SEC);
#endif//cout << "Hello world!" << endl;return 0;
}

Codeforces 1196A Three Piles of Candies相关推荐

  1. 2021-11-28比赛博客

    CodeForces 1196A-Three Piles of Candies 题意: 两个人分三堆糖果,第一个人任选一堆,另一个人在剩下的两堆中任选一堆,最后一堆协商分配,如果其中一个人糖果多,则丢 ...

  2. 基础算法 —— 模拟思维

    [概述] 模拟,是根据实际问题建立模型,模拟实际按程序走一遍,最终求出答案. 思维,则是与逻辑思维有关,其需要针对题意.数据范围等抽丝剥茧抽离出有用的信息,从而得出一个结果. 对于一般的模拟,直接根据 ...

  3. 2021UPC个人训练赛第47场

    个人训练赛第47场 A: 加工零件(最短路) 问题 A: 加工零件时间限制: 1 Sec 内存限制: 128 MB 题目描述 凯凯的工厂正在有条不紊地生产一种神奇的零件,神奇的零件的生产过程自然也很神 ...

  4. CF思维联系– CodeForces - 991C Candies(二分)

    ACM思维题训练集合 After passing a test, Vasya got himself a box of n candies. He decided to eat an equal am ...

  5. Codeforces Zepto Code Rush 2014 -C - Dungeons and Candies

    这题给的一个教训:Codeforces没有超时这个概念.本来以为1000*(1000+1)/2*10*10要超时的.结果我想多了. 这题由于k层都可能有关系,所以建一个图,每两个点之间连边,边权为n* ...

  6. Codeforces Round #634 (Div. 3)A. Candies and Two Sisters

    题目: A. Candies and Two Sisters time limit per test : 1 second memory limit per test : 256 megabytes ...

  7. Codeforces Round #636 (Div. 3) ——A. Candies 题解

    题目链接:https://codeforces.com/contest/1343/problem/A 签到题,for循环暴力枚举即可. 代码如下: #include <bits/stdc++.h ...

  8. B - Equal Candies CodeForces - 1676B

    There are nn boxes with different quantities of candies in each of them. The ii-th box has a_ia i ​ ...

  9. CodeForces 436C (Dungeons and Candies)

    最小生成树,一次ac(兴奋ing) #include <cstdio> #include <cstring> #include <algorithm> using ...

最新文章

  1. from name as id为啥报错
  2. module 'schedule' has no attribute 'every
  3. VScode Python插件
  4. 关于计算机专业的作文800字,我的电脑作文800字范文
  5. 2010年杭电计算机研究生复试---笔试编程
  6. 回溯算法团灭子集、排列、组合问题
  7. 存储系统的三种分类及KV模型
  8. EndNote导出毕业论文格式的参考文献
  9. 神泣单机服务器维护,神泣单机版
  10. 计算机word题目设置标题,word文档标题怎么设置?word设置标题样式的方法
  11. 自制太阳能手机充电器
  12. 从零开始的运维之路【标题党】
  13. mac 更新系统时间
  14. 电脑锁屏挂机锁绿色版简单实用工具
  15. Android studio百度地图之定位到国外
  16. Mysql 安装PMM监控 (一台主机安装)
  17. python 成语接龙-连接数据库
  18. 设计模式——23种设计模式学习总结
  19. 怎么把多个文件做成一个二维码?文件怎么做成二维码?
  20. KEIL,#ifdef宏定义下失效代码差异性显示

热门文章

  1. oracle数据库查询代码,ORACLE数据库查询表实例代码
  2. 腐蚀rust研究台抽奖_延迟焦化装置的腐蚀风险分析
  3. android phpmyadmin,从android studio向phpmyadmin添加数据时出现问题
  4. php+中午截取,PHP_php字符串截取中文截取2,单字节截取模式,//中文截取2,单字节截取模式 - phpStudy...
  5. 【推荐系统】基于物品的协同过滤算法
  6. 六十三、栈在括号匹配和表达式求值中的应用
  7. java 100例(二)
  8. webpack -v 指令报错
  9. 东南大学周张泉:基于知识图谱的推理技术 | 实录·Guru Talk
  10. 爬虫笔记10Scrapy-框架