随笔分类 -  解题报告

摘要:题目地址 http://codeforces.com/gym/101635/ A 题: 计算两个数组元素之间最有可能的差值,注意数据全部非法时的情况 #include<bits/stdc++.h> using namespace std; const int maxn = 2005; int a[m 阅读全文
posted @ 2018-08-20 19:19 ZKin 阅读(388) 评论(0) 推荐(0)
摘要:题目链接Mahmoud has an array a consisting of n integers. He asked Ehab to find another array b of the same length such that:b is lexicogra... 阅读全文
posted @ 2018-07-06 09:43 ZKin 阅读(115) 评论(0) 推荐(0)
摘要:题目链接题目大意:模拟一个二进制位运算计算器,给定T行二进制下的操作序列,对于每行操作,输出计算得到的值。共有两类操作运算符,一元运算符not(取反),shr(右移),shl(左移),二元运算符and(且),or(或),xor(异或)。一元运算符的运算优先级高于二元运... 阅读全文
posted @ 2018-04-13 13:49 ZKin 阅读(178) 评论(0) 推荐(0)
摘要:题目链接题目大意是给定n条直线,2*n个点,通过交换任意直线的端点位置使得它们互不相交,容易想到可以通过按照坐标x,y大小排序的规则来交换它们的位置,即可保证所有直线不相交#includeusing namespace std;typedef long long ll... 阅读全文
posted @ 2018-04-05 19:50 ZKin 阅读(190) 评论(0) 推荐(0)