原创 【hpu oj 1401 多少個元素 set】

點擊打開鏈接 1401: 多少個元素 [vector、set] 時間限制: 2 Sec 內存限制: 128 MB提交: 106 解決: 29 統計 題目描述 給定Q次操作: 每次操作給定一個正整數x —— 表示向集合A和集

原创 【hdu 2063 過山車 二分圖】

點擊打開鏈接 過山車 Time Limit: 1000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others) Total Submission(s):

原创 【hpu oj 1163 大數相加】

點擊打開鏈接 1163: 大數A + B [字符串] 時間限制: 1 Sec 內存限制: 128 MB提交: 138 解決: 28 統計 題目描述 給定兩個整數AA和BB,讓你求出A+BA+B的值。 輸入 第一行輸入一

原创 河南省多校連萌(五)【zzuli 2183 就是簽到題XD】

點擊打開鏈接 2183: 就是簽到題XD Time Limit: 1 Sec  Memory Limit: 64 MBSubmit: 525  Solved: 79SubmitStatusWeb Board Description

原创 【hpu oj 1011 QAQ的序列組合 [組合數學]】

點擊打開鏈接 AC代碼:/*用到了快速冪,逆元,。。。需要預處理一下,不然會超時?!*/ #include<cstdio> #define mod 1000000007 typedef long long LL; #define

原创 【zoj1004 vector stack STL】anagrams by stack

點擊打開鏈接 Anagrams by Stack Time Limit: 2 Seconds      Memory Limit: 65536 KB How can anagrams result from sequence

原创 【hpu oj 1018 985的最大和難題 [思維]】

點擊打開鏈接 /* np 正數個數 nm 負數個數 Min 記錄絕對值最小的數字 s 記錄所有數字的和 */ #include<cstdio> int main() { int n,t,a,np,nm,Min,s,m; scan

原创 AtCoder - 2271-Lining Up

點擊打開鏈接C - Lining UpTime limit : 2sec / Memory limit : 256MBScore : 300 pointsProblem StatementThere are N people, conve

原创 【第二週周練 H 】

A piece of paper contains an array of n integers a1, a2, ..., an. Your task is to find a number that occurs the maxim

原创 【zoj1094-Matrix Chain Multiplication】

點擊打開鏈接 Matrix Chain Multiplication Time Limit: 2 Seconds      Memory Limit: 65536 KB Matrix multiplication problem

原创 【hdu 2709 Sumsets【遞推】】

Farmer John commanded his cows to search for different sets of numbers that sum to a given number. The cows use only

原创 【hpu oj 1014: 985的數學難題 [思維] 】

點擊打開鏈接 題解: /* x^y+x&y==x|y 考慮二進制的每一位對結果的影響 比如1101、1001、1010進行上述運算 則可發現: 從右到左每一位上有1的個數記爲 cnt[0]~cnt[3]分別爲2、1、1、3 因爲

原创 [codeforce 347 C. Alice and Bob]

點擊打開鏈接C. Alice and Bobtime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard o

原创 【hpu oj 1022: 985的因子對難題 [數學]】

點擊打開鏈接 AC代碼: #include<stdio.h> #include<string.h> #include<math.h> #define N 1000000+19 int num[N],fac[N];

原创 【51 nod 1264 線段相交 】

點擊打開鏈接 給出平面上兩條線段的兩個端點,判斷這兩條線段是否相交(有一個公共點或有部分重合認爲相交)。 如果相交,輸出"Yes",否則輸出"No"。 Input 第1行:一個數T,表示輸入的測試數量(1 <= T <=