原创 華爲2016校園招聘上機筆試題-最高分是多少

#include<bits/stdc++.h> using namespace std; int FindMax(vector<int>& vec,int A,int B) { int MaxValue=vec[A-1];

原创 XTU 1236 Fraction

純轉載,轉載地址:https://www.cnblogs.com/pshw/p/5572749.htmlFractionAccepted : 168 Submit : 1061Time Limit : 1000 MS Memory Lim

原创 華爲2016校園招聘上機筆試題-簡單錯誤記錄

#include<bits/stdc++.h> using namespace std; class ErrorRecord { public: string name; int lineNum

原创 樹狀數組之模板

#include<cstdio> using namespace std; /*樹狀數組複雜度較低,而且代碼量較少,除了適用範圍較窄,其他方面都讓人感覺非常舒服。*/ const int Kmax=1e6+20; int num[Kmax

原创 線段樹之區間賦值-帕吉的肉鉤

#include<iostream>using namespace std;/*調試了好久才找出問題所在*/const int MAX_N=100010;struct node{ int l,r; int detal;

原创 桂電免出校器實現自動寬帶撥號,免除你每天撥號的煩惱——路由器以斐訊K2爲例

  注:本文方法已失效。因校園網進行升級改造正式啓用了新認證系統,停用了原有PPPoE撥號(IPClient客戶端)認證系統。     衆所周知,在桂電,你在宿舍想用寬帶通常要使用出校器進行撥號。這導致了每天上網前,你都不得不將你的電腦電

原创 Django刪除MySQL數據庫表格後如何重建

(1)刪除數據庫表 (2)數據庫裏有一個記錄生成表格記錄的django_makemigrations表 刪除創建表的記錄,app字段值爲對應appname,例如myapp (3)刪除項目裏migrations文件夾下除_init_.py的

原创 線段樹之快速構樹

#include<iostream> #include<algorithm> using namespace std; const int Kmax=200000+10; struct node{ int l,r,snv;//節點

原创 線段樹之公告板

#include <cstdio> #include <algorithm> using namespace std; /*大佬是先放公告,再比較高度。我的想法是先比較高度,再看能不能放。代碼是大佬的*/ const int kMax

原创 線段樹之區間修改(區間整數操作)

#include<iostream> #include<cstdio> using namespace std; /*經過多次測試,scanf怎樣都比cin快。以後儘量都使用scanf&printf * * * */ typed

原创 線段樹之區間修改模板

#include <iostream> using namespace std; const int MAX_N=10010; int s[4*MAX_N],col[4*MAX_N]; void up(int p){ s[p]=s

原创 樹狀數組之較複雜的區間統計(校長的問題)

#include <cstdio> #include <vector> #include <algorithm> using namespace std; /*代碼是大佬的。*/ const int kMax = 1e5 + 10

原创 線段樹區間修改之黑白石頭(較複雜,考驗一點邏輯思維能力)

#include <cstdio> #include <algorithm> using namespace std; /*務必分清l,r 和tree[p].l,tree[p].r。代碼是大佬的。*/ const int kMax =

原创 (模板)米勒羅賓素數測試(大數素數判斷)

轉載地址:https://blog.csdn.net/u013654696/article/details/40056179[cpp] view plain copy// 18位素數:154590409516822759  // 19位素

原创 E. Copy and Submit II (推出遞推公式)

#include<cstdio> #include<algorithm> #include<vector> using namespace std;/*剛開始被嚇到了,其實很簡單,將遞歸呈現在紙上就很顯然了。*/ typedef long