2014年1月2日

uva 10161 - Ant on a Chessboard

摘要: 这题很简单,记得输出是x y不是(x,y),还wa了一次 1 #include 2 #include 3 using namespace std; 4 int main(){ 5 int n; 6 while(cin>>n){ 7 if(n==0) 8 break; 9 if(n==1){10 coutnth*nth)?(nth+1):nth;15 int flag=nth%2;16 int temp=n-(nth-1)*(nth-1)-nth;17 ... 阅读全文

posted @ 2014-01-02 21:46 云在心 阅读(111) 评论(0) 推荐(0)

uva 10785 - The Mad Numerologist

摘要: 这题就是计算元音和辅音的个数,放到两个容器里,再按字典序排序一开始漏写了个辅音,错了一次 1 #include 2 #include 3 #include 4 using namespace std; 5 int main(){ 6 int n; 7 cin>>n; 8 vector v_vowel; 9 vector v_consonants;10 char vowel[5]={'A','U','E','O','I'};11 char consonants[21]={'J',' 阅读全文

posted @ 2014-01-02 20:57 云在心 阅读(137) 评论(0) 推荐(0)

uva 755 - 487--3279

摘要: 算法是蛮简单的,不过超时了 1 #include 2 #include 3 #include 4 #include 5 #include 6 #include 7 using namespace std; 8 vector v_number; 9 vector v_num;10 int main(){11 int n;12 cin>>n;13 string l;14 getchar();15 char CmapN[100];16 CmapN['A']=CmapN['B']=CmapN['C']='2';17 CmapN 阅读全文

posted @ 2014-01-02 19:32 云在心 阅读(289) 评论(0) 推荐(0)

导航