水題,模擬題,但仍需細心,多考慮
//http://codeforces.com/contest/1065/problem/B
#include <iostream> #include <cmath> using namespace std; int main() { long long n,m,num,s,a,b,c,minIS,maxIS; cin>>n>>m; if(n<2*m) { minIS=0; } else { minIS=n-2*m; } if(m==2) { maxIS=n-3; } else if(m==0) { maxIS=n; } else { maxIS=n-(1+(sqrt(1+8*m)))/2; } cout<<minIS<<" "<<maxIS<<endl; return 0; }
水題,模擬題,但仍需細心,多考慮
相關推薦
水題,模擬題,但仍需細心,多考慮
== stream clas axis nbsp space sin clu 水題 //http://codeforces.com/contest/1065/problem/B#include <iostream> #include <cmath>
Crashing Robots(水題,模擬)
nes 純粹 rst finall gpo without diameter als tar 1020: Crashing Robots 時間限制(普通/Java):1000MS/10000MS 內存限制:65536KByte 總提交: 207
【HihoCoder - 1880】地鐵環線 (字首和,水題,模擬)
題幹: H市有一環線地鐵,一共包含N站,編號1~N。正向行駛的地鐵會按1 -> 2 -> 3 -> ... -> N -> 1的方向行駛,反向會按1 -> N -> N-1 -> ... -> 3 -> 2 -> 1的方向行駛
*【CodeForces - 1088 ABC】套題比賽,A水題B模擬C構造D互動
A. Input The only line contains the integer xx (1≤x≤100)(1≤x≤100). Output You should output two integers aa and
【UVA - 11292】Dragon of Loowater (貪心,水題,模擬,twopointer雙指標)
題幹: 題目大意: n條惡龍,m個勇士,用勇士來殺惡龍。一個勇士只能殺一個惡龍。而且勇士只能殺直徑不超過自己能力值的惡龍。每個勇士需要支付能力值一樣的金幣。問殺掉所有惡龍需要花費的最少金幣。 解題報告: twopointer排序後從頭到尾掃一遍就行了。
20161108的考試】腦洞題,水題,模擬
…………我……今天……有毒2333 今天應該是完完全全的noip難度【應該還簡單一點? ……大概是真的沒有oier應有的直覺QAQ T2……好吧我是題看錯了看成了神題感覺完全無法做2333 ……要說今天崩在哪兒了…………大概是哪兒都崩了【 T2應該以前見過,可能是初中來蹭
1554: SG Value (巧妙的模擬題,也屬於思維題)
而是 剔除 define bsp ear mit imu 不能 最小數 1554: SG Value Submit Page Summary Time Limit: 5 Sec Memory Limit: 256 Mb Submitt
stl的map2------[NWPU][2018寒假作業][通用版]二、stl ,模擬,貪心等 [Cloned]B題
Ignatius is so lucky that he met a Martian yesterday. But he didn’t know the language the Martians use. The Martian gives him a
出現次數最多的數(java),ccf考試模擬題
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in);
Doing Homework Again貪心------[NWPU][2018寒假作業][通用版]二、stl ,模擬,貪心等 [Cloned]P題
Ignatius has just come back school from the 30th ACM/ICPC. Now he has a lot of homework to do. Every teacher gives him a deadlin
PTA PAT Judge 【模擬題,未完待續】
The ranklist of PAT is generated from the status list, which shows the scores of the submittions. This time you are supposed to gen
2018年PMP預測模擬題來啦,讓你快速提分!
準備PMP的小夥伴,福利來啦,用微信掃一掃,模擬題免費做咧!!! 這次玩出新花樣,機會只有一次,錯過就沒有了哦! 2018PMP考前衝刺模擬題來啦!!!免費 免費 免費 重要的事要說三遍,哈哈哈。快來快來,機會只有一次,錯過就沒有啦!!! 點此進入學習交流區
bzoj2287【POJ Challenge】消失之物(dp+補集轉化,好題)
std gree scanf online discus 技術 bsp lin geo 2287: 【POJ Challenge】消失之物 Time Limit: 10 Sec Memory Limit: 128 MBSubmit: 657 Solved: 382
2017Summmer_上海金馬五校 F題,G題,I題,K題
sum 組隊 時序 而且 sizeof bit 屬性排序 print 浪費 以下題目均自己搜 F題 A序列 一開始真的沒懂題目什麽意思,還以為是要連續的子串,結果發現時序列,簡直智障,知道題意之後,好久沒搞LIS,有點忘了,復習一波以後,直接雙向LIS,處理處兩個數組L和
軟件工程導論課後習題2,3題
數據流程圖及系統可行性2.為方便儲戶,某銀行擬開發計算機儲蓄系統。儲戶填寫的存款單或取款單由業務員鍵入系統,如果是存款,系統記錄存款人姓名、住址、存款類型、存款日期、利率等信息,並印出存款單給儲戶;如果是取款,系統計算利息並印出利息清單給儲戶。請寫出問題定義並分析此系統的可行性。我畫的數據流程圖:圖畫得比較差
hiho 1604 - 股票價格,思維題
namespace 價格 algorithm nbsp set 關註 i++ ref -- 題目鏈接 題目大意 小Hi最近在關註股票,為了計算股票可能的盈利,他獲取了一只股票最近N天的價格A1~AN。 在小Hi的策略中,每天可以在下列三種操作中選取一種: 1.什麽也不做;
【編程題】不引入第三個變量,而交換兩個變量的值
其中 blog b+ 沒有 來源 article else 位移 text 不引入第三個變量,而交換兩個變量的值 方法一:算術運算 1 int a,b; 2 a=10;b=12; 3 a=b-a; //a=2;b=12 4 b=b-a; //a=2;b=10
Mp3stego使用,附題,實驗吧misc-Canon
gpo nco city open ext ase use dac 解壓 mp3stego使用:encode -E data.txt -P pass sound.wav sound.mp3 encode -E (裏面放要加密的txt信息) -P(密碼) (需要將
全網唯一華為無線HCNA真題解析版題庫,來自乾頤堂安德
華為NA題庫講解 華為認證乾頤堂本部分內容來自互聯網。通過它,您可以同哦過華為認證HCNA-WLAN無線(H12-311)考試。後續視頻講解會上傳至51CTO學院,其他學員可以通過乾頤堂官方咨詢或者群645866695咨詢解析版是軍哥一字一字碼出來的,轉載請註明出處 QUESTION 1無線網絡的初步應用開始
2016女生賽 HDU 5710 Digit-Sum(數學,思維題)
accep ger sizeof memory fin left total src view Digit-Sum Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65535/32768 K (Java/Oth