随笔分类 - POJ
摘要:#include<iostream> #include<cstdio> #include<cstring> using namespace std; int main(){ int n,p; int i,j; scanf("%d",&n); bool data[101]; for(i=3;i<=10
阅读全文
摘要:#include<iostream> #include<cstdio> #define ll long long using namespace std; int main(){ ll a,m,n; scanf("%lld",&a);//b = a+m,c = a+n,mn = a*a+1 for(
阅读全文
摘要:#include<iostream> #include<cstdio> using namespace std; #define ll long long void gcd(ll a,ll b,ll&d,ll&x,ll&y){ if(!b){ d = a;x = 1;y = 0; } else{ g
阅读全文
摘要:#include<iostream> using namespace std; int main(){ int ansi,ansD,rgb[16][3],trgb[3]; for(int i=0;i<16;i++){ for(int j=0;j<3;j++){ cin>>rgb[i][j]; } }
阅读全文
摘要:#include<iostream> #include<cmath> using namespace std; int main(){ int n; double Vr,Vs,R,C,w; cin>>Vs>>R>>C>>n; while(n--){ cin>>w; Vr = Vs*w*C*R*(1/
阅读全文
摘要:#include<iostream> #include<cstring> using namespace std; int f[1005],l[105][505],r[105][505]; char c[105]; int main(){ int n,k,i,j,w[505],t,ans,ansi,
阅读全文
摘要:#include<iostream> #include<cstring> using namespace std; char s[205],ans[205]; int a[205],b[205],len[205]; int n; void transpose(){ memset(len,0,size
阅读全文
摘要:#include<iostream> #include<string> #include<stack> using namespace std; string a,url; stack<string>s1,s2; int main(){ s1.push("Ignored"); while(true)
阅读全文
摘要:#include<iostream> #include<cmath> #include<algorithm> using namespace std; int main(){ int n,d,kase=1,r; double p[1005][2],island[1005][2]; while(cin
阅读全文
摘要:#include<iostream> #include<vector> using namespace std; char a[5][5]; bool s[5][5]; int ans = 20,path[5][5],ans_path[5][5]; bool test(){ for(int i=0;
阅读全文
摘要:#include<iostream> #include<cstring> using namespace std; char a[27],b[27]; int L; struct Node{ int data; Node*left; Node*right; }; int find(int astar
阅读全文
摘要:#include<iostream> #include<cstring> #include<cmath> using namespace std; int*data; int len; void init(){ int n; for(n=2;n*n<=1000000;n++){ if(data[n]
阅读全文
摘要:#include<iostream> #include<cstdio> #include<cstring> #include<cmath> #include<ctime> using namespace std; bool data[1000005]; void init(){ data[1] =
阅读全文
摘要:#include<iostream> #include<cstring> using namespace std; int data[10]; void reverse(char*s,char*t){ for(int i=0;i<10;i++){ data[i] = 0; } for(int i=0
阅读全文
摘要:#include<iostream> #include<cmath> using namespace std; const int maxn = 32768; long long a[maxn],s[maxn]; void init(){ s[0] = 0; a[1] = s[1] = 1; for
阅读全文
摘要:#include<iostream> #include<cstring> #include<algorithm> using namespace std; int n,m; int dp[21][801],path[21][801]; int p[201],d[201],s[201],v[201];
阅读全文
摘要:#include<iostream> using namespace std; int d[5][5]; char c[5][5]; int mm = 65536; bool all = false; void change(int i,int j){ d[i][j] = 1-d[i][j]; if
阅读全文
摘要:#include<iostream> #include<cstring> using namespace std; const int maxn = 105; int n,dp[maxn][maxn],len1,len2; char data1[maxn],data2[maxn]; int val[
阅读全文
摘要:#include<iostream> using namespace std; const int maxn = 355; int n,data[maxn][maxn],dp[maxn]; int main(){ cin>>n; for(int i=1;i<=n;i++){ for(int j=1;
阅读全文
摘要:#include<iostream> using namespace std; const int maxn = 1005; int n,data[maxn],dp[maxn]; int main(){ ios::sync_with_stdio(false); cin.tie(0); cin>>n;
阅读全文