swun 1429&hdu 4320 進位轉化(大牛&小牛代碼)

描述最近小胖對小數的進位轉換非常感興趣。並且研究了整整一周。小胖發現,有些進位的小數是無法完全轉化成另一進位的小數。比如 十進位的0.1 轉化成 三進位 。現在,小胖要來考驗你們了。

HDU 1428 漫步校園(記憶化搜尋)

Problem

next_permutation & prev_permutation & hdu 1027 Ignatius and the Princess II

兩個STL庫函數next_permutation &

The 11th Zhejiang University Programming Contest – G/ Gaussian Prime

返回目錄 題目大意:在複平面上指定一個範圍,求這個範圍裡的高斯素數的密度(即 高斯素數個數/總座標數, 化為真分數) 。 題目類型:基礎類比題 / 數學背景題 題目分析: A Gaussian integer a + bi is a Gaussian prime if and only if either: ①One of a, b is zero and the other is a prime number of the form 4n + 3 (with n a nonnegative

URAL 1654 – Cipher Message

 題目地址: http://acm.timus.ru/problem.aspx?space=1&num=1654 經典題。 對棧空間的操作。 很久前做的,今天剛好看到,就放上來了。 #include<iostream>#include<cstdio>using namespace std;char str[210000],stk[210000];int main(){int i,tp;gets(str);for(i=0,tp=0;str[i];i++)if(tp=

hdu 3794 Magic Coupon

好久沒寫blog了,來一道水題吧,分組貪心#include <iostream>#include <algorithm>#include <cstdio>using namespace std;typedef long long ll;ll p[1000010];ll c[1000010];int main() {int np, nc;ll ans = 0;while(scanf("%d", &nc) != EOF && nc >

Gimbal Lock()

原文連結:http://www.cnblogs.com/soroman/archive/2006/10/12/526163.html在http://blog.donews.com/wanderpoet/archive/2005/07/04/453608.aspx看到一篇關於Gimbal Lock的E文,解釋得挺清楚的,翻譯如下:Gimbal LockWhat's Gimbal Lock?Gimbal lock is the phenomenon of two rotational axis

HDU 4360 – As long as Binbin loves Sangsang

 題目地址: http://acm.hdu.edu.cn/showproblem.php?pid=4360 2012 年多校 第7場, 1001 。 方法: 優先隊列 + SPFA  基礎題。。。。   Trick 是,最終結果會爆int (有的資料需要重複兜圈)。。。 #include<iostream>#include<cstdio>#include<algorithm>#include<queue>#include<cmath>#

什麼是ActiveRecord

我在 前一篇文章中提 到ActiveRecord, 有人在回複中問什麼是ActiveRecord. 說實話,從去年開始用SubSonic, 我就一直有點困惑, 什麼是ActiveRecord, 什麼不是ActiveRecord, 以及應該怎麼樣使用它才對. 把我的一些想法寫下來, 希望能和大家交流. 歡迎拍磚.ActiveRecord是什麼:1. 每一個資料庫表對應建立一個類.類的每一個對象執行個體對應於資料庫中表的一行記錄; 通常表的每個欄位在類中都有相應的Field;2.

FTP串連控制命令格式

comes from: http://club.topsage.com/thread-166971-1-1.html命令以NVT ASCII串的格式被傳輸。每個命令以三個或四個大寫的NVT ASCII字元開始,後面帶有選項參數和一個CR/LF對來標識命令結束應答由三個NVT

BNU 12886 – gabrielus

 題目地址 : http://acm.bnu.edu.cn/bnuoj/problem_show.php?pid=12886    由於不擅長DP。對於這題。   比賽的時候根本沒去想。直接pass掉。。。 賽後才發現這題不難。              很容易就能推算出不重複的擺法總數是  n! / (n-m)! *((n-m)^(p-m))             

ll(k)

Thedefinition in textbook:Thefirst letter, L for left to right or R for right to left, denotes the order inwhich to scan the source text.Thesecond letter denotes the derivation of the constructed parse tree. At eachstep in a left (L) derivation of a

Sort 排序的幾種用法

 PS: 之前給新生們寫的。在這裡也發一下吧。 ==================================================================================== 【整數數組】直接從小到大排序  #include<algorithm>#include<cstdio>using namespace std;//輸入: // 先輸入數組長度 n// 然後再輸入n個整數//輸出// 從小到大順序輸出數組

PKU 2481 Cows & PKU 2352 Stars & HDU 1541 Stars

題目連結地址:PKU 2481:http://poj.org/problem?id=2481PKU 2352:http://poj.org/problem?id=2352HDU 1541:http://acm.hdu.edu.cn/showproblem.php?pid=1541其中PKU 2352和HDU 1541是一樣的。 = =、、買一送一。。 *************************************************************************

SWUN 1428 – 行星球體

行星連珠 時間限制(普通/Java) : 8000 MS/ 16000 MS          運行記憶體限制 : 65536 KByte總提交 : 57            測試通過 : 5 描述

hdu 1238 & POJ 1226 Substrings

 hdu題目連結:http://acm.hdu.edu.cn/showproblem.php?pid=1238POJ題目連結:http://poj.org/problem?id=1226Problem DescriptionYou are given a number of case-sensitive strings of alphabetic characters, find the largest string X, such that either X, or its inverse

HDU 4452 Running Rabbits 【類比】

題目連結:http://acm.hdu.edu.cn/showproblem.php?pid=4452所說這題把我隊友坑了好幾天。思維有洞呀,我沒有想到什麼bug去幫他解決。最後也是根據題意直接類比過的。#include<cstdio>#include<algorithm>using namespace std;int Map[25][25];struct Rabbit{int x,y;int s,t;char

HDU 1880 魔咒詞典 (二分搜尋)

Problem Description哈利傳輸速率在魔法學校的必修課之一就是學習魔咒。據說魔法世界有100000種不同的魔咒,哈利很難全部記住,但是為了對抗強敵,他必須在危急時刻能夠調用任何一個需要的魔咒,所以他需要你的協助。給你一部魔咒詞典。當哈利聽到一個魔咒時,你的程式必須告訴他那個魔咒的功能;當哈利需要某個功能但不知道該用什麼魔咒時,你的程式要替他找到相應的魔咒。如果他要的魔咒不在詞典中,就輸出“what?”Input首先列出詞典中不超過100000條不同的魔咒詞條,每條格式為:[魔咒]

POJ 3225 – Help with Intervals

 題目地址 : http://poj.org/problem?id=3225 最開始是對左右括弧、區間覆蓋等狀態,都加到線段樹裡,處理麻煩至極。 寫了200+行代碼,實在不行了,果斷放棄。。。 跑去看了HH大牛的Blog,思路果然新穎,於是套用之~~~~~                                   

POJ 1470/PKU 1470 Closest Common Ancestors __LCA

題目連結:http://poj.org/problem?id=1470題目大意:開始讓你構造一棵樹,然後有Q對u,v,最後讓你求出每對u,v的最近祖先的編號和次數。輸入一個Q,然後有Q組(u,v)每組中間還有空格,tab等。但,稍稍想一下就能發現,Q組uv一共有Q*2個字串,所以我們講稿Q*2組str就可以了scanf("%s",str),然後處理每組str求得u,v/*//*lca離線演算法/*/#include<cstdio>#include<cstring>#inc

總頁數: 61357 1 .... 19674 19675 19676 19677 19678 .... 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.