CrodeForces 851A--#432 Div2 A
2017-09-07 23:54
316 查看
#include <iostream> #include <cstdio> #include <fstream> #include <algorithm> #include <cmath> #include <deque> #include <vector> #include <queue> #include <string> #include <iostream> #include <cstdio> #include <fstream> #include <algorithm> #include <cmath> #include <deque> #include <vector> #include <queue> #include <string> #include <cstring> #include <map> #include <stack> #include <set> #include <list> #define INF 0x3f3f3f #define maxn 1050 #define juzheng 300 #define ll long long using namespace std; //Date:2017-9-5 //Author:HarryBlackCat int n,k,t; int main(){ while(~scanf("%d %d %d",&n,&k,&t)){ if(t == 0 || t == n + k)//0或n + k 时为0 printf("0\n"); else if(t > 0 && t <= k)//1->k时为t printf("%d\n",t); else if(t > k && t <= n)//(k + 1)->n时为k printf("%d\n",k); else if(t > n && t < n + k)// (n + 1)->(n + k)是为 k - (t - n) printf("%d\n",k - (t - n)); } return 0; }
相关文章推荐
- CrodeForces 851B--#432 Div2 B
- CrodeForces 850A--#432 Div2 C
- Codeforces Codeforces Round #432 (Div. 2 D ) Arpa and a list of numbers
- Codeforces Round #432 (Div. 2, based on IndiaHacks Final Round 2017)C. Five Dimensional Points
- Codeforces Codeforces Round #432 (Div. 2 D ) Arpa and a list of numbers
- Codeforces Round #432 (Div. 2, based on IndiaHacks Final Round 2017)C. Five Dimensional Points
- Codeforces Codeforces Round #432 (Div. 2 D ) Arpa and a list of numbers
- Codeforces Round #432 (Div. 2, based on IndiaHacks Final Round 2017)C. Five Dimensional Points
- codeforces 851 #432 div2 C Five Dimensional Points
- Codeforces Codeforces Round #432 (Div. 2 D ) Arpa and a list of numbers
- Codeforces Codeforces Round #432 (Div. 2 D ) Arpa and a list of numbers
- Codeforces Codeforces Round #432 (Div. 2 D ) Arpa and a list of numbers
- Codeforces Round #432 (Div. 2, based on IndiaHacks Final Round 2017)C. Five Dimensional Points
- CrodeForces 854B--#433 Div2 B
- Codeforces Round #432 (Div. 2, based on IndiaHacks Final Round 2017)C. Five Dimensional Points
- Codeforces Round #432 (Div. 2, based on IndiaHacks Final Round 2017) C
- Codeforces Round #432 (Div. 2, based on IndiaHacks Final Round 2017)C. Five Dimensional Points
- Codeforces Round #432 (Div. 2) 总结
- Codeforces Codeforces Round #432 (Div. 2 D ) Arpa and a list of numbers
- Codeforces Round #432 (Div. 2, based on IndiaHacks Final Round 2017)C. Five Dimensional Points