
AcWing竞赛题练习
y总周赛
JIngles123
生命不息,奋斗不止
展开
-
AcWing 4411. 三仙归洞(AcWing杯 - 第48场周赛)- 中等、周期
题目链接:https://www.acwing.com/problem/content/4414/ 题目如下: /* 结论:2*(10^9) 常使用两种解决办法 1、快速幂+矩阵乘 2、循环 本题的初始状态为0 1 2,经过每轮操作得到的结果如下 第一轮 1 0 2 第二轮 1 2 0 第三轮 2 1 0 第四轮 2 0 1 第五轮 0 2 1 第原创 2022-05-02 15:20:48 · 440 阅读 · 0 评论 -
AcWing 4410. 吃鸡蛋(AcWing杯 - 第48场周赛)- 简单、模拟、枚举
题目链接:https://www.acwing.com/problem/content/description/4413/ 题目如下: #include<iostream> using namespace std; int n,m; int main(){ cin>>n>>m; int day=0; while(n!=0){ day++; n--; if(day%m==0) n++;原创 2022-04-24 11:53:52 · 314 阅读 · 0 评论 -
AcWing 4401. 找回数组(AcWing杯 - 第47场周赛)- 中等、枚举、差分
题目链接:https://www.acwing.com/problem/content/4404/ 题目如下: #include <iostream> #include <vector> using namespace std; const int N=1100; int n,a[N]; int main(){ //由题整理可得a[i]-a[i-1]=x[(i-1)%k],k的值在1~n之间 //由题推导得:第k个值和第k个以前的值是相等的!!原创 2022-04-20 20:59:17 · 365 阅读 · 0 评论 -
AcWing 4400. 玩游戏(AcWing杯 - 第47场周赛)- 中等、约瑟夫环问题、模拟、队列
题目链接:https://www.acwing.com/problem/content/description/4403/ 题目如下: #include<iostream> #include<queue> using namespace std; int n,k; int main(){ cin>>n>>k; queue<int> que; for(int i=1;i<=n;i++) que.push(原创 2022-04-19 22:37:26 · 1933 阅读 · 0 评论 -
AcWing 4399. 数字母(AcWing杯 - 第47场周赛)- 简单、模拟、字符串处理、哈希表
题目链接:https://www.acwing.com/problem/content/description/4402/ 题目如下: #include<iostream> #include<string> #include<unordered_set> #include<cctype> using namespace std; //注意:本题是输入一行字符串,每输入一个就判断一个,而不是全部输入完成再去判断 int main(){ unorde原创 2022-04-19 16:43:35 · 167 阅读 · 0 评论