摘要: problem给定一个正整数数列A,求一个平均数最大、长度不小于L的子段。solution二分判定:是否存在一个长度大于L,平均数不小于二分值的子段。codes#include#include#include#includeusing namespace std;do... 阅读全文
posted @ 2018-05-25 21:37 gwj1139177410 阅读(114) 评论(0) 推荐(0) 编辑
摘要: problem给你一个原始的分形图t组数据,对于每组数据,输入3个数n,h,o (n为在第n级,h,o为两个房子的编号) 求在第n级情况下,编号为h和o的两个点之间的距离*10为多少 其中,第n级分形图形成规则如下: 1. 首先先在右下角和右上角复制一遍n-1情况下的... 阅读全文
posted @ 2018-05-25 21:16 gwj1139177410 阅读(226) 评论(0) 推荐(0) 编辑
摘要: problem给出 T 组询问,每组询问一个 x ,求出一个数,满足: 1)是 x 的倍数 2)十进制下答案包含 0∼9 中的所有数字x using namespace std;typedef long long LL;LL t = 1234567891000000;... 阅读全文
posted @ 2018-05-25 20:31 gwj1139177410 阅读(98) 评论(0) 推荐(0) 编辑
摘要: problemsolutioncodes#includeusing namespace std;typedef long long LL;int main(){ LL a, b; cin>>a>>b; cout<<a*b-a-b<<"\n"; re... 阅读全文
posted @ 2018-05-25 13:30 gwj1139177410 阅读(101) 评论(0) 推荐(0) 编辑
摘要: problemsolutioncodes#includeusing namespace std;int num(int x){ int s[11] = {6,2,5,5,4,5,6,3,7,6}; if(x == 0)return s[0]; int... 阅读全文
posted @ 2018-05-25 13:26 gwj1139177410 阅读(110) 评论(0) 推荐(0) 编辑
摘要: problemsolutioncodes#include#include#includeusing namespace std;int a[30];int main(){ string str; cin>>str; for(int i = 0; i < ... 阅读全文
posted @ 2018-05-25 13:25 gwj1139177410 阅读(124) 评论(0) 推荐(0) 编辑
摘要: problemsolutioncodes//模拟即可#include#include#includeusing namespace std;struct node{ int id; string name; int end, peace, paper;/... 阅读全文
posted @ 2018-05-25 13:22 gwj1139177410 阅读(142) 评论(0) 推荐(0) 编辑
摘要: problemsolutioncodes#include#include#includeusing namespace std;string a[30], ans;bool cmp(string a, string b){ return a+b>b+a; }int m... 阅读全文
posted @ 2018-05-25 13:21 gwj1139177410 阅读(144) 评论(0) 推荐(0) 编辑
摘要: problemsolutioncodes#includeusing namespace std;typedef long long LL;LL exgcd(LL a, LL b, LL &x, LL &y){ if(!b){ x = 1, y = ... 阅读全文
posted @ 2018-05-25 13:18 gwj1139177410 阅读(77) 评论(0) 推荐(0) 编辑
摘要: problem有N个监狱(每个监狱一个犯人),编号1~N; 每个犯人有1种宗教信仰,编号1~M。相邻房间的人如果信仰相同,就会越狱。求可能发生越狱的方案数%100003。solution一、题解考虑用总方案数减去不会越狱的方案数:有m种信仰,n个监狱,那么总共有m^n... 阅读全文
posted @ 2018-05-25 13:17 gwj1139177410 阅读(114) 评论(0) 推荐(0) 编辑
选择