B. Painting Eggs

time limit per test5 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputThe Bitlandians are quite weird people. They have very peculiar customs.As is customary, Uncle J. wants to have n eggs painted for Bitruz (an

2089 鍵盤殺手= =

描述 lcl的鍵盤被折騰得快壞了,癥狀就是每當按下一個鍵,反應都很古怪,即使馬上鬆開了會一連輸入很多個重複的字元。現在她得到了很多這樣輸錯了的字串,你能幫她統計一下字串裡的每段重複字元共重複了多少遍麼⊙﹏⊙b當字串裡出現了一段連續重複子串,假設同一字母X重複了k遍,則輸出kX;注意,重複次數為1時,直接輸出字元X.輸入 第一行包括一個整數N,表示共包含N組資料。第2~N+1行:每行包含一個輸錯了的字串。字串長度n小於100.輸出 對於每組資料,佔一行,輸出替換後的字串。範例輸入

A. Dress’em in Vests!

time limit per test3 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputThe Two-dimensional kingdom is going through hard times... This morning the Three-Dimensional kingdom declared war on the Two-dimensional one. This

B. Little Elephant and Numbers

time limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputThe Little Elephant loves numbers.He has a positive integer x. The Little Elephant wants to find the number of positive integers d, such that d is

2090 八國王 or not~

描述 書後的習題裡有一道八皇后問題,lcl剛接觸的時候覺得太傷腦筋了,於是她編出了一道八國王問題,決定先解決這個,但她又發現這個也太困難了,於是決定從第一步開始,先判斷某一個給定的n*n矩陣是否滿足n國王的條件。你也來試試看吧~注意:滿足n國王問題的條件是,兩個國王不能在同一行,同一列,但是可以出現在同一條對角線上;矩陣中有且只能有n個國王。(嘿嘿~可能國王會比較神經大條一點?或者比較寬容一點……)這裡用數字1來代表該位置有國王,0代表沒有。輸入

A. Shooshuns and Sequence

time limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputOne day shooshuns found a sequence of n integers, written on a blackboard. The shooshuns can perform one operation with it, the operation consists

關於SQL注入檢測寫一點東西

 背景,為什麼這麼做其實我一直搞不清楚CSDN論壇上發的文章最近在幫老師做一個項目,整個系統是進行資料庫訪問審計用的。具體說系統用於伺服器和資料庫之間,對所有從伺服器提交的查詢資料庫的請求進行審計。可以添加規則和建立白名單這些。現在要實現的一個功能是通過伺服器提交的SQL語句判斷是否是注入,如果是注入語句那麼需要檢測出來這樣才能保證資料庫的安全性。目前還不知道怎麼去做,SQL注入千變萬化,窮舉明顯不可能,而且系統效率還要很高實現每秒幾萬條資料的檢測,這更難了。和一個學長討論過,他認為SQL注入檢

A. Insomnia cure

time limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard output«One dragon. Two dragon. Three dragon», — the princess was counting. She had trouble falling asleep, and she got bored of counting lambs when she

A. Team

time limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputOne day three best friends Petya, Vasya and Tonya decided to form a team and take part in programming contests. Participants are usually offered

A. Roma and Lucky Numbers

time limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputRoma (a popular Russian name that means 'Roman') loves the Little Lvov Elephant's lucky numbers.Let us remind you that lucky numbers are positive

B. Airport

time limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputLolek and Bolek are about to travel abroad by plane. The local airport has a special "Choose Your Plane" offer. The offer's conditions are as

2130 奧數什麼的

描述 lcl在翻小學奧數時發現了這樣一道題: 對於通項公式為An=1/(1*2*3.....*n)的數列,求第n項An的值。已知0<n<=10,現在請你運用學到的遞迴的知識,來解答這道題吧^^ 提示: 1.遞迴公式為 當n>=2時,An=An-1/n; 當n==1時,A1=1; 2.禁止直接使用數學方法計算輸出。必須使用遞迴。輸入 包含多組資料。對於每組資料,包含一個整數n,表示求數列中第n項。 0<n<=10.輸出 對於每組資料,輸出一行,為一個實數An.

A. Adding Digits

time limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputVasya has got two number: a and b. However, Vasya finds number a too short. So he decided to repeat the operation of lengthening

A. Petya and Strings

time limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputLittle Petya loves presents. His mum bought him two strings of the same size for his birthday. The strings consist of uppercase and lowercase Latin

A. Phone Code

time limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputPolycarpus has n friends in Tarasov city. Polycarpus knows phone numbers of all his friends: they are strings s1, s2, ..., sn. All these strings

2131 夢中的高數

描述 高數對於lcl來說是一個永恒的悲劇,有一天她夢見自己回到了一年之前還要考高數的時候…… 但好在夢中的題目是這樣的: 計算: 1.求a與b的和 2.求a與b的積 3.求a除b的餘數 4.求a整除b的商正在lcl偷著樂的時候,夢醒了,你能幫她完成這份夢中的高數題嗎?輸入 包括多組資料。對於每組資料,包括兩個正整數,a和b。(0<=a<=10000,0<b<=10000)資料保證計算過程合法。輸出

2118 計算幾何初步

描述 給出平面上的n(3<=n<=100)個點的座標,(x1,y1),(x2,y2),...,(xn,yn),請編寫程式判斷這n個點,是否都在同一條直線上。所有座標的取值範圍[-100,100]。輸入 每行分別有2n+1個整數,第一個表示:n,後面連續2n個分別表示:x1,y1,x2,y2,...xn,yn。有多組測試資料。輸出 如果輸入中給出的n個點共線,則輸出"YES",否則輸出"NO",每行一個輸出。範例輸入 3 1 1 2 2 -1 -1 4 0 1 0 0 -5 5 7 1

1956 計算罰時

描述 在編程啦比賽的記分板上,有一列叫做“罰時”,這個奇怪的數字究竟是怎麼算出來的呢?留意的同學可能知道,記分板的“查看記分詳單”頁面,有這麼一段注釋:註:(X/Y) —— X表示該題提交次數,Y表示首次通過該題的時間,單位為分鐘。對通過的題計算罰時,計算方式為 (X-1)*20 + Y。未通過的題不計算罰時。 具體說來,其中X表示該題首次正確提交之前(包括正確那次)該題的提交次數,比如某次上機中,豆豆同學的提交記錄如下(比賽開始時間為14:30):· B Accepted (AC) 14:52

2120 位元運算初步

描述 瞭解有位元運算這個東西並且對其有最基本的瞭解是有意義的,所以有了這道題。輸入兩個正整數a和b(均在int範圍內),以及一個字串x如果x是"and" 輸出 a和b取"與"運算之後得到的int十進位整數;如果x是"or" 輸出 a和b取"或"運算之後的int十進位整數;如果x是"xor" 輸出 a和b取"異或"運算之後的int十進位整數。輸入 輸出 範例輸入 1 2 and3 4 or5211314 999 xor5211989 999 xor範例輸出

1968 計算罰時(easy)

描述 在編程啦比賽的記分板上,有一列叫做“罰時”,這個奇怪的數字究竟是怎麼算出來的呢?留意的同學可能知道,記分板的“查看記分詳單”頁面,有這麼一段注釋:註:(X/Y) —— X表示該題提交次數,Y表示首次通過該題的時間,單位為分鐘。對通過的題計算罰時,計算方式為 (X-1)*20 + Y。未通過的題不計算罰時。 現在,給出每道已通過題目的X、Y值,你能算出總罰時是多少嗎?輸入

總頁數: 61357 1 .... 19711 19712 19713 19714 19715 .... 61357 Go to: 前往

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.