当前位置: 首页 > news >正文

延庆精神文明建设的门户网站海淀区城市建设档案馆网站

延庆精神文明建设的门户网站,海淀区城市建设档案馆网站,泸县城乡住房建设厅网站,泰安新浪乐居房产网https://ac.nowcoder.com/acm/contest/5667/J 题目大意#xff1a;给你一个置换A#xff0c;使得置换P^kA,让你求出置换P。 思路#xff1a;我们根据置换A再置换z次#xff0c;那么就等于置换p 置换z*k次,如果z*k%len0#xff0c;那么将会回到单位序列#xff0c;那我们…https://ac.nowcoder.com/acm/contest/5667/J 题目大意给你一个置换A使得置换P^kA,让你求出置换P。 思路我们根据置换A再置换z次那么就等于置换p 置换z*k次,如果z*k%len0那么将会回到单位序列那我们再置换一次则是置换p即是z*k%len1则z是k在模len下的逆元。我们求出A的每一个循环再求出z就可以求出该循环内的对应位置。因为满足gcdlenk1,那我们可以直接在循环中将i后移z个位置。 #include iostream #include cstdio #include fstream #include algorithm #include cmath #include deque #include vector #include queue #include string #include cstring #include map #include stack #include set #include cstdlib #define INF 0x3f3f3f3f3f3f3f3f #define inf 0x3f3f3f3f #define FILL(a,b) (memset(a,b,sizeof(a))) #define lson rt1 #define rson rt1|1 #define lowbit(a) ((a)-(a)) #define ios std::ios::sync_with_stdio(false);std::cin.tie(0);std::cout.tie(0); #define fi first #define sc second #define scd(a) scanf(%d,a) #define scdd(a,b) scanf(%d%d,a,b) #define scddd(a,b,c) scanf(%d%d%d,a,b,c) #define ac coutans\n #define pb push_back #define endl \n using namespace std; typedef long long ll; typedef unsigned long long ull; typedef pairll,ll pii; int dx[4] {-1,1,0,0},dy[4] {0,0,1,-1}; const ll mod998244353; const ll N 5e510; const ll M 250000; const double eps 1e-4; //const double piacos(-1); ll re(){ll x;scanf(%lld,x);return x; } ll n,k; int a[N]; int vis[N]; int b[N]; vectorint g; void gg(){ll lg.size(),p0;for(ll i0;il;i) if((i*k)%l1) {pi;break;}for(ll i0;il;i) b[g[i]]g[(ip)%l]; } void slove(){nre(),kre();for(int i1;in;i) a[i]re();for(int i1;in;i){if(vis[i]) continue;int xi;g.clear();while(!vis[x]){vis[x]1;g.pb(x);xa[x];}gg();}for(int i1;in;i) printf(%d ,b[i]); } int main(){int t1;// tre();while(t--) slove();return 0; }
http://www.yutouwan.com/news/499731/

相关文章:

  • 如何给网站配置域名高密建设局网站
  • 杭州网站开发建设在门户网站上爆光怎么做
  • 建设网站0基础需要学什么30秒网站
  • 广西百色建设局网站百度营销后台
  • 网站建设和使用情况网站模板下载器
  • 怎么在虚拟空间做两个网站建设宁波市分行的互联网网站
  • 翻译做网站怎么给自己的网站设置关键词
  • 济南机关建设网站网站界面是什么做的
  • 给网站网站做推广犯法网上怎样查询企业资质
  • 网站文案怎么做上海专业做网站的公司有哪些
  • canva可画在线设计平台网站怎么做seo优化啊
  • wordpress站点设置使用期限中国企业公示信息网
  • 网站建设及数据分析线上线下推广是什么意思
  • 牡丹江seo网站推广蜘蛛屯优化排名网站做一样没有侵权吧
  • 开发一套网站价格外贸推广信邮件
  • 网站主办者单位有效证件电子件是什么长沙微网站建设公司
  • 网站改版总结二级建造师证报考条件
  • 做网站预付款是多少wordpress黑暗
  • WordPress网站转HTPPS上传文件到网站
  • 做网站链接怎么做成都专业网站建设
  • 做高仿表网站容易被k吗深圳地铁
  • 建网站要备案深圳企业网站建设推广服务
  • 网站不维护会怎么样沧州网站运营
  • 扬州广陵区城乡建设局网站做app网站的公司
  • 外贸企业网站模版东莞购物网站建设
  • 华为网站建设建议浏览器打开mht文件乱码
  • 响应式布局代码怎么写seo搜索引擎优化推广
  • 网站建站 优化推广美词网站建设
  • 帮别人设计网站的网站吗建设工程安全监督备案网站
  • 不写代码做网站公司介绍怎么写