随笔分类 -  算法竞赛入门经典

刘汝佳的白皮书
摘要:#include#include#includeusing namespace std;int main(){ int n; double p; while(cin >> n >> p) { printf("%.0f\n",pow(p,1.0/n)); }... 阅读全文
posted @ 2015-07-18 19:15 杨永华 阅读(106) 评论(0) 推荐(0)
摘要:import java.util.Scanner;import java.math.BigInteger;public class Main{ public static void main(String[] args){ Scanner in = new Scanner(Sys... 阅读全文
posted @ 2015-07-17 22:13 杨永华 阅读(147) 评论(0) 推荐(0)
摘要:import java.util.Scanner;import java.math.BigDecimal;public class Main{ public static void main(String[] args){ Scanner in = new Scanner(System.in); ... 阅读全文
posted @ 2015-07-17 20:19 杨永华 阅读(176) 评论(0) 推荐(0)
摘要:#include#include#include#include#includeusing namespace std;const int MIN = -1u >> 1;int main(){ double a,b; char s1[1000],s2[1000]; char c; ... 阅读全文
posted @ 2015-07-17 10:01 杨永华 阅读(141) 评论(0) 推荐(0)
摘要://简单大数相乘,用java很简单import java.util.Scanner;import java.math.BigInteger;public class Main{ public static void main(String[] args){ Scanner in = new Sca... 阅读全文
posted @ 2015-07-16 23:30 杨永华 阅读(138) 评论(0) 推荐(0)
摘要:#include#include#include#includeusing namespace std;int main(){ char a[110][110]; int result[110]; int num = 0,index; memset(a,'a',sizeof(... 阅读全文
posted @ 2015-07-16 23:21 杨永华 阅读(128) 评论(0) 推荐(0)
摘要:#include#include#include#include#includeusing namespace std;string pa[22];string des;int main(){ int n; while(cin >> n && n != 0){ cin.ig... 阅读全文
posted @ 2015-07-16 20:26 杨永华 阅读(131) 评论(0) 推荐(0)
摘要:#include#include#include#include#includeusing namespace std;char codes[9][12];int k = 1,num;bool solve(){ for(int i = 0; i strlen(codes[i])){ ... 阅读全文
posted @ 2015-07-16 19:51 杨永华 阅读(118) 评论(0) 推荐(0)
摘要:#include#include#include#include#includeusing namespace std;char word[5001*201][201];int cmp(const void *a,const void *b){ return strcmp((char*)a ,... 阅读全文
posted @ 2015-07-16 17:26 杨永华 阅读(87) 评论(0) 推荐(0)
摘要:#include#include#include#include#includeusing namespace std;/*每行'o'表示1,' '表示0,二进制转换为十进制是ASCII码*/int main(){ string s; getline(cin,s); while(g... 阅读全文
posted @ 2015-07-16 13:56 杨永华 阅读(117) 评论(0) 推荐(0)
摘要:#include#include#include#include#includeusing namespace std;int main(){ int T, k = 1; double U, I, P; cin >> T; cin.ignore(); string s;... 阅读全文
posted @ 2015-07-16 11:13 杨永华 阅读(144) 评论(0) 推荐(0)
摘要:#include#include#include#includeusing namespace std;char str1[105],str2[105];string s2,s4;int main(){ int n; cin >> n; getchar(); while(n-... 阅读全文
posted @ 2015-07-16 10:10 杨永华 阅读(152) 评论(0) 推荐(0)
摘要:#include#include#includeusing namespace std;char a[55][55];string s[22];int T,m,n,k;int mx[] = {1, 1, 1, 0, 0, -1, -1, -1}; //定义8个方向int m... 阅读全文
posted @ 2015-07-16 01:34 杨永华 阅读(162) 评论(0) 推荐(0)
摘要:#include、#includeusing namespace std;int main(){ char a[36] = {'A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T 阅读全文
posted @ 2015-07-15 22:52 杨永华 阅读(123) 评论(0) 推荐(0)