- 博客(7)
- 收藏
- 关注
原创 Right-Left Cipher_Codeforces
time limit per test1 second memory limit per test256 megabytes inputstandard input outputstandard output Polycarp loves ciphers. He has invented his own cipher called Right-Left. Right-Left cipher is ...
2018-12-24 12:46:34 278
原创 编程挑战赛 Round #1 A. 子串问题
单测试点时限: 2.0 秒 内存限制: 512 MB 一个字符串 s 被称作另一个字符串 S 的子串,表示 s 在 S 中出现了。比如,“中出”是“我们中出了一个叛徒”的子串。注意子串和子序列是不同的:“苹机”是“苹果手机”的子序列,而不是子串。前缀和后缀是两种特殊的子串:一个前缀在原串的开始位置出现,而一个后缀在原串的末端出现。【本段摘自WiKi】 统计出现最多的子串,若有多个则输出ASCII码...
2018-12-23 23:11:53 163
原创 Red and Black 【POJ 1979】
题目链接:http://poj.org/problem?id=1979 思路:就是一个简单的深度搜索,规定四个方向,遇到 “ . "的时候就可以继续走并且计数。在走过这一步的之后,把这一步的的 " . " 更改为 “#”。 #include <stdio.h> #include <string.h> #include <iostream> using name...
2018-12-22 23:23:31 131
原创 P1059 明明的随机数 【洛谷】
题目链接:https://www.luogu.org/problemnew/show/P1059 一道简单的水题,用来熟悉一下set的使用。 #include <stdio.h> #include <iostream> #include <set> using namespace std; const int MAX_N = 10000; int n; ...
2018-12-21 09:52:49 370
原创 P1098 字符串的展开【洛谷】
题目链接:https://www.luogu.org/problemnew/show/P1098 这道题目我认为只是步骤较为繁琐,没有什么难度。自己写的时候因为好长时间没有写了。居然把一个判定条件写错了!=_=浪费了好长时间。 #include <stdio.h> #include <iostream> using namespace std; const int MA...
2018-12-21 09:30:56 165
原创 Roadblocks [POJ 3255]
某街区共有R条道路,N个路口。道路可以双向通行。问一号路口到N号路口的次短路的长度是多少。同一条路可以经过多次。 #include <stdio.h> #include <iostream> #include <vector> #include <algorithm> #include <queue> using namespace s...
2018-12-20 22:03:05 123
原创 P1086 花生采摘
题目链接:https://www.luogu.org/problemnew/show/P1086 #include <stdio.h> #include <iostream> #include <algorithm> using namespace std; const int MAX_N = 1000; int M, N, TIME; int groun...
2018-12-17 23:17:05 266
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人