摘要: 0&1=0; 1&1=1; 2&1=0; 3&1=1; 十进制奇数&1是1,十进制偶数&1是0,一般一个数&1就是用来判断奇偶 false&false=false,true&true=true,true&false=false; 阅读全文
posted @ 2021-11-16 16:16 SmileSunlight 阅读(313) 评论(0) 推荐(0)
摘要: __int64 %I64d 阅读全文
posted @ 2021-03-26 00:23 SmileSunlight 阅读(35) 评论(0) 推荐(0)
摘要: #include<iostream>#include<algorithm>#include<cstring>#include<cstdio>using namespace std;const int N=1e6+10;int q[N]= {0},temp[N]={0};void merge_sort 阅读全文
posted @ 2020-06-13 11:58 SmileSunlight 阅读(110) 评论(0) 推荐(0)
摘要: 给定n组ai,bi , pi,对于每组数据,求出ai^bi mod pi 的值。 #include<iostream>#include<cstdio>typedef long long ll;using namespace std;int qmi(int a,int b,int p){ int re 阅读全文
posted @ 2020-06-09 11:10 SmileSunlight 阅读(102) 评论(0) 推荐(0)
摘要: l 是整除的符号,若整数a除以非零整数b,商为整数,且余数为零, 我们就说a能被b整除(或说b能整除a) 阅读全文
posted @ 2020-06-09 10:57 SmileSunlight 阅读(540) 评论(0) 推荐(0)
摘要: 题意:1<i<j<k<n; ak-aj=aj-ai; (1≤ai​≤10^9 ).; (1≤t≤10); (3≤n≤2000); t组,n个数,求满足题意的等式; 思路:ak=2ai-aj; ak>1;k>j>i; #include<iostream>#include<cstdio>#include 阅读全文
posted @ 2020-05-25 13:12 SmileSunlight 阅读(374) 评论(0) 推荐(0)
摘要: 如果a是非0的数,则为真; 如果a=0,则为假; 阅读全文
posted @ 2020-05-25 09:15 SmileSunlight 阅读(527) 评论(0) 推荐(0)
摘要: Presentation Error 是格式错误; 思路是正确的,可能多了空格,或者丢了换行。 阅读全文
posted @ 2020-05-19 07:59 SmileSunlight 阅读(444) 评论(0) 推荐(0)