找不到cf 的gym网址了

先放一个 pdf 凑凑数

链接:https://pan.baidu.com/s/1ZjCX1yg4i8VXM87PD7pppg 
提取码:ru3p 
复制这段内容后打开百度网盘手机App,操作更方便哦

A题 签到题

2291: Rearranging a Sequence

Submit Page    Summary    Time Limit: 2 Sec     Memory Limit: 256 Mb     Submitted: 60     Solved: 30


Description

You are given an ordered sequence of integers, (1, 2, 3, . . . , n). Then, a number of requests will be given. Each request specifies an integer in the sequence. You need to move the specified integer to the head of the sequence, leaving the order of the rest untouched. Your task is to find the order of the elements in the sequence after following all the requests successively

Input

The input consists of a single test case of the following form.
n m
e1
.
.
.
em
The integer n is the length of the sequence (1 ≤ n ≤ 200000). The integer m is the number
of requests (1 ≤ m ≤ 100000). The following m lines are the requests, namely e1, . . . , em, one per line. Each request ei (1 ≤ i ≤ m) is an integer between 1 and n, inclusive, designating the element to move. Note that, the integers designate the integers themselves to move, not their positions in the sequence.

Output

Output the sequence after processing all the requests. Its elements are to be output, one per line, in the order in the sequence

Sample Input

10 8
1
4
7
3
4
10
1
3

Sample Output

3
1
10
4
7
2
5
6
8
9

思路

(模拟题 题意是将读入的一个个数字放到队伍的队首 最后输出这列数字)

存入数组 倒序输出

对已经输出的数字进行标记 再次遇到就不再输出

最后从 1 ~ n 遍历 将未标记的数字依次输出

#include <iostream>
#include <stdio.h>
#include <string.h>
#include <bits/stdc++.h>
using namespace std;
int a[200005],b[200005];
int main()
{int t,m,x;scanf("%d%d",&t,&x);memset(b,1,sizeof b);memset(a,0,sizeof a);for (int i=0;i<x;i++){scanf("%d",&a[i]);}for (int i=x-1;i>=0;i--){if (b[a[i]]>0){printf("%d\n",a[i]);b[a[i]]=0;}}for (int i=1;i<=t;i++)if (b[i]>0)printf("%d\n",i);return 0;
}

I题 数学题

2299: Skinny Polygon

Submit Page    Summary    Time Limit: 20 Sec     Memory Limit: 256 Mb     Submitted: 23     Solved: 4     SpecialJudge


Description

You are asked to find a polygon that satisfies all the following conditions, given two integers, xbb and ybb.

  • The number of vertices is either 3 or 4.
  • Edges of the polygon do not intersect nor overlap with other edges, i.e., they do not share any points with other edges except for their endpoints
  • The x- and y-coordinates of each vertex are integers
  • The x-coordinate of each vertex is between 0 and xbb, inclusive. Similarly, the y-coordinate is between 0 and ybb, inclusive.
  • At least one vertex has its x-coordinate 0.
  • At least one vertex has its x-coordinate xbb
  • At least one vertex has its y-coordinate 0
  • At least one vertex has its y-coordinate ybb
  • The area of the polygon does not exceed 25000

The polygon may be non-convex.

Input

The input consists of multiple test cases. The first line of the input contains an integer n, which is the number of the test cases (1 ≤ n ≤ 105 ). Each of the following n lines contains a test case formatted as follows. xbb ybb xbb and ybb (2 ≤ xbb ≤ 109 , 2 ≤ ybb ≤ 109 ) are integers stated above

Output

For each test case, output description of one polygon satisfying the conditions stated above, in the following format. v x1 y1 . . . xv yv Here, v is the number of vertices, and each pair of xi and yi gives the coordinates of the i-th vertex, (xi , yi). The first vertex (x1, y1) can be chosen arbitrarily, and the rest should be listed either in clockwise or in counterclockwise order. When more than one polygon satisfies the conditions, any one of them is acceptable. You can prove that, with the input values ranging as stated above, there is at least one polygon satisfying the conditions.

Sample Input

2
5 6
1000000000 2

Sample Output

4
5 6
0 6
0 0
5 0
3
1000000000 0
0 2
999999999 0

思路

一直在思考这个题目

应该是有通解

注意 :non-convex 这个单词表示 非凸包 (我们一开始以为只能是凸包)

那就可以是凹四边形啦~~

先控制底边最小 再控制与底边相对的高最小

在比赛最后一个小时的时候

我们就想到了 上述方法

但是 我考虑到 如果 (x-1,y-1)不在四边形内 需要再次寻找该点

所以 重新考虑斜率的值

没想到 数据水啊~~~

刚刚写了一发上述解法的代码 然后在CSU上过了 = =

#include <iostream>
#include <stdio.h>
#include <string.h>
#include <bits/stdc++.h>
using namespace std;int main()
{int t;long long x,y;scanf("%d",&t);for (int i=0;i<t;i++){scanf("%lld%lld",&x,&y);printf("4\n");printf("0 1\n");printf("%lld %lld\n",x-1,y-1);printf("1 0\n");printf("%lld %lld\n",x,y);}return 0;
}

