ACM ICPC Vietnam National Second Round】的更多相关文章

A. Stock Market 枚举哪一天买入,哪一天卖出即可. #include<cstdio> #include<algorithm> using namespace std; typedef long long ll; const int P=1000000; int T,n,i,a[111],j,ans,m; int main(){ scanf("%d",&T); while(T--){ scanf("%d%d",&n…
乘除都在150以内,分解质因数后发现只有35个,建立35个树状数组/线段树,做区间加.区间查询,最后快速幂起来. #include<cstdio> #include<cstring> using namespace std; #define N 50001 typedef long long ll; ll Quick_Pow(ll a,ll p,ll MOD) { if(!p) return 1; ll ans=Quick_Pow(a,p>>1,MOD); ans=an…
Contest Link easy: ABDGIJ medium-easy: E medium: H medium-hard: CF A. Cool number 各数位之和不大,枚举即可. E. Binary Search Tree 考虑 DP,\(f[u]\) 表示以 \(u\) 为根,极大合法连通块 size,但是这样合并不了,不知道 \(u\) 的儿子的子树会不会和 \(u\) 冲突.注意到 \(u\) 的子树,影响到的点只有,从 \(u\) 往根走,第一次左拐遇到的点,和第一次右拐遇到…
A. ACM ICPC time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output In a small but very proud high school it was decided to win ACM ICPC. This goal requires to compose as many teams of three as po…
hannnnah_j’s Biological Test Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 131072/131072 K (Java/Others)Total Submission(s): 802    Accepted Submission(s): 269 Problem Description hannnnah_j is a teacher in WL High school who teaches biolog…
Football Games Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 439    Accepted Submission(s): 157 Problem Description A mysterious country will hold a football world championships---Abnormal Cup…
Football Games Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 802    Accepted Submission(s): 309 Problem Description A mysterious country will hold a football world championships---Abnormal Cup…
比赛链接: http://202.197.224.59/OnlineJudge2/index.php/Contest/problems/contest_id/36 题目来源: 2014嘉杰信息杯ACM/ICPC湖南程序设计邀请赛暨第六届湘潭市程序设计竞赛 ×  Problem A A simple problem   (求N % 1 + N % 2 + ....+ N % N, 待补) ?  Problem B Path √  Problem C Range   (单调栈) √  Problem…
祝大家新年快乐,相信在新的一年里一定有我们自己的梦! 这是一个简化的魔板问题,只需输出步骤即可. 玩具(Toy) 描述 ZC神最擅长逻辑推理,一日,他给大家讲述起自己儿时的数字玩具. 该玩具酷似魔方,又不是魔方.具体来说,它不是一个3 * 3 * 3的结构,而是4 * 2的结构. 按照该玩具约定的玩法,我们可反复地以如下三种方式对其做变换: A. 交换上下两行.比如,图(a)经此变换后结果如图(b)所示. B. 循环右移(ZC神从小就懂得这是什么意思的).比如,图(b)经此变换后结果如图(c)所…
Problem G. Garden Gathering Input file: standard input Output file: standard output Time limit: 3 seconds Memory limit: 512 megabytes Many of you may have been to St. Petersburg, but have you visited Peterhof Palace? It is a collection of splendid pa…