摘要: (m+n)%c=(m%c+n%c)%c; (19+4)%3=(19%3+4%3)%3; (m*n)%c=((m%c)*(n%c))%c; m^n%c=(m%c)^n%c; 3^11%8=(3^10 * 3^1)%8=((3^2)^5 * 3^1)%8=((8+1)^5 * 3^1)%8…… 阅读全文
posted @ 2016-09-09 12:15 俺叫王梦涵 阅读(143) 评论(0) 推荐(0) 编辑
摘要: int hmod(string a,int b)//高精度取余单精度 输出余数 { int temp=0; unsigned long len=a.length(); for(int i=0;i<len;i++) temp=(temp*10+a[i]-'0')%b; return temp; } 阅读全文
posted @ 2016-09-09 12:08 俺叫王梦涵 阅读(145) 评论(0) 推荐(0) 编辑
摘要: 作用是将数字转化为字符串 阅读全文
posted @ 2016-09-07 22:32 俺叫王梦涵 阅读(223) 评论(0) 推荐(0) 编辑
摘要: #include #include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std; typedef long long ll; int INF=2147483647; int inf=-2... 阅读全文
posted @ 2016-09-05 11:27 俺叫王梦涵 阅读(130) 评论(0) 推荐(0) 编辑
摘要: #include<bits/stdc++.h> using namespace std; typedef long long ll; //int INF=(1<<31)-1; //int mi=-(1<<31)+1; #define read(x) scanf("%d",&x); #define f 阅读全文
posted @ 2016-08-22 01:07 俺叫王梦涵 阅读(501) 评论(0) 推荐(0) 编辑
摘要: import java.util.Scanner; public class hello { public static void main(String[] args) { Scanner cin = new Scanner(System.in); { while(cin.hasNextIn... 阅读全文
posted @ 2016-08-15 11:31 俺叫王梦涵 阅读(1307) 评论(0) 推荐(0) 编辑
摘要: #include using namespace std; int main() { int n; cin>>n; cout<<__builtin_popcount(n)<<endl; } 阅读全文
posted @ 2016-08-14 00:32 俺叫王梦涵 阅读(131) 评论(0) 推荐(0) 编辑
摘要: B. Worms time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output It is lunch time for Mole. His f 阅读全文
posted @ 2016-08-13 23:00 俺叫王梦涵 阅读(165) 评论(0) 推荐(0) 编辑
摘要: A. Team Olympiad time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output The School №0 of the cap 阅读全文
posted @ 2016-08-09 23:09 俺叫王梦涵 阅读(148) 评论(0) 推荐(0) 编辑
摘要: Manao is trying to open a rather challenging lock. The lock has n buttons on it and to open it, you should press the buttons in a certain order to ope 阅读全文
posted @ 2016-08-08 22:16 俺叫王梦涵 阅读(158) 评论(0) 推荐(0) 编辑