随笔分类 -  编程竞赛

1 2 3 4 5 ··· 10 下一页
OJ上的编程题和提交通过的代码
摘要:摘要 本文主要给出了2018 ACM-ICPC Asia Beijing Regional Contest的部分题解,意即熟悉区域赛题型,保持比赛感觉。 Jin Yong’s Wukong Ranking List 题意 输入关系组数n和n组关系,每组关系是s1 > s2,问第一出现矛盾的组,或者没 阅读全文
posted @ 2018-11-23 20:26 Reqaw 阅读(621) 评论(0) 推荐(0)
摘要:摘要 本文主要给出了2014-2015 ACM-ICPC, Asia Xian Regional Contest的部分题解,说明了每题的题意、解题思路和代码实现,意即熟悉区域赛比赛题型。 Built with Qinghuai and Ari Factor 题意 判断是否是Q数列,只要数列中每个数均 阅读全文
posted @ 2018-11-21 19:01 Reqaw 阅读(564) 评论(0) 推荐(0)
摘要:摘要: 本文是The 2018 ACM-ICPC Asia Qingdao Regional Contest(青岛现场赛)的部分解题报告,给出了出题率较高的几道题的题解,希望熟悉区域赛的题型,进而对其他区域赛的准备有借鉴意义。 Function and Function 题意 给出x和k,计算gk( 阅读全文
posted @ 2018-11-13 19:19 Reqaw 阅读(803) 评论(0) 推荐(0)
摘要:ZOJ 4024 Peak 题意 给出n和n个数,判断该数列是否是凸形的。 解题思路 从前往后第一对逆序数,和从后往前第一队逆序数,如果都非零而且相邻,证明该数组是凸形的。 代码 1 #include <cstdio> 2 const int maxn = 100000 + 10; 3 int a[ 阅读全文
posted @ 2018-10-30 20:18 Reqaw 阅读(479) 评论(0) 推荐(0)
摘要:摘要 本文主要列举并求解了2016 ACM/ICPC亚洲区青岛站现场赛的部分真题,着重介绍了各个题目的解题思路,结合详细的AC代码,意在熟悉青岛赛区的出题策略,以备战2018青岛站现场赛。 HDU 5984 Pocky 题意 给出一根棒子(可以吃的)的长度x和切割过程中不能小于的长度d,每次随机的选 阅读全文
posted @ 2018-10-27 19:51 Reqaw 阅读(1329) 评论(0) 推荐(0)
摘要:HDU 6197 array array array 题意 输入n和k,表示输入n个整数和可以擦除的次数k,如果至多擦除k次能是的数组中的序列是不上升或者是不下降序列,就是魔力数组,否则不是。 解题思路 分别求最长不下降和不上升子序列的长度,看不符合要求的数字和k的大小。 这里使用优化后的求解最长不 阅读全文
posted @ 2018-10-24 20:47 Reqaw 阅读(320) 评论(0) 推荐(0)
摘要:HDU 6225 Little Boxes 题意 计算四个整数的和 解题思路 使用Java大整数 1 import java.math.BigInteger; 2 import java.util.Scanner; 3 4 /** 5 * 6 * @author reqaw 7 */ 8 publi 阅读全文
posted @ 2018-10-18 17:44 Reqaw 阅读(811) 评论(0) 推荐(1)
摘要:HDU 6206 Apple 题意: 给出四个点的坐标(每个点的坐标值小于等于1,000,000,000,000),问最后一个点是否在前三个点组成的三角形的外接圆内,是输出Accept,否输出Rejected 解题思路: 题意很好理解,就是判断一个点是否在一个圆内,或者说一个点到圆心的距离是否大于半 阅读全文
posted @ 2018-10-15 10:09 Reqaw 阅读(358) 评论(0) 推荐(0)
摘要:HDU 6213 Chinese Zodiac 保证女比男大的情况下,两人年龄差距最小时多少 1 #include <cstdio> 2 #include <cstring> 3 4 char ls[12][20] = {"rat", "ox", "tiger", "rabbit", "dragon 阅读全文
posted @ 2018-10-07 14:31 Reqaw 阅读(258) 评论(0) 推荐(0)
摘要:描述 《Journey to the West》(also 《Monkey》) is one of the Four Great Classical Novels of Chinese literature. It was written by Wu Cheng'en during the Ming 阅读全文
posted @ 2018-09-24 17:17 Reqaw 阅读(384) 评论(0) 推荐(0)
摘要:HDU 5912 Fraction 给出系数计算一个迭代的公式,反向代入即可。 1 #include <cstring> 2 #include <cstdio> 3 #include <algorithm> 4 using namespace std; 5 6 const int maxn = 10 阅读全文
posted @ 2018-08-20 18:29 Reqaw 阅读(165) 评论(0) 推荐(0)
摘要:HDU 2089 不要62 数据量比较小,还是直接暴力吧。 1 #include<stdio.h> 2 int a[1000010]; 3 int F(int m); 4 int main() 5 { 6 int i,sum,n,m; 7 for(i=1;i<=1000000;i++) 8 a[i] 阅读全文
posted @ 2018-08-20 18:00 Reqaw 阅读(216) 评论(0) 推荐(0)
摘要:题目链接: https://vjudge.net/problem/ZOJ-1456 These are N cities in Spring country. Between each pair of cities there may be one transportation track or n 阅读全文
posted @ 2018-08-06 14:35 Reqaw 阅读(259) 评论(0) 推荐(0)
摘要:题目链接: https://vjudge.net/problem/POJ-3268 One cow from each of N farms (1 ≤ N ≤ 1000) conveniently numbered 1..N is going to attend the big cow party 阅读全文
posted @ 2018-08-06 12:04 Reqaw 阅读(242) 评论(0) 推荐(0)
摘要:题目链接: https://cn.vjudge.net/problem/POJ-3037 Bessie and the rest of Farmer John's cows are taking a trip this winter to go skiing. One day Bessie find 阅读全文
posted @ 2018-07-28 19:25 Reqaw 阅读(312) 评论(0) 推荐(0)
摘要:题目链接: https://cn.vjudge.net/problem/POJ-1724 N cities named with numbers 1 ... N are connected with one-way roads. Each road has two parameters associ 阅读全文
posted @ 2018-07-28 19:07 Reqaw 阅读(387) 评论(0) 推荐(0)
摘要:题目链接: https://cn.vjudge.net/problem/POJ-1860 Several currency exchange points are working in our city. Let us suppose that each point specializes in t 阅读全文
posted @ 2018-07-28 19:02 Reqaw 阅读(415) 评论(0) 推荐(0)
摘要:题目链接:https://cn.vjudge.net/problem/HDU-1079 题目: Adam and Eve enter this year’s ACM International Collegiate Programming Contest. Last night, they play 阅读全文
posted @ 2018-07-24 20:33 Reqaw 阅读(249) 评论(0) 推荐(0)
摘要:题目链接: https://cn.vjudge.net/problem/HDU-3613 After an uphill battle, General Li won a great victory. Now the head of state decide to reward him with h 阅读全文
posted @ 2018-07-23 17:32 Reqaw 阅读(313) 评论(0) 推荐(0)
摘要:题目链接: https://cn.vjudge.net/problem/HDU-3613 After an uphill battle, General Li won a great victory. Now the head of state decide to reward him with h 阅读全文
posted @ 2018-07-23 08:51 Reqaw 阅读(252) 评论(0) 推荐(0)

1 2 3 4 5 ··· 10 下一页