摘要:1 #include <iostream> 2 #include <algorithm> 3 #include <cstring> 4 #include <cstdio> 5 #include <bitset> 6 #include <vector> 7 #include <queue> 8 #in
阅读全文
02 2017 档案
摘要:1 #include <iostream> 2 #include <algorithm> 3 #include <cstring> 4 #include <cstdio> 5 #include <bitset> 6 #include <vector> 7 #include <queue> 8 #in
阅读全文
摘要:C++版本: 1 #include <bits/stdc++.h> 2 #define _xx ios_base::sync_with_stdio(0);cin.tie(0); 3 using namespace std; 4 typedef long long ll; 5 ll a, b; 6 b
阅读全文
摘要:1 #include <bits/stdc++.h> 2 #define exp 0.00001 3 using namespace std; 4 typedef long long ll; 5 6 double solve(double x, double y) 7 { 8 return 42*
阅读全文
摘要:1 #include<iostream> 2 #include<cstdio> 3 #include<cstring> 4 #include<algorithm> 5 6 using namespace std; 7 8 int n,m; 9 10 int main(){ 11 12 13 14 i
阅读全文
摘要:1 #include <iostream> 2 #include <cstdio> 3 #include <cmath> 4 #include <cstdlib> 5 #include <algorithm> 6 using namespace std; 7 8 int a[1005][1001]
阅读全文
摘要:1 #include<stdio.h> 2 #include<string.h> 3 int main() 4 { 5 int i,j,k,l,n,h,t,min,head,tail,num[1000]; 6 char a[1000]; 7 scanf("%d",&t); 8 for(j=0;j<t
阅读全文
摘要:1 #include <iostream> 2 #include <cstring> 3 #include <algorithm> 4 #include <set> 5 using namespace std; 6 7 set<string> out; 8 9 int main() 10 { 11
阅读全文
摘要:1 #include <bits/stdc++.h> 2 #define INF 0x3f3f3f3f 3 #define N 100000+5 4 typedef long long ll; 5 using namespace std; 6 7 int a[N]; 8 int main() 9 {
阅读全文
摘要:1 #include 2 #include 3 #include 4 #include 5 #include 6 #include 7 using namespace std; 8 9 struct node{ 10 int n,step; 11 node(){}; 12 node(int n,int step){ 13 this->n...
阅读全文
摘要:1 #include <bits/stdc++.h> 2 using namespace std; 3 typedef long long ll; 4 int main() 5 { 6 int T; 7 cin >> T; 8 for(int t = 1; t <= T; t++) 9 { 10 l
阅读全文
摘要:1 #include <cstdio> 2 #include <cstring> 3 #include <cstdlib> 4 #define N 111 5 char a[N]; 6 int main() 7 { 8 scanf("%s",a); 9 int len=strlen(a); 10 i
阅读全文
摘要:from:http://www.cnblogs.com/XDJjy/archive/2013/04/02/2995918.html
阅读全文
摘要:1 #include <iostream> 2 #include <cstdio> 3 #include <cmath> 4 #include <cstdlib> 5 #include <algorithm> 6 using namespace std; 7 int main() 8 { 9 int
阅读全文
摘要:版本一: 1 #include<bits/stdc++.h> 2 #define IO ios_base::sync_with_stdio(0);cin.tie(0); 3 using namespace std; 4 int prime[32770], phi[32770]; 5 int main
阅读全文
摘要:1 #include<stdio.h> 2 int main() 3 { 4 int n,a[30005],ans,i,j,k,m; 5 while(scanf("%d",&n)!=EOF) 6 { 7 ans=1; 8 for(i=0;i<n;i++) 9 a[i]=0; 10 //预处理,开始时
阅读全文
摘要:用栈优化: #include <stdio.h> #define MAXN 1000005 double stack[MAXN], temp; int n, top; int main() { while(scanf("%d", &n) != EOF) { top = 0; for(int i =
阅读全文
摘要:#include <stdio.h> bool col[15]; bool dia1[25], dia2[25]; //dia1用来标记满足x + y = i + j的坐标, dia2用了标记满足x - y = i - j的坐标 int ans, n, f[11]; void dfs(int row
阅读全文
摘要:题解By: Jstyle知识点一 要想三边满足构成三角形的条件有两个 1、任意两边之和大于第三边。 2、任意两边之差小于第三边。知识点二 假设三边为 a, b, c 且满足 a <= b <= c;那么只需要满足 a+b > c即可; 证明: 任意两边之和大于第三边: 因为 a <= b <= c,
阅读全文
摘要:第一种思路(by 陈奎学长) 第二种思路(by Album)
阅读全文
|