摘要:
// 水题,数高为 2 就可以 既把2-n 点 都连到 1 点,#include#include#include#include #include#include#include#includeusing namespace std ;#define LL long long#define mod 1000000007int main(){ int i , k ,j ,n ; int T ,case1 = 0 ; int ans ; //freopen("in.txt","r",stdin) ; cin >> T ; while(T--) { 阅读全文
摘要:
Calculate RoadsTime Limit:5 Seconds Memory Limit:32768 KBLittle Vitta needs to go from home to school every day. On her way to school, there are n crossing and m roads in total. Because of lazy, she often gets up late in the morning. In order to get to school on time, she wishes that she can always 阅读全文
摘要:
488. Dales and HillsTime limit per test: 0.5 second(s)Memory limit: 262144 kilobytesinput: standardoutput: standardLet's consider a number sequence a1, ·s, aN. We call the continuous subsequence ai, ·s, aj, ·s, ak (1 ≤ i at+1 for any j ≤ t at+1 for any i ≤ t #include #include #inc 阅读全文
摘要:
486. "Bulls and Cows"Time limit per test: 0.25 second(s)Memory limit: 262144 kilobytesinput: standardoutput: standardYou probably know the game "bulls and cows". Just in case, we explain the rules. The first player picks a four-digit number with all digits distinct (leading zero 阅读全文
摘要:
499. Greatest Greatest Common DivisorTime limit per test: 0.5 second(s)Memory limit: 262144 kilobytesinput: standardoutput: standardAndrew has just made a breakthrough in sociology: he realized how to predict whether two persons will be good friends or not. It turns out that each person has an inner 阅读全文