原创 部分新的內容在Github更新

自建平臺包含內容 數據結構

原创 7-16 一元多項式求導 (20分)

問題描述 設計函數求一元多項式的導數。 輸入格式: 以指數遞降方式輸入多項式非零項係數和指數(絕對值均爲不超過1000的整數)。數字間以空格分隔。 輸出格式: 以與輸入相同的格式輸出導數多項式非零項的係數和指數。數字間以空格分隔,

原创 CCF 201809-2 買菜

解決思路: 定義一個時間數組,標記小H和小W裝卸的時間。在小H和小W裝卸的時候,t[]+1。 t[]需要定義爲全局變量,否則有可能出錯。。 C++11 代碼: #include<iostream> using namespace

原创 7-13 統計工齡 (20分)

問題描述 給定公司N名員工的工齡,要求按工齡增序輸出每個工齡段有多少員工。 輸入格式: 輸入首先給出正整數N(≤10​5​​),即員工總人數;隨後給出N個整數,即每個員工的工齡,範圍在[0, 50]。 輸出格式: 按工齡的遞增順序

原创 7-15 QQ帳戶的申請與登陸 (25分)

問題描述 實現QQ新帳戶申請和老帳戶登陸的簡化版功能。最大挑戰是:據說現在的QQ號碼已經有10位數了。 輸入格式: 輸入首先給出一個正整數N(≤10​5​​),隨後給出N行指令。每行指令的格式爲:“命令符(空格)QQ號碼(空格)密

原创 7-8 哈利·波特的考試 (25分)

問題描述 哈利·波特要考試了,他需要你的幫助。這門課學的是用魔咒將一種動物變成另一種動物的本事。例如將貓變成老鼠的魔咒是haha,將老鼠變成魚的魔咒是hehe等等。反方向變化的魔咒就是簡單地將原來的魔咒倒過來念,例如ahah可以將

原创 jupyterNotebook瀏覽器空白頁

問題描述 jupyter notebook(version 5.6.7) 解決問題 重新安裝其他版本jupyter notebook解決問題 pip uninstall notebook pip install notebook==5

原创 CCF 201803-1 跳一跳

C++11 代碼: #include<iostream> using namespace std; int main() { int n, flag = 1; int score = 0; while(1)

原创 CCF 201803-2 碰撞的小球

解題思路: 以時間爲基本循環單位,計算每秒小球的移動方向和結果。一定要先計算移動方向,再計算移動後的結果。 C++11 代碼: #include<iostream> using namespace std; // 檢測是否存在與當

原创 CCF201809-2 買菜

解決思路: 定義一個時間數組,標記小H和小W裝卸的時間。在小H和小W裝卸的時候,t[]+1。 t[]需要定義爲全局變量,否則有可能出錯。。 C++11 Code: #include<iostream> using namespace

原创 1017 Queueing at Bank (25 分)

Suppose a bank has K windows open for service. There is a yellow line in front of the windows which devides the waiti

原创 1014 Waiting in Line

Suppose a bank has N windows open for service. There is a yellow line in front of the windows which devides the waiti

原创 1013 Battle Over Cities (25 分)

It is vitally important to have all the cities connected by highways in a war. If a city is occupied by the enemy, al

原创 1015 Reversible Primes

A reversible prime in any number system is a prime whose “reverse” in that number system is also a prime. For example

原创 1012 The Best Rank (25 分)

To evaluate the performance of our first year CS majored students, we consider their grades of three courses only: C