JavaShuo
欄目
標籤
CF Codeforces Global Round 1 C Meaningless Operations /*^,&,gcd*/
時間 2021-01-13
欄目
C&C++
简体版
原文
原文鏈接
一開始打表,發了半天呆。。。。 後面手推了異或和與的性質,,發現 當a!=2^n-1(2^n-1剛好比a大時候取到n),只要選一個b,b滿足,a的二進制是1時,b的二進制是0,a的二進制是0時,b的二進制是1,這樣gcd(a^b,a&b)==2^n-1。所以當a!=2^n-1,答案爲2^n-1。 當a==2^n-1時,如果a除1和他本身,無因子,那麼答案爲1,否則答案爲最大因子。。 浪費好
>>阅读原文<<
相關文章
1.
CF-1110C-Meaningless Operations
2.
Codeforces Global Round 1
3.
Codeforces Global Round 6
4.
Codeforces Global Round 3
5.
【CF】Codeforces Round #423(Div.1)
6.
【CodeForces】Codeforces Global Round 9
7.
Codeforces Global Round 12
8.
Codeforces Global Round 13
9.
Codeforces Global Round 2
10.
cf Educational Codeforces Round 55 C. Multi-Subject Competition
更多相關文章...
•
SQL ROUND() 函數
-
SQL 教程
•
PHP round() 函數
-
PHP參考手冊
•
C# 中 foreach 遍歷的用法
•
Java 8 Stream 教程
相關標籤/搜索
meaningless
operations
round#1
global
gcd
CF Round #278
codeforces
1.c
c#1
C&C++
C#教程
PHP 7 新特性
MySQL教程
C#
0
分享到微博
分享到微信
分享到QQ
每日一句
每一个你不满意的现在,都有一个你没有努力的曾经。
最新文章
1.
gitlab4.0備份還原
2.
openstack
3.
深入探討OSPF環路問題
4.
代碼倉庫-分支策略
5.
Admin-Framework(八)系統授權介紹
6.
Sketch教程|如何訪問組件視圖?
7.
問問自己,你真的會用防抖和節流麼????
8.
[圖]微軟Office Access應用終於啓用全新圖標 Publisher已在路上
9.
微軟準備淘汰 SHA-1
10.
微軟準備淘汰 SHA-1
本站公眾號
歡迎關注本站公眾號,獲取更多信息
相關文章
1.
CF-1110C-Meaningless Operations
2.
Codeforces Global Round 1
3.
Codeforces Global Round 6
4.
Codeforces Global Round 3
5.
【CF】Codeforces Round #423(Div.1)
6.
【CodeForces】Codeforces Global Round 9
7.
Codeforces Global Round 12
8.
Codeforces Global Round 13
9.
Codeforces Global Round 2
10.
cf Educational Codeforces Round 55 C. Multi-Subject Competition
>>更多相關文章<<