摘要: C++指针 指针是一个变量,其值为另一个变量的地址。 指针变量声明的一般形式为: type *var-name; type是指针的基类型,它必须是一个有效的C++数据类型,var-name是指针变量的名称。 int *ip; double *dp; float *fp; char *ch; C++中 阅读全文
posted @ 2025-07-11 17:39 渝州炒鸡舞帝神兽大王 阅读(25) 评论(0) 推荐(0)
摘要: C++引用 引用变量是一个别名,它是某个已存在变量的另一个名字。 把引用初始化为某个变量,就可以使用该引用名称或变量名称来指向变量。 引用必须在定义时初始化,并且一旦绑定到一个变量后,就不能再绑定到其他变量。 int a=10; int &ref=a; //ref是a的引用,对ref的操作会直接作用 阅读全文
posted @ 2025-07-11 17:16 渝州炒鸡舞帝神兽大王 阅读(11) 评论(0) 推荐(0)
摘要: C.Sort 题目描述 You are given two strings and bof length n. Then, you are (forced against your will) to answer q queries. For each query, you are given a 阅读全文
posted @ 2025-05-19 15:28 渝州炒鸡舞帝神兽大王 阅读(25) 评论(0) 推荐(0)
摘要: D.Fun 题目描述 Given two integers n and x, find the number of triplets (a,b,c) of positive integers such that ab+ac+bc≤nand a+b+c≤x. Note that order matte 阅读全文
posted @ 2025-05-19 09:36 渝州炒鸡舞帝神兽大王 阅读(35) 评论(0) 推荐(0)
摘要: A.LCM Problem 题目描述 Let LCM(x,y) be the minimum positive integer that is divisible by both x and y. For example, LCM(13,37)=481 , LCM(9,6)=18. You are 阅读全文
posted @ 2025-05-19 08:57 渝州炒鸡舞帝神兽大王 阅读(70) 评论(0) 推荐(0)
摘要: A.Rudolf and the Ticket 题目描述 Rudolf is going to visit Bernard, and he decided to take the metro to get to him. The ticket can be purchased at a machin 阅读全文
posted @ 2025-05-19 08:18 渝州炒鸡舞帝神兽大王 阅读(58) 评论(0) 推荐(0)
摘要: A.Fafa and his Company 题目描述 Fafa owns a company that works on huge projects. There are n employees in Fafa's company. Whenever the company has a new p 阅读全文
posted @ 2025-05-18 22:40 渝州炒鸡舞帝神兽大王 阅读(27) 评论(0) 推荐(0)