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

首頁 > 學院 > 開發設計 > 正文

1100. Mars Numbers (20)

2019-11-11 04:23:47
字體:
來源:轉載
供稿:網友

題目: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");  }                  


發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 绥棱县| 湾仔区| 正镶白旗| 富锦市| 西和县| 庆安县| 隆昌县| 泊头市| 中超| 开封县| 临泽县| 乡宁县| 南乐县| 浮山县| 伊宁县| 洛浦县| 察雅县| 资源县| 济阳县| 曲沃县| 惠州市| 金华市| 廊坊市| 平武县| 沭阳县| 名山县| 繁峙县| 文化| 湘阴县| 光泽县| 洪江市| 镇雄县| 且末县| 昔阳县| 宁国市| 双辽市| 衡阳县| 莫力| 定州市| 枣阳市| 大厂|