【链接】h在这里写链接


【题意】


在这里写题意

【题解】


t<=k,输出t
t>=n,输出k-t+n
其他情况都是k

【错的次数】


0

【反思】


在这了写反思

【代码】

  1. /*
  2.  
  3. */
  4. #include <cstdio>
  5. #include <iostream>
  6. #include <algorithm>
  7. #include <cstring>
  8. #include <vector>
  9. #include <map>
  10. #include <queue>
  11. #include <iomanip>
  12. #include <set>
  13. #include <cstdlib>
  14. #include <cmath>
  15. #include <bitset>
  16. using namespace std;
  17. #define lson l,m,rt<<1
  18. #define rson m+1,r,rt<<1|1
  19. #define LL long long
  20. #define rep1(i,a,b) for (int i = a;i <= b;i++)
  21. #define rep2(i,a,b) for (int i = a;i >= b;i--)
  22. #define mp make_pair
  23. #define pb emplace_back
  24. #define fi first
  25. #define se second
  26. #define ld long double
  27. #define ms(x,y) memset(x,y,sizeof x)
  28. #define ri(x) scanf("%d",&x)
  29. #define rl(x) scanf("%lld",&x)
  30. #define rs(x) scanf("%s",x)
  31. #define rf(x) scnaf("%lf",&x)
  32. #define oi(x) printf("%d",x)
  33. #define ol(x) printf("%lld",x)
  34. #define oc putchar(' ')
  35. #define os(x) printf(x)
  36. #define all(x) x.begin(),x.end()
  37. #define Open() freopen("F:\\rush.txt","r",stdin)
  38. #define Close() ios::sync_with_stdio(0)
  39. #define sz(x) ((int) x.size())
  40. #define ld long double
  41.  
  42. typedef pair<int,int> pii;
  43. typedef pair<LL,LL> pll;
  44.  
  45. //mt19937 myrand(time(0));
  46. //int get_rand(int n){return myrand()%n + 1;}
  47. const int dx[9] = {0,1,-1,0,0,-1,-1,1,1};
  48. const int dy[9] = {0,0,0,-1,1,-1,1,-1,1};
  49. const double pi = acos(-1.0);
  50. const int N = 110;
  51.  
  52. int n,k,t;
  53.  
  54. int main(){
  55.     //Open();
  56.     //Close();
  57.     ri(n),ri(k),ri(t);
  58.     if (t >= k && t <= n){
  59.         oi(k);puts("");
  60.     }else{
  61.         if (t < k)
  62.             oi(t),puts("");
  63.         else
  64.             //t>n
  65.             oi(k-(t-n)),puts("");
  66.     }
  67.     return 0;
  68. }

