C - Divisibility by Eight Time Limit:2000MS     Memory Limit:262144KB     64bit IO Format:%I64d & %I64u Submit cid=82382#status//C/0" class="ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only" style="display:inl…
B - Brackets in Implications Time Limit:2000MS     Memory Limit:262144KB     64bit IO Format:%I64d & %I64u Description Implication is a function of two logical arguments, its value is false if and only if the value of the first argument is true and t…
http://uoj.ac/problem/29 cdq四次处理出一直向左, 一直向右, 向左后回到起点, 向右后回到起点的dp数组,最后统计答案. 举例:\(fi\)表示一直向右走i天能参观的最多景点数. 其中有一个很重要的条件\(fi≤fi+1fi≤fi+1\),这个条件是分治的前提. 关于这个条件的证明,我想了好久才想出来,用反证法证明一下就行. 分治时需要用主席树维护路径上的前k大和. #include<cstdio> #include<cstring> #include&…
C. Divisibility by Eight time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output You are given a non-negative integer n, its decimal representation consists of at most 100 digits and doesn't conta…
题目传送门 /* 水题:已知1928年1月1日是星期日,若是闰年加1,总天数对7取余判断就好了: */ #include <cstdio> #include <iostream> #include <algorithm> #include <cmath> #include <cstring> #include <string> #include <map> #include <set> #include <…
http://acm.zju.edu.cn/onlinejudge/showContestProblem.do?problemId=5500 The 12th Zhejiang Provincial Collegiate Programming Contest - H May Day Holiday Time Limit: 2 Seconds      Memory Limit: 65536 KB As a university advocating self-learning and work…
Clique in the Divisibility Graph time limit per test1 second memory limit per test256 megabytes inputstandard input outputstandard output As you must know, the maximum clique problem in an arbitrary graph is NP-hard. Nevertheless, for some graphs of…
May Day Holiday Time Limit: 2 Seconds Memory Limit: 65536 KB As a university advocating self-learning and work-rest balance, Marjar University has so many days of rest, including holidays and weekends. Each weekend, which consists of Saturday and Sun…
Holiday's Accommodation Time Limit: 8000/4000 MS (Java/Others)    Memory Limit: 200000/200000 K (Java/Others)Total Submission(s): 2009    Accepted Submission(s): 558 Problem Description Nowadays, people have many ways to save money on accommodation w…
C. Divisibility by Eight Time Limit: 20 Sec Memory Limit: 256 MB 题目连接 http://codeforces.com/contest/550/problem/C Description You are given a non-negative integer n, its decimal representation consists of at most 100 digits and doesn't contain leadin…