CSU暑期集訓day01_F_Misha and Changing Handles
題目: Misha hacked the Codeforces site. Then he decided to let all the users change their handles. A user can now change his handle any number of times. […]
-->
程式前沿 幫助程式設計師解決問題,增加專業技能,提升個人能力與未來世界競爭力。
題目: Misha hacked the Codeforces site. Then he decided to let all the users change their handles. A user can now change his handle any number of times. […]
題目: Now our hero finds the door to the BEelzebub feng5166. He opens the door and finds feng5166 is about to kill our pretty Princess. But now the BEel […]
題目: Give you three sequences of numbers A, B, C, then we give you a number X. Now you need to calculate if you can find the three numbers Ai, Bj, Ck, […]
題目: Now, here is a fuction: F(x) = 6 * x^7 8*x^6 7*x^3 5*x^2-y*x (0 <= x <=100) Can you find the minimum value when x is between 0 and 100. […]
題目: You are given two arrays of integers a and b. For each element of the second array bj you should find the number of elements in array athat are le […]
題目: Consider all the sequences with length (0 < N < 44), containing only the elements 0 and 1, and no two ones are adjacent (110 is not a valid […]
題目: A robot has been programmed to follow the instructions in its path. Instructions for the next direction the robot is to move are laid down in a gr […]
題目: 有一棵由N個結點構成的樹,每一條邊上都有其對應的權值。現在給定起點,求從該點出發的一條路徑(至少有一條邊)使得這條路徑上的權值之和最大,並輸出這個最大值。 Input 第一行一個正整數T,代表資料組數。每組資料第一行兩個正整數n(2<=n<=10^5),s(1<=s< […]
題目: 在N*N的方格棋盤放置了N個皇后,使得它們不相互攻擊(即任意2個皇后不允許處在同一排,同一列,也不允許處在與棋盤邊框成45角的斜線上。 你的任務是,對於給定的N,求出有多少種合法的放置方法。 Input 共有若干行,每行一個正整數N≤10,表示棋盤和皇后的數量;如果N=0,表示結束。 Ou […]
題目: 寫一個程式要求當輸入在整數範圍內的一個整數R後, 計算機便會檢查,在下式□處能否填上“+”、“-”或“×”號湊成相應等式。如能湊成,則印出所有這些等式的個數。注意,考慮符號的優先順序。 1□2□3□4□5□6□7□8□9=R Input 只有一行,就是一個整數R。 Output 只有一行,就 […]