
ZOJ习题集
等我学会后缀自动机
侠影之谜
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
ZOJ 4053 Couleur (启发式合并+主席树)
#include<bits/stdc++.h>using namespace std;#define debug cout<<"YES\n";#define rep(x,y,z) for(int (x)=(y);(x)<(z);(x)++)#define ll long long#define lrt int l,int r,int rt#define ...原创 2020-03-10 17:31:59 · 263 阅读 · 0 评论 -
ZOJ 3726 Alice's Print Service (水题)
题目链接:http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemCode=3726#include<bits/stdc++.h>using namespace std;#define debug puts("YES");#define rep(x,y,z) for(int (x)=(y);(x)<(z);(x...原创 2018-09-29 19:14:41 · 210 阅读 · 0 评论 -
ZOJ 3905 Cake (贪心+简单DP)
题目链接:http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemCode=3905#include<bits/stdc++.h>using namespace std;#define debug puts("YES");#define rep(x,y,z) for(int (x)=(y);(x)<(z);(x...原创 2018-10-18 17:45:44 · 250 阅读 · 0 评论 -
ZOJ 4029 Now Loading!!! (前缀和加速+二分)
题目链接:http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemCode=4029#include<bits/stdc++.h>using namespace std;#define debug puts("YES");#define rep(x,y,z) for(int (x)=(y);(x)<(z);(x...原创 2018-11-01 14:33:28 · 320 阅读 · 0 评论 -
ZOJ 4062 Plants vs. Zombies (二分+细节)
题目链接:http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemCode=4062#include<bits/stdc++.h>using namespace std;#define debug puts("YES");#define rep(x,y,z) for(int (x)=(y);(x)<(z);(x...原创 2018-11-07 06:38:48 · 522 阅读 · 0 评论 -
ZOJ 4035 Doki Doki Literature Club (水)
题目链接:http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemCode=4035#include<bits/stdc++.h>using namespace std;#define debug puts("YES");#define rep(x,y,z) for(int (x)=(y);(x)<(z);(x...原创 2018-11-18 12:05:20 · 283 阅读 · 0 评论 -
ZOJ 3785 What day is that day? (指数循环定理+最小公倍数)
题目链接:http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemCode=3785#include<bits/stdc++.h>using namespace std;#define debug puts("YES");#define rep(x,y,z) for(int (x)=(y);(x)<(z);(x...原创 2018-12-03 23:55:03 · 204 阅读 · 0 评论 -
ZOJ 1914 Arcitc Network(最小生成树+连通性质)
#include<bits/stdc++.h>using namespace std;#define debug puts("YES");#define rep(x,y,z) for(int (x)=(y);(x)<(z);(x)++)#define ll long long#define lrt int l,int r,int rt#define lson l...原创 2019-02-02 22:54:33 · 251 阅读 · 0 评论 -
ZOJ 2112 Dynamic Rankings (动态主席树)
题目链接:http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemCode=2112题目大意:比静态查询区间第k小多加了一个修改操作。题目分析: 对于所有的数(原序列的数和要修改的数)都离散化处理,动态修改的核心是对于树状数组中出现的点开线段树维护,因为之前修改一个数对于后续区间有影响,我们令开一个根节点数组S来维...原创 2019-02-16 21:13:39 · 242 阅读 · 0 评论 -
ZOJ 1734 Power Network (EK算法 模板题)
题目链接:http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemCode=1734题目大意:电力发电与传输问题。若干个发电站与若干个消费点。题目分析: 初学EK算法,模板提。不断的按bfs层次去收集流量。寻找增广路径的方法不确定导致时间复杂度不确定。#include<bits/stdc++.h>...原创 2019-02-22 16:27:51 · 188 阅读 · 0 评论 -
ZOJ 1734 Power Network (ISAP算法)
题目链接:http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemCode=1734#include<bits/stdc++.h>using namespace std;#define debug puts("YES");#define rep(x,y,z) for(int (x)=(y);(x)<(z);(x...原创 2019-02-24 00:00:58 · 191 阅读 · 0 评论 -
ZOJ 2404 Going Home (最小费用最大流模板题)
题目链接:http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemCode=2404模板题:#include<bits/stdc++.h>using namespace std;#define debug puts("YES");#define rep(x,y,z) for(int (x)=(y);(x)<...原创 2019-03-01 07:19:38 · 232 阅读 · 0 评论 -
ZOJ 3903 Ants (纯数学知识)
AntTime Limit: 1 Second Memory Limit: 32768 KBThere is an ant named Alice. Alice likes going hiking very much. Today, she wants to climb a cuboid. The length of cuboid's longest edge is n, ...原创 2018-08-29 19:28:50 · 264 阅读 · 0 评论 -
ZOJ 3911 Prime Query (线段树基本操作)
Prime QueryTime Limit: 5 Seconds Memory Limit: 196608 KBYou are given a simple task. Given a sequence A[i] with N numbers. You have to perform Q operations on the given sequence.Here are ...原创 2018-08-20 00:21:00 · 255 阅读 · 0 评论 -
ZOJ 3868 GCD Expectation(暴力统计技巧+一点数论知识)
GCD Expectation Time Limit: 4 Seconds Memory Limit: 262144 KB Edward has ...原创 2018-04-27 18:07:50 · 213 阅读 · 0 评论 -
ZOJ 3862 Intersection
Intersection Time Limit: 3 Seconds Memory Limit: 131072 KB Special Judge ...原创 2018-04-27 18:16:59 · 124 阅读 · 0 评论 -
ZOJ 1029 Moving Tables (简单贪心)
Moving Tables Time Limit: 2 Seconds Memory Limit: 65536 KB The famous ACM...原创 2018-06-22 22:27:09 · 432 阅读 · 0 评论 -
ZOJ 1076 Gene Assembly (贪心水题)
Gene Assembly Time Limit: 2 Seconds Memory Limit: 65536 KB Statement of t...原创 2018-06-22 23:01:54 · 708 阅读 · 0 评论 -
ZOJ 2305 C Looooops (扩展欧几里得模板题)
C Looooops Time Limit: 2 Seconds Memory Limit: 65536 KB A Compiler Myster...原创 2018-06-17 11:12:36 · 267 阅读 · 0 评论 -
ZOJ 1025 Wooden Sticks (动态规划+数学思维)
Wooden Sticks Time Limit: 2 Seconds Memory Limit: 65536 KB There is a pil...原创 2018-06-17 16:47:33 · 275 阅读 · 1 评论 -
ZOJ 1353 Unimodal Palindromic Decompositions(简单计数dp)
Unimodal Palindromic DecompositionsTime Limit: 2 Seconds Memory Limit: 65536 KBA sequence of positive integers is Palindromic if it reads the same forward and backward. For example:23 11 15...原创 2018-07-18 10:42:54 · 296 阅读 · 0 评论 -
ZOJ 1346 Comparing Your Heroes (状态压缩dp 精简)*
Comparing Your HeroesTime Limit: 10 Seconds Memory Limit: 32768 KBNowadays many students wouldn't attend classes in university, instead, they stay in dormitory playing Electronic games on com...原创 2018-07-18 11:21:58 · 355 阅读 · 0 评论 -
ZOJ 1276 Optimal Array Multiplication Sequence(简单dp问题+路径打印)
Optimal Array Multiplication Sequence Time Limit: 2 Seconds Memory Limit: 65536 KB ...原创 2018-07-13 12:16:20 · 210 阅读 · 0 评论 -
ZOJ 2103 Marco Popo the Traveler(搜索水题)
Marco Popo the TravelerTime Limit: 2 Seconds Memory Limit: 65536 KBMarco Popo, the famous traveler, is traveling around the country of ACM. There are colored high-ways between cities (of co...原创 2018-07-25 11:51:41 · 237 阅读 · 0 评论 -
ZOJ 1145 Dreisam Equations(简单回溯)
During excavations in the Dreisamwuste, a desert on some far away and probably uncivilized planet, sheets of paper containing mysterious symbols had been found. After a long investigation, the project...原创 2018-07-21 06:18:32 · 514 阅读 · 0 评论 -
ZOJ 3862 Intersections (计算几何+技巧)
Intersection Time Limit: 3 Seconds Memory Limit: 131072 KB Special Judge ...原创 2018-04-27 07:02:43 · 217 阅读 · 0 评论