【Codeforces Round #432 (Div. 2) A】 Arpa and a research in Mexican wave的更多相关文章

  1. 【Codeforces Round #432 (Div. 1) B】Arpa and a list of numbers

    [链接]h在这里写链接 [题意] 定义bad list是一个非空的.最大公约数为1的序列.给定一个序列,有两种操作:花费x将一个元素删除.花费y将一个元素加1,问你将这个序列变为good list所需 ...

  2. 【Codeforces Round #432 (Div. 2) B】Arpa and an exam about geometry

    [链接]h在这里写链接 [题意] 给你3个点A,B,C 问你能不能将纸绕着坐标轴上的一点旋转.使得A与B重合,B与C重合 [题解] 这3个点必须共圆. 则A,B,C不能为一条直线.否则无解. 共圆之后 ...

  3. 【Codeforces Round #432 (Div. 1) A】 Five Dimensional Points

    [链接]点击打开链接 [题意] 给你n个5维的点. 然后让你以其中的某一个点作为起点a. 另选两个点b,c. 组成向量a->b,a->c 如果所有的a->b和a->c的夹角都是 ...

  4. 【Codeforces Round #420 (Div. 2) C】Okabe and Boxes

    [题目链接]:http://codeforces.com/contest/821/problem/C [题意] 给你2*n个操作; 包括把1..n中的某一个数压入栈顶,以及把栈顶元素弹出; 保证压入和 ...

  5. 【Codeforces Round #420 (Div. 2) B】Okabe and Banana Trees

    [题目链接]:http://codeforces.com/contest/821/problem/B [题意] 当(x,y)这个坐标中,x和y都为整数的时候; 这个坐标上会有x+y根香蕉; 然后给你一 ...

  6. 【Codeforces Round #420 (Div. 2) A】Okabe and Future Gadget Laboratory

    [题目链接]:http://codeforces.com/contest/821/problem/A [题意] 给你一个n*n的数组; 然后问你,是不是每个位置(x,y); 都能找到一个同一行的元素q ...

  7. 【Codeforces Round #423 (Div. 2) C】String Reconstruction

    [Link]:http://codeforces.com/contest/828/problem/C [Description] 让你猜一个字符串原来是什么; 你知道这个字符串的n个子串; 且知道第i ...

  8. 【Codeforces Round #423 (Div. 2) B】Black Square

    [Link]:http://codeforces.com/contest/828/problem/B [Description] 给你一个n*m的格子; 里面包含B和W两种颜色的格子; 让你在这个格子 ...

  9. 【Codeforces Round #423 (Div. 2) A】Restaurant Tables

    [Link]:http://codeforces.com/contest/828/problem/A [Description] 有n个组按照时间顺序来餐馆; 每个组由一个人或两个人组成; 每当有一个 ...

随机推荐

  1. layui图片懒加载-loading占位图

    前言 使用layui的图片懒加载,发现未加载的图片没有loading占位图,显示的是裂图,看着不是很好.找了一些解决方法我统一记录一下. layui图片懒加载使用方法 layui.use(’flow’ ...

  2. 教你破解隔壁妹子wifi密码,成功率高达90%

    破解wifi密码听起来很复杂,实际上也不是非常的复杂,今天教大家如何破解隔壁妹子的wifi密码. 首先声明:本教程只用于技术交流,请勿用于非法用途.请严格遵循相关法律法规.为了保护本例中被破解密码者信 ...

  3. AI:OPENCV实现人脸的自动识别

    依赖jar包: faceRecognition.java package opencv; import java.awt.Graphics; import java.awt.image.Buffere ...

  4. javescript定时器demo

    本来认为这个事情还是挺easy的不值得写上去,今天同事突然问我.我心想曾经写过,可是就是想不起函数的名称的,于是翻了一下原来的代码. function run() { interval = setIn ...

  5. Oracle-02-数据库概述

    一.数据库用途 用于存放数据的软件 当中Application server重要,将数据存在表中每一个表关系就能够反映不同表之间数据的关系,比方淘宝用户注冊.商品买卖等数据存在操作系统的目录中,不便于 ...

  6. 61.C++文件操作实现硬盘检索

    #include <iostream> #include <fstream> #include <memory> #include <cstdlib> ...

  7. 51.cgi网站后门

    运行截图: html开发: <html> <body> <form id="form" name="form" method=&q ...

  8. LuoguP4016 负载平衡问题(费用流)

    题目描述 G 公司有 n 个沿铁路运输线环形排列的仓库,每个仓库存储的货物数量不等.如何用最少搬运量可以使 n 个仓库的库存数量相同.搬运货物时,只能在相邻的仓库之间搬运. 输入输出格式 输入格式: ...

  9. RPC简易学习

    0.RPC简介 RPC,   英文全称:Remote Process Call.   中文全称:远程过程调用. 客户端通过网络请求调用远程服务端对外暴露服务.常用的两种RPC协议:TCP.HTTP. ...

  10. 利用ArcGIS水文分析工具提取河网

    转自原文 利用ArcGIS水文分析工具提取河网(转) DEM包含有多种信息,ArcToolBox提供了利用DEM提取河网的方法,但是操作比较烦琐(帮助可参看Hydrologic analysis sa ...