Error Correction Time Limit: 1000MS   Memory Limit: 65536K Total Submissions: 6825   Accepted: 4289 Description A boolean matrix has the parity property when each row and each column has an even sum, i.e. contains an even number of bits which are set…
Error Correction Time Limit: 1000MS   Memory Limit: 65536K Total Submissions: 6014   Accepted: 3886 Description A boolean matrix has the parity property when each row and each column has an even sum, i.e. contains an even number of bits which are set…
简单题,但要考虑一些细节: 前导0不要,后导0不要,小数长度不一样时,有进位时,逆置处理输出 然后处理起来就比较麻烦了. 题目链接 我的代码纯模拟,把小数点前后分开来处理,写的很繁杂,纯当纪念——可怜我的眼睛. #include<string.h> #include<stdio.h> int i,la,lb,la1,lb1,la2,lb2,lc1,lc2,yi,temp; ],b[],a1[],a2[],b1[],b2[],c1[],c2[]; void nizhi1(){ ; c…
传送门 简单题 #include<bits/stdc++.h> using namespace std; struct node { double dan,weight; }a[]; bool cmp(node x,node y) { return x.dan<y.dan; } void init() { ;i<;i++) { a[i].dan=0.0;a[i].weight=0.0; } } int main() { int c; while(~scanf("%d&qu…
有一家生产酸奶的公司,连续n周,每周需要出货numi的单位,已经知道每一周生产单位酸奶的价格ci,并且,酸奶可以提前生产,但是存储费用是一周一单位s费用,问最少的花费. 对于要出货的酸奶,要不这一周生产,要不提前生产. 什么时候采用什么生产方式呢? 若第i周的货提前生产的话,假设在j周生产,则费用为(i-j)*s+c[j] 若c[i]>(i-j)*s+c[j],则更新c[i]=(i-j)*s+c[j] 更新要O(n^2)? 可以证明,最优的生产方式是,要不在这一周生产,要不在上一周生产(这里的上…
题目链接:https://www.luogu.org/problemnew/show/P5019 这道题目是一道模拟题,但是它有一点贪心的思想. 我们假设当前最大的深度是 \(d\) ,那么我们需要把所有深度为d的坑全都填成深度为 \(d-1\) ,然后去填深度为 \(d-1\) 的坑-- 实现代码如下(手动开启了O2优化,不然会TLE2组): #include <bits/stdc++.h> using namespace std; #pragma GCC optimize(2) const…
其实就是求总长度 - 一个最长“连续”自序列的长度 最长“连续”自序列即一个最长的lis,并且这个lis的值刚好是连续的,比如4,5,6... 遍历一遍,贪心就是了 遍历到第i个时,此时值为a[i],如果a[i]-1在前面已经出现过了,则len[a[i]] = len[a[i-1]]+1 否则len[a[i]] = 1 #include <cstdio> #include <algorithm> #include <cstring> #include <iostr…
New Year is coming, and Jaehyun decided to read many books during 2015, unlike this year. He has n books numbered by integers from 1 to n. The weight of the i-th (1 ≤ i ≤ n) book is wi. As Jaehyun's house is not large enough to have a bookshelf, he k…
The Third Cup is Free Time Limit: 12000/6000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 1811    Accepted Submission(s): 846 Problem Description Panda and his friends were hiking in the forest. They came across…
HECTF 我真是又菜又没时间肝题..又又又只水了波简单题... Reverse 1.Hello_Re file查一波 32bit,拖进IDA中 老规矩shift+F12 查看字符串: 跳转 F5查看 scanf("%s", &v4); if ( strlen(&v4) == 25 && judge0(&v4, 26) ) puts("Congratulations! You found the flag!"); 双击 jud…
unctf2020 水一波简单题..菜狗前来报道..大佬轻喷..如果有时间做题就好了呜呜呜 misc 1.baba_is_you 题目告诉我们,了解png文件格式. 下载得到一张png格式的图片. 用010editor打开查看,发现最后含有一个B站网址 https://www.bilibili.com/video/BV1y44111737 访问,查看评论区得到flag flag: unctf{let's_study_pwn} 2.阴阳人编码 下载得到一个pdf,里面文字全是 (阴阳怪气).仔细查…
2683: 简单题 Time Limit: 50 Sec  Memory Limit: 128 MBSubmit: 913  Solved: 379[Submit][Status][Discuss] Description 你有一个N*N的棋盘,每个格子内有一个整数,初始时的时候全部为0,现在需要维护两种操作: 命令 参数限制 内容 1 x y A 1<=x,y<=N,A是正整数 将格子x,y里的数字加上A 2 x1 y1 x2 y2 1<=x1<= x2<=N 1<=…
1176: [Balkan2007]Mokia Time Limit: 30 Sec  Memory Limit: 162 MBSubmit: 1854  Solved: 821[Submit][Status][Discuss] Description 维护一个W*W的矩阵,初始值均为S.每次操作可以增加某格子的权值,或询问某子矩阵的总权值.修改操作数M<=160000,询问数Q<=10000,W<=2000000. Input 第一行两个整数,S,W;其中S为矩阵初始值;W为矩阵大小…
Time Limit: 50 Sec  Memory Limit: 20 MBSubmit: 2185  Solved: 581 Description 你有一个N*N的棋盘,每个格子内有一个整数,初始时的时候全部为0,现在需要维护两种操作: 命令 参数限制 内容 1 x y A 1<=x,y<=N,A是正整数 将格子x,y里的数字加上A 2 x1 y1 x2 y2 1<=x1<= x2<=N 1<=y1<= y2<=N 输出x1 y1 x2 y2这个矩形内…
Time Limit: 50 Sec  Memory Limit: 128 MBSubmit: 1071  Solved: 428 Description 你有一个N*N的棋盘,每个格子内有一个整数,初始时的时候全部为0,现在需要维护两种操作: 命令 参数限制 内容 1 x y A 1<=x,y<=N,A是正整数 将格子x,y里的数字加上A 2 x1 y1 x2 y2 1<=x1<= x2<=N 1<=y1<= y2<=N 输出x1 y1 x2 y2这个矩形…
这样leetcode简单题都更完了,作为水题王的我开始要更新leetcode中等题和难题了,有些挖了很久的坑也将在在这个阶段一一揭晓,接下来的算法性更强,我就要开始分专题更新题目,而不是再以我的A题顺序来更新题目了.…
[BZOJ2683][BZOJ4066]简单题 试题描述 你有一个N*N的棋盘,每个格子内有一个整数,初始时的时候全部为0,现在需要维护两种操作: 命令 参数限制 内容 1 x y A 1<=x,y<=N,A是正整数 将格子x,y里的数字加上A 2 x1 y1 x2 y2 1<=x1<= x2<=N 1<=y1<= y2<=N 输出x1 y1 x2 y2这个矩形内的数字和 3 无 终止程序 输入 输入文件第一行一个正整数N. 接下来每行一个操作.每条命令除第…
L1-014. 简单题 时间限制 400 ms 内存限制 65536 kB 代码长度限制 8000 B 判题程序 Standard 作者 陈越 这次真的没骗你 —— 这道超级简单的题目没有任何输入. 你只需要在一行中输出事实:“This is a simple problem.”就可以了. #include<bits/stdc++.h> using namespace std; int main(){ printf("This is a simple problem.\n"…
4066: 简单题 Time Limit: 50 Sec  Memory Limit: 20 MBSubmit: 234  Solved: 82[Submit][Status][Discuss] Description 你有一个N*N的棋盘,每个格子内有一个整数,初始时的时候全部为0,现在需要维护两种操作: 命令 参数限制 内容 1 x y A 1<=x,y<=N,A是正整数 将格子x,y里的数字加上A 2 x1 y1 x2 y2 1<=x1<= x2<=N 1<=y1…
Ladygod Time Limit: 3000/1000MS (Java/Others)     Memory Limit: 65535/65535KB (Java/Others) Submit Status 有一天人诹Lee在随手帮女神做题,突然女神发现了自己演算纸上的一个式子,但是式子只有两个加数却没有结果,最近在学不同进制加减法的女神忘了这个两个数字是多少进制了(只记得是小于等于1010),但是她很好奇在可能的多少进制下这个式子得到的答案长度最长,为了从人赢Lee手中抢走女神,你需要快速…
题目: 平方和与立方和 Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 108212    Accepted Submission(s): 34915 Problem Description 给定一段连续的整数.求出他们中全部偶数的平方和以及全部奇数的立方和.   Input 输入数据包括多组測试实例,每组測试实例包括一行,由两个整数m和…
Codeforces 828B Black Square(简单题) Description Polycarp has a checkered sheet of paper of size n × m. Polycarp painted some of cells with black, the others remained white. Inspired by Malevich's "Black Square", Polycarp wants to paint minimum pos…
2683: 简单题 Time Limit: 50 Sec  Memory Limit: 128 MBSubmit: 1803  Solved: 731[Submit][Status][Discuss] Description 你有一个N*N的棋盘,每个格子内有一个整数,初始时的时候全部为0,现在需要维护两种操作: 命令 参数限制 内容 1 x y A 1<=x,y<=N,A是正整数 将格子x,y里的数字加上A 2 x1 y1 x2 y2 1<=x1<= x2<=N 1<…
BZOJ_3687_简单题_bitset Description 小呆开始研究集合论了,他提出了关于一个数集四个问题: 1.子集的异或和的算术和. 2.子集的异或和的异或和. 3.子集的算术和的算术和. 4.子集的算术和的异或和.     目前为止,小呆已经解决了前三个问题,还剩下最后一个问题还没有解决,他决定把 这个问题交给你,未来的集训队队员来实现. Input 第一行,一个整数n. 第二行,n个正整数,表示01,a2….,. Output 一行,包含一个整数,表示所有子集和的异或和. Sa…
3687: 简单题 Time Limit: 10 Sec  Memory Limit: 512 MB[Submit][Status][Discuss] Description 小呆开始研究集合论了,他提出了关于一个数集四个问题: 1.子集的异或和的算术和. 2.子集的异或和的异或和. 3.子集的算术和的算术和. 4.子集的算术和的异或和.     目前为止,小呆已经解决了前三个问题,还剩下最后一个问题还没有解决,他决定把 这个问题交给你,未来的集训队队员来实现. Input 第一行,一个整数n.…
#10117. 「一本通 4.1 练习 2」简单题     题目描述 题目来源:CQOI 2006 有一个 nnn 个元素的数组,每个元素初始均为 000.有 mmm 条指令,要么让其中一段连续序列数字反转——000 变 111,111 变 000(操作 111),要么询问某个元素的值(操作 222). 例如当 n=20n=20n=20 时,101010 条指令如下: 操作 回答 操作后的数组 1 1 101\ 1\ 101 1 10 N/A 11111111110000000000111111…
P4148 简单题 题意 维护单点加与矩形求和,强制在线 说明 \(n\le 500000,m\le 200000\),\(4000ms / 20MB\) kd-tree 复杂度我不懂 是一颗平衡树,每一层以某一维的大小决定权值,像替罪羊那样重构 Code: #include <cstdio> #include <cctype> #include <algorithm> #define ls ch[now][0] #define rs ch[now][1] using…
果然简单题,5分钟紫题++ 代码 #include <cstdio> #include <algorithm> #include <cstring> using namespace std; int tag[100100<<2],n,m; void pushdown(int o){ if(tag[o]){ tag[o<<1]^=1; tag[o<<1|1]^=1; tag[o]=0; } } void update(int L,int…
Problem Description The school set up three elective courses, assuming that these courses are A, B, C. N classes of students enrolled in these courses.Now the school wants to count the number of students who enrolled in at least one course in each cl…
简单题不简单-- 我们把单点加操作改成插入一个权值为增加量的点,将问题转化成询问一个矩阵中所有点的和,用 \(K-D\ Tree\) 维护,时间复杂度 \(O(n\sqrt{n})\) \(Code\ Below:\) // luogu-judger-enable-o2 #include <bits/stdc++.h> using namespace std; const int maxn=500000+10; const double alpha=0.75; int n,D,rt,cnt,t…