//摺紙遊戲有趣!就是那個對稱啦!
#include
#include
using namespace std;
string s[1000];
int m;
bool mark1()
}return 1;
}void mark2()
} cout<<"yes\n" ;
return;
}int main()
}if(mark1())
mark2();
}}//互質個數,
#include
#include
#include
#include
using namespace std;
int abc(unsigned int a,unsigned int b)
最大公約數,也就是判斷互質
int main()
cout< }
}// no 62 x不是62
#include
#include
using namespace std;
int is62(int x)
return false; 注意這個方法,先除10,乙個個個判斷,先判斷2在6
int main()
不要62的自己打法
#include
#include
#include
#include
#include
#include
using namespace std;
char a[11];
int main()
} cout<}
//誰是主角
#include
#include
#include
using namespace std;
typedef map::iterator it;
int main()
// 2013acm挑戰組競賽 f-打字 c++版難度c
#include
#include
using namespace std;
char* s="``1234567890-=qqwertyuiopaasdfghjkl;'\\zzxcvbnm,./";
int main();
for(int i=1; s[i]; i++)
a[s[i]]=s[i-1]; 這個指標厲害哦!
for(char c; ) // 連空格回車符也讀,我感覺就是逐個讀char型別的東西,注意的是判斷
cout<<(a[c]==0 ? c : a[c]);
關於sort的一點點東西
#include
#include
usingnamespacestd;
intmain()
} sets;
......
set::iterator it;
(2)如果元素是結構體,可以直接將比較函式寫在結構體內。
例:struct info
{ string name;
float score;
//過載「<」操作符,自定義排序規則
bool operator < (const info &a) const
{//按score從大到小排列
return s;
......
set::iterator it;
C語言期末複習
第1章程式設計及c語言概述 一 單選題 1 乙個演算法應該具有 確定性 等5個特性,下面對另外4個特性的描述中錯誤的是 a 有零個或多個輸入 b 有零個或多個輸出 c 有窮性d 可行性 2 以下敘述中正確的是 a c語言的源程式不必通過編譯就可以直接執行 b c語言中的每條可執行語句最終都將被轉換成...
C語言期末複習
所有單選題 1 c語言中下列敘述正確的是 a 不能使用do while語句構成的迴圈 b do while語句構成的迴圈,必須用break語句才能退出 c do while語句構成的迴圈,當while語句中的表示式值為非零時結束迴圈 d do while語句構成的迴圈,當while語句中的表示式值為...
期末試卷C
八年級數學下冊期末檢測試卷c 一 選擇題 1.如果,那麼下列各式中正確的是 a b c d 2.下列各式 其中分式共有 個。a 2b 3c 4d 5 3.如圖,在 中,點是斜邊的中點,且,則 a.bcd.4.下列多項式中不能用公式分解的是 a.a2 a b a2 b2 2ab c d 5.若把不等式...