原创 C++ 模版template

C++ Template 模版類的繼承和組合提供了對象代碼複用的方法 Inheritance and composition provide a way to reuse object code. The template fe

原创 codeforces 631c Report

C. Report time limit per test2 seconds memory limit per test256 megabytes inputstandard input outputstandard ou

原创 Gym 100231B Intervals

http://codeforces.com/gym/100231/attachments/download/1868/20132014-ct-s01e03-codeforces-trainings-season-1-episode

原创 哈希表(hash)

C++ hash STL c++ hash_table 分析 簡介 由索引到值的數據結構(data structure that maps keys to values) 直接映射,需要很大的空間。空間的利用率不高,爲了將某

原创 UVA 787 Maximum Sub-sequence Product

Bob needs money, and since he knows you are here, he decided to gamble intelligently. The game is rather simple: ea

原创 UVA 10827 Maximum sum on a torus

題目大意求最大子矩陣的和的變形。 最大子矩陣的求解由最大子序列和變形而來。 // // Created by 王若璇 on 16/2/5. // #include <iostream> #include <algorithm>

原创 Effective C++ 學習筆記 01 const關鍵字

Effective c++ 01 習慣於c++ 1. c++是一個語言聯邦 多重範型編程語言(multiparadigm programming language) 支持過程 (procedural) 支持面向對象 (objec

原创 分期付款原理

 在分期付款中還要瞭解分期付款的有關計算。   1.等額償還方式   若年初向銀行貸款D(元),準備分n期償還,每期均償還P(元),期利率為R。   貸款一期後,本金和應為D(1+R)。   第一次還款後剩餘款項為b1 = D(1

原创 STL源碼學習_1 簡介概述,仿函數

STL概述與介紹 1.STL c++標準模版庫 STL庫包含了c++的基本算法與數據結構的框架,設計精巧,突出了範型編程的特點 2.STL 六大組件和運用 容器(containers) 算法(algorithms) 迭代器(it

原创 計算幾何相關知識和算法概論

 怒火之袍       計算幾何算法概覽 一、引言   計算機的出現使得很多原本十分繁瑣的工作得以大幅度簡化,但是也有一些在人們直觀看來很容易的問題卻需要拿出一套並不簡單的通用解決方案,比如幾何問題。作爲

原创 POJ 2653 Pick_up_stick(計算幾何)

 B - Pick-up sticks//問題描述 Crawling in process... Crawling failed Time Limit:3000MS     Memory Limit:65536KB     64bit

原创 組合數取模

      組合數取模 分類: 數論 2012-10-03 12:41 4816人閱讀 評論(6) 收藏 舉報 組合數取模在ACM競賽中是一個很重要的問題,很多選手因爲數據太大而束手無策,今天就來詳細講解它。   組合數取

原创 Effective C++ 學習筆記 00 概述

Effective C++ 0 導讀 術語(Terminology) 1.聲明式(declaration):告訴編譯器某個東西的名稱和類型。忽略其中的細節。 extern int x; // object 聲明式 std::siz

原创 求解模線性方程

求解模線性方程組 求解線性不定方程組 ax + by = c 先求出一組解, 然後考慮如何表示通解, 設d = gcd(a, b), 假設c不是d的倍數, 則左邊是d的倍數而右邊不是, 則方程無解, 所以方程有解當且僅當d | c

原创 codeforces 631B Print Check

B. Print Check time limit per test1 second memory limit per test256 megabytes inputstandard input outputstandar