CSU上过了

在 cf 的gym上过不了 (据说是 gym 的数据比较强)

数据的锅555

还会再补一次代码

我又来了

啊啊啊啊啊啊啊啊啊

我就知道要用GCD 但是 队友问我 如果互质咋办

:??????母鸡啊

就没写

看一下 大佬写的题解

https://blog.csdn.net/acterminate/article/details/79246584

之后会补上 手写的分析……

其他题目也改日再补……

春游4.1 | 湖南多校赛20190331 / 16东京区域赛相关推荐

  1. 2022浙江省赛、ICPC昆明区域赛 游·寄

    前夜 周六打的浙江省赛.周日昆明区域赛,周五平常作息,早上和爸妈聊天 我说道 金华疫情情况还好,还能出校吃饭,没想到 噩耗马上就来了.金华突然有了几例阳性,其中有一位还是滴滴司机.线上教学的消息已发出 ...

  2. 退役了,总结的ACM近年区域赛的所有题型

    前面的是退役小记,后面是我个人写近2年所有区域赛场次记录的题型(请忽略我记录的感受),可以留着看下最近的场次名称和原题在哪里有 目录 退役小记(没兴趣可以不看) 这里简单记下我的acm生涯 省赛和三场 ...

  3. 2013长春区域赛总结

    今年因为参加了一场日本的区域赛,国内的区域赛只有一次机会.选择了来最后一个赛区长春,一方面准备时间比较充裕,另一方面也想弥补上年在长春留下的遗憾.长春是我的最后一场区域赛了,本来想着拿个金牌退役的,万 ...

  4. 2021湖南多校对抗赛第三场

    2021湖南多校对抗赛第三场 排名 第一 第二 第三 中南2队 中南1队 湘潭大学1队 团体成绩 学校 总题数 总罚时 中南大学 26 4396 题解(部分) special thanks: Binb ...

  5. Contest2071 - 湖南多校对抗赛(2015.03.28)

    Contest2071 - 湖南多校对抗赛(2015.03.28) 本次比赛试题由湖南大学ACM校队原创 http://acm.csu.edu.cn/OnlineJudge/contest.php?c ...

  6. 湖南多校对抗赛(2015.03.28)

    Contest2071 - 湖南多校对抗赛(2015.03.28) Contest2071 - 湖南多校对抗赛(2015.03.28) 本次比赛试题由湖南大学ACM校队原创 http://acm.cs ...

  7. 2021湖南多校对抗赛第一场

    2021湖南多校对抗赛第一场 排名 第一 第二 第三 国防科大1队 湖南大学1队 湖南师范大学4队 团体成绩 学校 总题数 总罚时 中南大学 27 3499 湖南师范大学 29 4927 湘潭大学 2 ...

  8. 2022湖南多校对抗赛第一场

    2022湖南多校对抗赛第一场 队伍排名 第一 第二 第三 中南大学1队 湖南大学1队 湖南大学4队 团体成绩 取每个学校正式队伍前四名 学校 总题数 湖南大学 22 中南大学 19 湖南师范大学 16 ...

  9. 2022湖南多校对抗赛第四场

    2022湖南多校对抗赛第四场 队伍排名 第一 第二 第三 中南大学2队 湖南大学2队 国防科技大学4队 团体成绩 取每个学校正式队伍前四名 学校 总题数 中南大学 30 国防科技大学 27 湘潭大学 ...

最新文章

  1. 当前标识(NT AUTHORITY\NETWORK SERVICE)没有对“的写访问权限。
  2. linux软中断的实现
  3. istringstream和ostringstream
  4. linux的无密码登录,linux 无密码登录
  5. 2018.08.09洛谷P3959 宝藏(随机化贪心)
  6. anaconda没有vscode_Ubuntu18.04安装Anaconda3和VSCode指南
  7. Linux 命令(97)—— info 命令
  8. sql 时间转换格式 convert(varchar(10),字段名,转换格式)
  9. FAST DFS服务搭建说明
  10. PayPal支付配置
  11. 期货连续合约跳空处理
  12. 一串代码远程控制电脑关机
  13. INT32_MIN溢出
  14. python模拟计算器程序代码_python作业:模拟计算器
  15. 服务器打开xlsm文件,XLSM 文件扩展名: 它是什么以及如何打开它?
  16. Blog的浏览量达到1000时将发布“曾经桑海难为水之三”
  17. [Angular实战网易云]——15、歌词渲染
  18. 虚地址到实地址的翻译过程
  19. 链表OJ题---Java实现
  20. 新式单片机视频教程下载

热门文章

  1. POJ-29932996
  2. If you would like to submit a bug report, please visit:
  3. LayUItable动态表格分栏操作
  4. python日历模块_Python calendar日历模块的说明
  5. Android端手机测试体系
  6. PROTEUS中的复位电路
  7. RGB图片处理(1)——RGB概念理解
  8. ❤️【Android精进之路-01】定计划,重行动来学Android吧❤️
  9. python海量数据分析师职业技能_大数据分析师技能图谱详解与零基础自学内容大全...
  10. CentOS 7.8 (2003) 发布,附下载地址