• 2024-09-05HDU 1729 Stone Game
    https://ac.nowcoder.com/acm/contest/34655/C有\(n\)个箱子,第\(i\)个箱子最多放\(s_i\)个石子,当前箱子里的石子数为\(c_i\)。两个人轮流往箱子里放石子,而且每一次放的数量都有限制:不能超过当前箱子内石子数的平方。例如箱子里有\(3\)颗石子,那么下一个人就可以放\(1-9\)
  • 2024-07-31部署STONE-CRM中小企业的客户关系管理系统
    Gitee地址https://gitee.com/xpliu2166/stone-crm?skip_mobile=true环境查看#cat/etc/redhat-releaseRockyLinuxrelease9.3(BlueOnyx)#uname-aLinuxRocky9StoneCrm0030805.14.0-362.18.1.el9_3.0.1.x86_64#1SMPPREEMPT_DYNAMICSunFeb1113:49:23UTC20
  • 2024-07-16CF141B Hopscotch 题解
    Hopscotch题面翻译有nnn个形状和大小都一致的正方体积木,积木堆积的样式是第一层只有一个正方体,然后上面就开始循环了,循环体为:第一层是一个正方体,第二层是两个正方体。
  • 2024-07-10[ABC361D]Go Stone Puzzle
    题目大意给定一个字符串S,它是由B和W组成,之后在S后面添加两个空格,可以将相邻的两个字符和空格进行交换,交换的前提是只能相邻,同时两个字符必须都是B或者W,再给一个字符串T,也是由B和W组成,问最小经过几次交换,使得S变成T\(1\leq|S|\leq14\)题解:看到数据范围,一看就知道是个搜索,怎
  • 2024-06-19基于QT和C++实现的中国象棋
    一,源码board.h#ifndefBOARD_H#defineBOARD_H#include<QWidget>#include"Stone.h"classBoard:publicQWidget{Q_OBJECTpublic:explicitBoard(QWidget*parent=0);bool_bRedTurn;//红方先走int_currentPlayer;//当前玩
  • 2024-05-19My favorite story(revised)
    Iwasaboywhothoughtlifewaspointless.Youcouldoftenhearmecomplainingtomyfather“Whatisthemeaningoflife?”Myfatherwouldalwayslookatmewithlovingeyes,butneveranswerdirectly.Onedaymyfatheraccidentallyfoundanordinarystone.H
  • 2024-05-19Narrative writing revision
    In221BCE,I-QinshihuangbecametheFirstEmperorofChina.AstorytellertoldmeaninterestingtaleaboutNuwa,theGreatMotherGoddess.Thenanideaappearedinmymind.Iwasdeterminedtofindtheloststone.Soitwouldhelpmebuildastrongempi
  • 2024-05-13My Favorite Story
    Iwasaboywhothoughtlifewaspointless.Youcouldoftenhearmecomplainingtomyfather“Whatisthemeaningoflife?”Myfatherwouldalwayslookatmewithlovingeyes,butneveranswerdirectly.Onedaymyfatherfoundanordinarystone.Hehandedtom
  • 2024-04-27A written script
    In221BCE,I-QinshihuangbecametheFirstEmperorofChina.AstorytellertoldmeaninterestingtaleaboutNuwa,theGreatMother Goddess.Thenanideaappearedinmymind.Iwas determined tofindtheloststone.Soitwouldhelpmebuildastrongempi
  • 2024-02-08ARC171 - sol
    感觉难度并不大,但是就是做不起,呜呜呜。中等题练少了是这样的。AtCoderRegularContest171-AtCoderA-NoAttackingThereisachessboardwith\(N\)rowsand\(N\)columns.Let\((i,j)\)denotethesquareatthe\(i\)-throwfromthetopandthe\(j\)-thco
  • 2023-09-22[JOI 2023 Final] Stone Arranging 2
    洛谷P9349题意一种区间覆盖操作,可以考虑直接无脑线段树,复杂度为\(O(nlog_n)\)。但是观察后发现可以开一个桶,记录这个数在序列中出现的最后一次的下标。循环扫一遍原序列,从小到大对于每一个a[i],使得下标i到m[a[i]]的区间全部覆盖为a[i]。每次覆盖一个小区间后,因为前面的区间已
  • 2023-08-28Codeforces Round 885 (Div. 2)E. Vika and Stone Skipping(数学,质因数分解)
    题目链接:https://codeforces.com/problemset/problem/1848/E 大致题意: 打水漂,某人在海岸线以f(正整数)的力量扔出石头,会在f,f+(f-1),f+(f-1)+(f-2),........,f+(f-1)+.....+2+1,的位置接触水面; 现在给出坐标x和q次询问,每次询问给出一个y值,将x=x*y;假设石头在x的位置接触水面,问有多少
  • 2023-08-15Lifting the Stone
    Smiling&Weeping----繁花落尽,我心中仍有花落的声音  一朵,一朵,在无人的山间轻轻飘落题目链接:1385--LiftingtheStone(poj.org)思路:将多边形三角剖分,计算出每个三角形的重心,三角形的重心是顶
  • 2023-07-17CodeForces 1848E Vika and Stone Skipping
    洛谷传送门CF传送门感觉比这场的F简单。发现我们要进行\(x\)不断乘一些数然后求答案的操作,猜测答案与\(x\)的因数有关。如果你对数字比较敏感,不难发现答案就是\(x\)的奇因子个数。官方题解的证明:设\(x=f+(f-1)+\cdots+(f-(c-1))\),由等差数列求和公
  • 2023-07-03P2895(未解决)
    这是一道略复杂的常规BFS题,但我想用DFS来解决,结果写出代码却总是主函数异常返回,不知哪里错了,检查半天也没发现,以后再看看吧。Code#include<iostream>#include<cstdio>#include<string>#include<vector>#include<algorithm>#include<cstdlib>#include<cmath>usingnamesp
  • 2023-05-31石子合并(GarsiaWachs算法)
    对于石子合并问题,有一个最好的算法,那就是GarsiaWachs算法。时间复杂度为O(n^2)。它的步骤如下:设序列是stone[],从左往右,找一个满足stone[k-1]<= stone[k+1]的k,找到后合并stone[k]和stone[k-1],再从当前位置开始向左找最大的j,使其满足stone[j]> stone[k]+stone[k-1],插到j的后面就
  • 2023-05-04Curling 2.0
     G-Curling2.0OnPlanetMM-21,aftertheirOlympicgamesthisyear,curlingisgettingpopular.Buttherulesaresomewhatdifferentfromours.Thegameisplayedonanicegameboardonwhichasquaremeshismarked.Theyuseonlyasinglestone.The
  • 2023-03-23C++重载递增和递减运算符
    重载递增和递减运算符在迭代器类中通常会实现递增运算符(++)和递减运算符(--),这两种运算符使得类可以在元素的序列中前后移动。C++语言并不要求递增和递减运算符必须是类
  • 2023-03-11A. Stone Game
    A.StoneGame代码点击查看代码#include<iostream>#include<vector>#include<algorithm>usingnamespacestd;intmain(){ intt; cin>>t; while(t--){
  • 2023-02-2659.类的自动转换和强制类型转换
    程序清单11.16stonewt.h#pragmaonce//stone.h--Stonewt类声明#ifndefSTONEWT_H_#defineSTONEWT_H_classStonewt{private: enum{Lbs_per_stn=14};//poun
  • 2023-02-15leetcode-10460-easy
    LastStoneWeightYouaregivenanarrayofintegersstoneswherestones[i]istheweightoftheithstone.Weareplayingagamewiththestones.Oneachtur
  • 2023-02-14C++PrimerPlus中文第六版第11章编程练习答案
    1、//vector.h#ifndefVECTOR_H_#defineVECTOR_H_#include<iostream>namespaceVECTOR{classVector{public:enumMode{RECT,POL};
  • 2023-02-08POJ--3009 Curling 2.0(DFS+减枝)
    记录23:412023-2-8http://poj.org/problem?id=3009reference:《挑战程序设计竞赛(第2版)》第二章练习题索引p135DescriptionOnPlanetMM-21,aftertheirOlympic
  • 2023-02-08拿石子dp
    每次从一开始或者最后拿,拿多的赢#include<iostream>usingnamespacestd;intstone[10];intdp[10][10];//从i到j两人数量差的最大值intmain(){intn;
  • 2023-02-07The Preliminary Contest for ICPC Asia Shanghai 2019 J. Stone game —— 退背包
     CSLlovesstonegames.Hehas nn stones;eachhasaweight a_iai.CSLwantstogetsomestones.Theruleisthatthepilehegetsshouldhaveahigherore