摘要: A: Distance Write a program which calculates the distance between two points P1(x1, y1) and P2(x2, y2). Input Four real numbers x1, y1, x2 and y2 are 阅读全文
posted @ 2019-11-19 23:26 gdgzliu 阅读(570) 评论(0) 推荐(0) 编辑
摘要: A: Finding a Word Write a program which reads a word W and a text T, and prints the number of word W which appears in text T T consists of string Ti s 阅读全文
posted @ 2019-11-19 17:46 gdgzliu 阅读(759) 评论(0) 推荐(0) 编辑
摘要: A: Toggling Cases Write a program which converts uppercase/lowercase letters to lowercase/uppercase for a given string. Input A string is given in a l 阅读全文
posted @ 2019-11-19 14:59 gdgzliu 阅读(1135) 评论(0) 推荐(0) 编辑
摘要: AOJ 是日本会津大学的在线评测系统,改系统还自带课程,配套完整的入门课程:入门语法、基础数据结构和算法。 网址:https://onlinejudge.u aizu.ac.jp/home 本篇博客,是一个目录,记录gdgzliu 在AOJ上的做题记录。 ITP1 Topic 1 Getting S 阅读全文
posted @ 2019-11-19 13:51 gdgzliu 阅读(257) 评论(0) 推荐(0) 编辑
摘要: A Curtain Time Limit: 2 sec / Memory Limit: 1024 MB Problem Statement The window of Takahashi's room has a width of A. There are two curtains hung ove 阅读全文
posted @ 2019-10-21 14:46 gdgzliu 阅读(420) 评论(0) 推荐(0) 编辑
摘要: 题目来源:http://acm.hdu.edu.cn/showproblem.php?pid=1166 Problem Description 中央情报局要研究敌人究竟演习什么战术,所以Tidy要随时向Derek汇报某一段连续的工兵营地一共有多少人,例如Derek问:“Tidy,马上汇报第3个营地到 阅读全文
posted @ 2019-10-11 15:22 gdgzliu 阅读(121) 评论(0) 推荐(0) 编辑
摘要: 题目来源:https://www.luogu.org/problem/P3374 题目描述 如题,已知一个数列,你需要进行下面两种操作: 1.将某一个数加上x 2.求出某区间每一个数的和 输入格式 第一行包含两个整数N、M,分别表示该数列数字的个数和操作的总个数。 第二行包含N个用空格分隔的整数,其 阅读全文
posted @ 2019-10-11 15:16 gdgzliu 阅读(89) 评论(0) 推荐(0) 编辑
摘要: 知识讲解 1. 参考刘汝佳 陈峰《算法竞赛入门经典训练指南》树状数组章节 2. https://www.cnblogs.com/xenny/p/9739600.html 3. 二维树状数组 https://blog.csdn.net/z309241990/article/details/961525 阅读全文
posted @ 2019-10-11 15:08 gdgzliu 阅读(158) 评论(0) 推荐(0) 编辑
摘要: 题目来源:链接:https://ac.nowcoder.com/acm/problem/14714 题目描述 XzzF最近过着吃土的日子,饿的神魂颠倒!突然看到有人在做美食节宣传,有好多好吃的,但想吃到这些好吃的可以不容易!得答对主办方出的题。 现在XzzF拿到这样一道题:长度为N的01字符串,且满 阅读全文
posted @ 2019-10-11 13:01 gdgzliu 阅读(337) 评论(0) 推荐(0) 编辑
摘要: 题目来源:https://www.acwing.com/problem/content/22/ 地上有一个 m 行和 n 列的方格,横纵坐标范围分别是 0∼m−1 和 0∼n−1。 一个机器人从坐标0,0的格子开始移动,每一次只能向左,右,上,下四个方向移动一格。 但是不能进入行坐标和列坐标的数位之 阅读全文
posted @ 2019-10-03 11:50 gdgzliu 阅读(250) 评论(0) 推荐(0) 编辑