国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 學院 > 開發(fā)設計 > 正文

1100. Mars Numbers (20)

2019-11-11 04:22:31
字體:
供稿:網(wǎng)友

題目:https://www.patest.cn/contests/pat-a-PRactise/1100

代碼:

#include<cstdio>  #include<cstring>  #include<cstdlib> #include<cmath>#include<map>#include<string>#include<iostream>#include<algorithm>  using namespace std; string a[13]={"tret","jan", "feb", "mar", "apr", "may", "jun", "jly", "aug", "sep", "oct", "nov", "dec" };string b[13]={"tret", "tam", "hel", "maa", "huh", "tou", "kes", "hei", "elo", "syy", "lok", "mer", "jou"};string f[170];int main()  {   	map<string,int> mp;	for(int i=0;i<13;i++){	  mp[a[i]]=i;	  mp[b[i]]=i*13;	  f[i]=a[i];	  f[i*13]=b[i];	}	for(int i=1;i<13;i++){		for(int j=1;j<13;j++){		  string temp=b[i]+" "+a[j];		  mp[temp]=i*13+j;		  f[i*13+j]=temp;		}	}	int n;	scanf("%d%*c",&n);	while(n--){	   string str;	   getline(cin,str);	   if(str[0]>='0'&&str[0]<='9'){	      int num=0;		  for(int i=0;i<str.length();i++){		     num=num*10+(str[i]-'0');		  }		  cout<<f[num]<<endl;	   }else{	      cout<<mp[str]<<endl;	   }	}    system("pause");  }                  


發(fā)表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發(fā)表
主站蜘蛛池模板: 得荣县| 凤庆县| 尼勒克县| 灵武市| 石河子市| 宣恩县| 和龙市| 阿拉善左旗| 彭水| 台北县| 互助| 那坡县| 南江县| 浦东新区| 泗洪县| 穆棱市| 渭源县| 贺兰县| 泗阳县| 瓮安县| 无棣县| 治多县| 山西省| 潜山县| 错那县| 汉川市| 临沧市| 钟山县| 淮滨县| 江永县| 遂平县| 溧水县| 行唐县| 县级市| 汝州市| 河津市| 大同县| 海城市| 青阳县| 潼南县| 景谷|