/* Style Definitions */ table.MsoNormalTable {mso-style-name:普通表格; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-priority:99; mso-style-parent:""; mso-padding-alt:0cm 5.4pt 0cm 5.4pt; mso-para-margin:0cm;…
分组加密器(encryption) 题解点这里 #include<map> #include<stack> #include<vector> #include<cstdio> #include<iostream> #define debug(x) cerr<<#x<<" "<<x<<endl; using namespace std; typedef long long ll;…
--> 贪心算法 1)题解 •        分别用V0.V1和V>=2表示度为0.1以及至少为2的顶点集合 •        对于每个顶点,维护三个属性: •        degree 邻居的个数 •        degree2 邻居中度为2的顶点数 •        id     编号 Pseudo-code •        initialize V0, V1, V>=2 and (degree, degree2, id) of each node •        while…
选座( ticket_chooser ) 不会正解,欢迎讨论 //60分 #include<cstdio> #define max(a,b) (a)>(b)?a:b #define min(a,b) (a)<(b)?a:b ; template <typename T> inline void read(T &x){ T f=;register ; ;ch=getchar();} +ch-';ch=getchar();} x*=f; } inline ?x:-x…
串行调度(serial) 除等价条件, 根据题意设置限制条件,然后求字典序最小拓扑序. 简洁版 #include<bits/stdc++.h> using namespace std; ; ; ; template <typename T> inline void read(T &x){ T f=;; ;ch=getchar();} +ch-';ch=getchar();} x*=f; } vector<int>lastR[N];int lastW[N]; bi…
A - 口算训练 题意:询问 $[L, R]$区间内 的所有数的乘积是否是D的倍数 思路:考虑分解质因数 显然,一个数$x > \sqrt{x} 的质因子只有一个$ 那么我们考虑将小于$\sqrt {x}$ 的质因子用线段树维护 其他质因子用vector 维护存在性 #include <bits/stdc++.h> using namespace std; #define N 100010 #define block 317 vector <]; int t, n, q; int…
口算训练 #include <iostream> #include <algorithm> #include <cstring> #include <cstdio> #include <string> #include <map> #include <cmath> #include <vector> #define Faster ios::sync_with_stdio(false),cin.tie(0) #d…
传送门 题目描述     在空闲时间,张老师习惯性地和菜哭武玩起了取石子游戏,这次的游戏规则有些不同,在他们面前有n堆石子,其中,第i堆石子的个数为a[i],现在制定规则如下:     从张老师开始,两个人轮流取石子,每次可以从任意一堆中取走x个石子,其中x必须严格小于这堆石子的总数并且能够被这堆石子的个数整除,谁先无法继续取走石子就算失败!     例如,只有一堆石子,个数为6,张老师首先可以取走的石子个数为1,2或者3个.     现在给定n堆石子每一堆的石子数,张老师希望你帮他确定在双方最…
湖湘杯 2018 WriteUp (部分),欢迎转载,转载请注明出处! 1.  CodeCheck(WEB) 测试admin ‘ or ‘1’=’1’# ,php报错.点击登录框下面的滚动通知,URL中有id=b3FCRU5iOU9IemZYc1JQSkY0WG5JZz09,想到注入,但是不管输入什么都给弹到index,于是扔下这个思路.掏出目录扫描工具,发现存在list.zip,打开后是前面存在注入的界面. 图中告诉了加密的算法,AES-128-CBC对称加密,给了iv和key.并且若id后七…
题目链接 2018 ACM 国际大学生程序设计竞赛上海大都会 下午午休起床被同学叫去打比赛233 然后已经过了2.5h了 先挑过得多的做了 .... A题 rand x*n 次点,每次judge一个点位端点的共线向量数判断是否大于给定x 强行rand 500次 代码 #include<bits/stdc++.h> using namespace std; inline int read() { int x = 0,f = 1; char c = getchar(); while(c <…