
题解
文章平均质量分 56
墨墨墨小白
慵懒的小白君٩(๑`н´๑)۶
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
2020浙江工业大学程序设计迎新赛——决赛(重现赛)ACDGHIK题解
A-超级卷王C-01串(Hard Version)D-摸鱼G-抽卡H-AUG大师I -最小多边形K-画三角形原创 2021-01-02 21:37:36 · 711 阅读 · 0 评论 -
2020浙江工业大学程序设计迎新赛——决赛(重现赛)K-画三角形
题目Description为了在游戏领域一较长短,SteveSteveSteve 和 HuginHuginHugin 决定玩画三角形游戏。已知一个圆环上分布有 nnn 个不重复的点,SteveSteveSteve 和 HuginHuginHugin 每次都能在圆环上选择 333 个点,然后以这 333 个点为顶点画一个三角形,并且该三角形不能与任何已有的三角形相交或重合(包括顶点)。SteveSteveSteve 先手,当某个人无法画三角形的时候他就输了,请问两人都在最优策略下谁一定能取胜?Inpu原创 2021-01-02 21:32:01 · 397 阅读 · 1 评论 -
2020浙江工业大学程序设计迎新赛——决赛(重现赛)I -最小多边形
Description在二维平面上,给定一个左下角位于 (0,0)(0,0)(0,0) 点,右上角位于 (n,n)(n,n)(n,n) 点的正方形,请你在该矩形中找到一个面积最小的多边形,并且满足以下条件:该多边形是简单多边形(没有边自交的多边形,包括凸多边形和凹多边形);该多边形的每个顶点都是整点;给定正方形的每条边上都至少有一个多边形的顶点。请问这个多边形的最小面积?Input第一行输入一个正整数 TTT 表示数据组数。然后输入 T 行,每行 1 个正整数 n,表示给定正方形的边长。1原创 2021-01-02 21:24:38 · 410 阅读 · 0 评论 -
2020浙江工业大学程序设计迎新赛——决赛(重现赛)H-AUG大师
题目Description王辉是一名出色的CS:GO(一个射击游戏)选手,他擅长使用武器AUG,由于他对AUG的掌握程度十分之高,因此常常自称为AUG大师。有一天AUG大师遇上了另一个CS:GO选手wxswxswxs ,和王辉不同, wxswxswxs 擅长使用的,是所有的武器,毫无疑问王辉输给了 wxswxswxs 。于是王辉决心向 wxswxswxs 学习其他武器的用法。第一天,王辉新学习的武器是P90,为了降低他的学习难度,wxswxswxs也允许王辉使用他最爱的AUG。每种武器有两个属性,基础原创 2021-01-02 21:18:11 · 463 阅读 · 0 评论 -
2020浙江工业大学程序设计迎新赛——决赛(重现赛)G-抽卡
题目Description为了获得想要的五星人物,SuzukazeSuzukazeSuzukaze 想要抽卡!已知这个屑游戏的卡池中有n+mn+mn+m 件物品,其中 nn 件物品是四星人物角色卡,mmm 件物品是 SuzukazeSuzukazeSuzukaze 想要获得的五星人物角色卡。SuzukazeSuzukazeSuzukaze 每次抽卡都会从卡池中获得一件物品并且这件物品将不会再次被抽出,请问他期望在第几回合抽出五星角色卡?注:SuzukazeSuzukazeSuzukaze 只需要抽出原创 2021-01-02 21:10:20 · 387 阅读 · 0 评论 -
2020浙江工业大学程序设计迎新赛——决赛(重现赛)D-摸鱼
Description企鹅来到了海边寻找鱼群。他想摸正好nnn千克鱼。附近海中的鱼只有两个品种:重111千克的小鱼和重222千克的大鱼。海里有无限多的这两种鱼。企鹅摸到第一种鱼要花费aaa点体力,摸到第二种鱼要花费bbb点体力。企鹅想尽可能节省体力。你的任务是找出他最少需要花费多少点体力,能摸到正好nn千克鱼。Input第一行输入一个正整数TT,代表数据组数。每组数据输入三个正整数n,a,b,分别表示企鹅需要多少千克鱼,摸第一种鱼消耗的体力和摸第二种鱼消耗的体力。1≤T≤5001 \le T原创 2021-01-02 21:05:22 · 358 阅读 · 0 评论 -
2020浙江工业大学程序设计迎新赛——决赛(重现赛)C-01串(Hard Version)
题目Description给定一个只包含 0,10,1 两种字符的字符串 ss ,然后定义一个函数 f(d)f(d) 表示字符串 ss 中距离为 dd 的不同字符对 (si,si+d)(s_i,s_{i+d})(si,si+d)的对数。求 ∑d=1kf(d)\sum^{k}_{d=1}f(d)∑d=1kf(d)Input输入两行。第一行输入一个正整数 kkk。第二行输入一个字符串 sss。1≤k<∣s∣1≤k<∣s∣1≤k<∣s∣∣s∣≤5×105|s| \leq 5原创 2021-01-02 21:00:18 · 433 阅读 · 0 评论 -
2020浙江工业大学程序设计迎新赛——决赛(重现赛)A 超级卷王
题目Description内卷指不能从外部渠道获取资源,没有产生整体的增量,只能在存量分配上做文章,往往损害内部一部分甚至绝大多数群体利益来补偿少数群体的利益,最终整体利益没有增加,持续性内耗的一种状态。内卷本身是个艰难晦涩的社会学专用名词,今天之所以能成为热搜,都是因为今天内卷是很多人今天可以亲身感受到的社会现象。“内卷”被现在很多高校学生来指代非理性的内部竞争或“被自愿”竞争,这种风气已经逐渐蔓延到中小学甚至幼儿园。已知浙江工业大学幼儿园今年有 n 名新生入学,每名同学会有以下属性:编号 id原创 2021-01-02 20:52:47 · 544 阅读 · 0 评论 -
团体程序设计天梯赛 L2-035 完全二叉树的层序遍历 (25分)
题目一个二叉树,如果每一个层的结点数都达到最大值,则这个二叉树就是完美二叉树。对于深度为 D 的,有 N 个结点的二叉树,若其结点对应于相同深度完美二叉树的层序遍历的前 N 个结点,这样的树就是完全二叉树。给定一棵完全二叉树的后序遍历,请你给出这棵树的层序遍历结果。输入格式:输入在第一行中给出正整数 N(≤30),即树中结点个数。第二行给出后序遍历序列,为 N 个不超过 100 的正整数。同一行中所有数字都以空格分隔。输出格式:在一行中输出该树的层序遍历序列。所有数字都以 1 个空格分隔,行首尾原创 2021-01-02 17:20:30 · 704 阅读 · 0 评论 -
第 45 届国际大学生程序设计竞赛(ICPC)亚洲区域赛(济南)D-Fight against involution
题目MianKing chose a course in this semester. There are nn students in this course, and everyone needs to write a final paper. Let wiw_iwidenote the word count of the i-th student’s final paper.The i-th student has a lower bound LiL_iLiand an upper bound原创 2020-12-28 21:15:53 · 984 阅读 · 5 评论 -
第 45 届国际大学生程序设计竞赛(ICPC)亚洲区域赛(济南)C-Stone Game
题目题目描述MianKing has nn piles of stones and each pile has at most 3 stones, now he wants to merge all of these stones into one pile.In order to achieve his goal, each time MianKing can choose two piles of stones and merge them into a new pile, and the num原创 2020-12-27 21:39:17 · 1424 阅读 · 0 评论 -
第 45 届国际大学生程序设计竞赛(ICPC)亚洲区域赛(济南)G-Xor Transformation
题目MianKing has one integer XXX, he wants to perform some operations to transform XXXto YYY(Y<X)(Y<X)(Y<X)In each operation, MianKing can choose one integer 0≤A<X0\leq A<X0≤A<X and let X=X xor AX=X~xor~AX=X xor A.It’s原创 2020-12-27 18:08:55 · 643 阅读 · 3 评论 -
第 45 届国际大学生程序设计竞赛(ICPC)亚洲区域赛(济南)M-Cook Pancakes!
题目In China, there is a very famous problem about pancakes: You have a pan and you can fry two pancakes at the same time each time. For a pancake, its front and back sides need to be cooked, and it takes one hour for each side to be cooked.So how long doe原创 2020-12-27 17:48:49 · 797 阅读 · 1 评论 -
第 45 届国际大学生程序设计竞赛(ICPC)亚洲区域赛(济南)(热身赛) C-GPA
题目In this term, Alice took nn courses. Now, she has finished all final exams, and she will get her grades in the following nn days.On the i-th day, Alice will know her grade of the i-th course, denoted as AiA_iAiis strictly less than the average grade o原创 2020-12-27 00:57:46 · 736 阅读 · 0 评论 -
第 45 届国际大学生程序设计竞赛(ICPC)亚洲区域赛(济南)(热身赛) B-Four Xor
题目There is a sequence A1...nA_{1...n}A1...n, you need to answer whether there are 4 integers x,y,z,wx,y,z,w satisfying 1≤x<y<z<w≤n1\leq x<y<z<w\leq n1≤x<y<z<w≤n and Ax⊕Ay⊕Az⊕Aw=0A_x\oplus A_y\oplus A_z\oplus A_w=0Ax⊕Ay⊕Az⊕A原创 2020-12-27 00:14:23 · 684 阅读 · 4 评论 -
第 45 届国际大学生程序设计竞赛(ICPC)亚洲区域赛(济南)(热身赛) A 2020
2020 is a special integer, it’s formed of two same integers (20 and 20).We call a number is a good number, if and only if it can be formed of two same integers(without leading zero).For example: 2020 11, 19991999 are good numbers, but 303, 1122, 1221 are原创 2020-12-27 00:04:34 · 1925 阅读 · 1 评论 -
第 45 届国际大学生程序设计竞赛(ICPC)亚洲区域赛(上海)D Walker
题目As a world-famous traveler, Prof. Pang’s research interest is to travel as many places as possible in his life.We have a segment {[0, n]}[0,n]. There are two travelers on it. The first one is on position p1p_1p1withvelocity v1v_1v1(which means s/he c原创 2020-12-25 23:26:34 · 1109 阅读 · 0 评论 -
第 45 届国际大学生程序设计竞赛(ICPC)亚洲区域赛(上海)B Mine Sweeper II
题目A mine-sweeper map {X}X can be expressed as an n\times mn×m grid. Each cell of the grid is either a mine cell or a non-mine cell. A mine cell has no number on it. Each non-mine cell has a number representing the number of mine cells around it. (A cell i原创 2020-12-25 23:21:52 · 492 阅读 · 0 评论 -
第 45 届国际大学生程序设计竞赛(ICPC)亚洲区域赛(上海)M Gitignore
题目Your git project (you don’t need to be familiar with git to solve this problem) has some files that should be ignored from synchronizing. You need to calculate the minimum number of lines needed for gitignore.Formally, your project is a folder. A folde原创 2020-12-25 23:15:54 · 508 阅读 · 1 评论 -
第 45 届国际大学生程序设计竞赛(ICPC)亚洲区域赛(上海)G Fibonacci
题目In mathematics, the Fibonacci numbers, commonly denoted as f_nfn , is a sequence such that each number is the sum of the two preceding numbers, starting with 1{1}1 and 1{1}1. That is, f1=1,f2=1f_1=1,f_2 =1f1=1,f2=1 and fn=fn−2+fn−1 (n≥3)f_n =原创 2020-12-25 23:00:45 · 850 阅读 · 0 评论 -
第 45 届国际大学生程序设计竞赛(ICPC)亚洲区域赛(南京)E Evil Coordinate
题目链接:https://ac.nowcoder.com/acm/contest/10272/E来源:牛客网题目描述A robot is standing on an infinite 2-dimensional plane. Programmed with a string s1s2⋯sns_1s_2\cdots s_ns1s2⋯snof length n, where si∈{’U’,’D’,’L’,’R’}s_i \in \{\text{'U'}, \text{'D'}, \text{原创 2020-12-21 17:03:43 · 791 阅读 · 0 评论 -
第 45 届国际大学生程序设计竞赛(ICPC)亚洲区域赛(南京)L Let‘s Play Curling
题目题目描述Curling is a sport in which players slide stones on a sheet of ice toward a target area. The team with the nearest stone to the center of the target area wins the game.Two teams, Red and Blue, are competing on the number axis. After the game there原创 2020-12-21 16:44:54 · 1151 阅读 · 1 评论 -
第 45 届国际大学生程序设计竞赛(ICPC)亚洲区域赛(南京)K Co-prime Permutation
题目Kotori is very good at math (really?) and she loves playing with permutations and primes.One day, she thinks of a special kind of permutation named kk co-prime permutation. A permutation p1,p2,⋯ ,pnp_1,p_2,\cdots,p_np1,p2,⋯,pn of nn is called a k原创 2020-12-21 16:23:13 · 1262 阅读 · 0 评论 -
牛客练习赛74AB
文章目录A CCA的数列B CCA的字符串A CCA的数列题目链接:https://ac.nowcoder.com/acm/contest/9700/A来源:牛客网题目描述给定一个长度为 n 数列,判断其是否为“牛”的,是则输出“YES”,否则输出“NO”。一个数列是“牛”的,当且仅当其满足以下三个条件中至少一个:1、这个数列是等差数列2、这个数列是等比数列3、这个数列是等模数列。等差数列和等比数列的定义如果不清楚建议百度或重上小学(划掉),等模数列的定义是:对于任意相邻两数,后一个对原创 2020-12-20 22:41:50 · 1240 阅读 · 0 评论 -
Codeforces Round #691 (Div. 2)
文章目录A. Red-Blue ShuffleB. Move and TurnC. Row GCDA. Red-Blue Shuffle题目There are n cards numbered 1,…,n. The card i has a red digit ri and a blue digit bi written on it.We arrange all n cards in random order from left to right, with all permutations of原创 2020-12-19 22:54:25 · 1428 阅读 · 6 评论 -
Educational Codeforces Round 100 (Rated for Div. 2) 题解
文章目录A. DungeonB. Find The ArrayC. Busy RobotA. Dungeon题目You are playing a new computer game in which you have to fight monsters. In a dungeon you are trying to clear, you met three monsters; the first of them has a health points, the second has b health原创 2020-12-18 19:50:09 · 627 阅读 · 0 评论 -
Codeforces Round #690 (Div. 3) 题解(A-E2)
文章目录A. Favorite Sequence题目input & output题意思路代码B. Last Year's Substring题目input & output题意思路代码C. Unique Number题目input & output题意思路代码D. Add to Neighbour and Remove题目input & output题意思路代码E2. Close Tuples (hard version)题目input & output题意思路代码E原创 2020-12-16 22:37:30 · 1249 阅读 · 1 评论 -
C题 Kuroni and Impossible Calculation
题目To become the king of Codeforces, Kuroni has to solve the following problem.He is given n numbers a1,a2,…,an. Help Kuroni to calculate ∏1≤i<j≤n|ai−aj|. As result can be very big, output it modulo m.If you are not familiar with short notation, ∏1≤i&原创 2020-05-30 19:36:10 · 347 阅读 · 0 评论 -
Codeforces Round #643 (Div. 2)
A - Sequence with DigitsLet’s define the following recurrence:an+1=an+minDigit(an)⋅maxDigit(an).Here minDigit(x) and maxDigit(x) are the minimal and maximal digits in the decimal representation of x without leading zeroes. For examples refer to notes.Y原创 2020-05-18 21:16:39 · 538 阅读 · 0 评论 -
凉脾的比赛补题和题解
文章目录A Kattis drmmessages题目题意思路代码B - Game of Throwns题目题意思路代码C - Sheba's Amoebas题目题意思路代码A Kattis drmmessages题目DRM Encryption is a new kind of encryption. Given an encrypted string (which we’ll call ...原创 2020-02-07 20:27:18 · 756 阅读 · 0 评论 -
凉肝的比赛补题和题解
A-C题原创 2020-01-18 15:04:43 · 398 阅读 · 0 评论 -
Round 80 (Rated for Div.2)
文章目录Deadline CodeForces - 1288A题目题意思路代码Yet Another Meme Problem CodeForces - 1288B题目题意思路代码Deadline CodeForces - 1288A题目Adilbek was assigned to a special project. For Adilbek it means that he has n...原创 2020-01-18 15:02:19 · 409 阅读 · 0 评论 -
凉心的比赛(一)补题和题解
题目链接文章目录前置知识神圣之灵心灵之火A - 最小的二进制数 CodeForces - 976A题目题意思路代码B - 线段的包含关系 CodeForces - 976C题目题意思路代码C - 地下城还有劳拉 CodeForces - 976B题目题意思路代码D - 心火牧日常计算 CodeForces - 976E题目题意思路代码E - 法法在分配工作 CodeForces - 935...原创 2020-01-17 23:39:33 · 1392 阅读 · 0 评论 -
Codeforces Round #613 (Div. 2)A-C
文章目录A - Mezo Playing Zoma题目题意思路代码B - Just Eat It!题目题意思路代码C - Fadi and LCM题意思路代码A - Mezo Playing Zoma题目Today, Mezo is playing a game. Zoma, a character in that game, is initially at position x=0. M...原创 2020-01-15 21:39:35 · 382 阅读 · 0 评论 -
codeforce Hello 2020
文章目录A. New Year and Naming题目题意思路代码B. New Year and Ascent Sequence题目题意思路代码A. New Year and Naming题目Happy new year! The year 2020 is also known as Year Gyeongja (경자년, gyeongja-nyeon) in Korea. Where ...原创 2020-01-05 18:28:54 · 748 阅读 · 0 评论 -
题 解 集
把题解整理下来 便于查看青蛙的约会2019-2020新生训练class 1- 熟悉oj的使用方法&&贪心洛谷P2678 跳石头(二分答案)从入门到头秃周末休闲赛4从入门到头秃周末休闲赛5新生训练赛001题解新生训练赛002题解...原创 2020-01-05 02:50:10 · 449 阅读 · 0 评论 -
新生训练赛002题解
B - Is it beautiful?题目You are given a permutation p=[p1,p2,…,pn] of integers from 1 to n. Let’s call the number m (1≤m≤n) beautiful, if there exists two indices l,r (1≤l≤r≤n), such that the numbers ...原创 2020-01-05 02:43:03 · 1185 阅读 · 0 评论 -
新生训练赛001题解
C - Choosing Symbol Pairs CodeForces - 50B题目There is a given string S consisting of N symbols. Your task is to find the number of ordered pairs of integers i and j such that1 ≤ i, j ≤ NS[i] = ...原创 2019-12-20 21:38:41 · 1279 阅读 · 0 评论 -
从入门到头秃周末休闲赛5
这场白给了做了4道题原创 2019-12-08 13:56:56 · 213 阅读 · 0 评论 -
从入门到头秃周末休闲赛4
周末一位朋友喊我打了一场比赛 我觉得比较有意思 就把它记录一下把~A - 高橋くんの集計 AtCoder - 1014题目高橋くんは、上司から会社で作っている N 個のソフトウェアに平均でどれくらいのバグがあるか調べろただし、バグがないソフトは調査母数に含めるなと指示されました。しかも、上司は小数が嫌いです。とはいえ、バグ数の平均値を過小報告するわけにもいかないので、値を切り上げて...原创 2019-12-02 22:53:40 · 999 阅读 · 0 评论