ZOJ 3492Kagome Kagome
来源:互联网 发布:三娃被软件缠故事 编辑:程序博客网 时间:2024/03/29 13:07
#include <algorithm>#include <iostream>#include <cstring>#include <cstdlib>#include <cstdio>#include <string>#include <vector>#include <queue>#include <stack>#include <cmath>#include <ctime>#include <list>#include <set>#include <map>using namespace std;typedef long long ll;#define PB push_back#define UB upper_bound#define LB lower_bound#define MP make_pair#define pii pair<int,int>#define vi vector<int>#define vii vector<vi>#define mst(x,y) memset(x,y,sizeof(x))#define fr(x) freopen(x,"r",stdin)#define fw(x) freopen(x,"w",stdout)#define iin(x) scanf("%d",&x)#define complete_unique(a) a.erase(unique(a.begin(),a.end()),a.end())#define sp system("pause")#define INF 1e9#define MAXN 100005#define PI acos(-1.0)#define eps 1e-10const int MOD = 1e9 + 7;double a[500+20];int main(){int t;cin >> t;while(t--){int n;cin >> n;string h;cin >> h;int mark = 1;string s[111];for(int i = 1;i <= n;i++){cin >> s[i];if(s[i] == h)mark = i;}if(mark > n / 2)cout << s[mark - n / 2] << endl;elsecout << s[mark + n / 2] << endl;}return 0;}
0 0
- zoj 3492 Kagome Kagome
- zoj 3492 Kagome Kagome
- ZOJ 3492 Kagome Kagome
- zoj 3492 Kagome Kagome
- ZOJ 3492 Kagome Kagome
- ZOJ 3492Kagome Kagome
- ZOJ-3492 Kagome Kagome
- ZOJ 3492Kagome Kagome
- ZOJ 3492 F - Kagome Kagome
- ZOJ Problem Set - 3492||Kagome Kagome
- ZOJ 3488 Kagome Kagome
- Kagome Kagome
- F Kagome Kagome
- ZOJ3492 Kagome Kagome
- ZOJ3492-Kagome Kagome
- 2014ACM集训13级PK赛2-Kagome Kagome
- The 8th Zhejiang Provincial Collegiate Programming Contest-> Kagome Kagome
- The 8th Zhejiang Provincial Collegiate Programming Contest / F - Kagome Kagome
- 初学JS的感谢
- VS2013编译时无法查找或打开PDB文件
- 《计算机网络原理》之第2、3章
- HDFS常用的Java Api详解
- Ruby-类和对象
- ZOJ 3492Kagome Kagome
- 经典SQL语句大全
- 理解网络模型各层协议的分工及由来
- A1109. Group Photo (25)
- stl之适配器容器——stack, queue, priority_queue
- poj1190 生日蛋糕 dfs神剪枝
- C与Java的区别
- ZOJ 3490String Successor(模拟)
- ZOJ-3914-Semantic Version【模拟】