摘要: 地址 Problem - C - Codeforces 题意 每个格子,该格子和相邻的格子的值不能相同 题解 思维题, 先从1~n输出奇数,再输出偶数 代码 #include <iostream> #include <string> #include <algorithm> using namesp 阅读全文
posted @ 2021-05-07 17:28 la-la-wanf 阅读(34) 评论(0) 推荐(0) 编辑
摘要: 地址 Problem - C - Codeforces 题目 题意 一个学校有n个人参加比赛,他们分别属于ui队,每个人的能力值为si 当每个队需要1~n个人的时候,这个学校能参加的人的能力值和最大为多少 解析 map<int,vector<int>>存储不会爆 每一队直接处理出队伍人数为1~n时的 阅读全文
posted @ 2021-05-01 10:47 la-la-wanf 阅读(49) 评论(0) 推荐(0) 编辑
摘要: 位运算,使每个数&后,结果=0,思维题 阅读全文
posted @ 2021-04-29 15:58 la-la-wanf 阅读(71) 评论(0) 推荐(0) 编辑
摘要: 题目链接: Problem - B - Codeforces 题目 Example input 4 3 1 1 1 5 1 2 3 4 5 5 0 2 0 3 0 4 1 3 5 1 output 6 0 36 4 题意 给一串数,用这n个数排几种序列,使得 i=1~(n-1) 输出有几种序列满足情 阅读全文
posted @ 2021-04-28 11:40 la-la-wanf 阅读(65) 评论(0) 推荐(0) 编辑
摘要: 题目链接 Problem - 1433D - Codeforces 题目 美好的一天,从看不懂题目开始~~ Example input 4 5 1 2 2 1 3 3 1 1 1 4 1 1000 101 1000 4 1 2 3 4 output YES 1 3 3 5 5 4 1 2 NO YE 阅读全文
posted @ 2021-04-26 17:58 la-la-wanf 阅读(92) 评论(0) 推荐(0) 编辑
摘要: 题目链接: Problem - 1419B - Codeforces 题目 题意 给x个格子,你可以用这x个格子去拼成楼梯 好的楼梯的要求如下: 1. 第n列有n个格子 2. 这个楼梯的所有格子可以被划分为几个正方形,正方形的个数必须=n,一个正方形可以由至少一个格子组成 输出可以用x个格子去拼成几 阅读全文
posted @ 2021-04-26 13:19 la-la-wanf 阅读(85) 评论(0) 推荐(0) 编辑
摘要: “九韶杯”河科院程序设计协会第一届程序设计竞赛 D数列重组 next_permutation 题目 原题链接: https://ac.nowcoder.com/acm/contest/13493/D 知识点 boolnext_permutation(BidrectionalIterator firs 阅读全文
posted @ 2021-04-17 10:54 la-la-wanf 阅读(64) 评论(0) 推荐(0) 编辑
摘要: 题目 F : Four-tuples 输入 1 1 1 2 2 3 3 4 4 输出 1 题意 给l1, r1, l2, r2, l3, r3, l4, r4​ , 八个数据, 要求输出在区间[l1, r1] , [l2, r2] , [l3, r3] , [l4, r4​] (记为A, B, C, 阅读全文
posted @ 2021-04-07 20:56 la-la-wanf 阅读(73) 评论(0) 推荐(0) 编辑
摘要: 拉题链接 https://vjudge.net/contest/430219#overview 原题链接 https://codeforces.com/problemset/problem/299/C 题目 题意 先手有2n个数字, 后手也有2n个数字, 数字为0或1, 一人拿了一个数后, 另一人也 阅读全文
posted @ 2021-03-31 09:00 la-la-wanf 阅读(63) 评论(0) 推荐(0) 编辑
摘要: 拉题链接 https://vjudge.net/contest/430219#overview 原题链接 https://codeforces.com/problemset/problem/340/C 前言 cf 1600的题, 直接拿来给大一的做, 感觉有亿点点难, 这是个纯数学题, 我用的排列组 阅读全文
posted @ 2021-03-30 23:23 la-la-wanf 阅读(115) 评论(0) 推荐(1) 编辑