F.A.Q
Hand In Hand
Online Acmers
Problem Archive
Realtime Judge Status
Authors Ranklist
 
     C/C++/Java Exams     
ACM Steps
Go to Job
Contest LiveCast
ICPC@China
Best Coder beta
VIP | STD Contests
    DIY | Web-DIY beta
Author ID 
Password 
 Register new ID

View Compilation Error

0_0_16230230_9499.cpp:1:50: error: stray '#' in program
 <li class="alt"><span><span class="preprocessor">#include <stdio.h></span><span>  </span></span></li><li class=""><span><span class="preprocessor">#include <string.h></span><span>  </span></span></li><li class="alt"><span><span class="preprocessor">#include <iostream></span><span>  </span></span></li><li class=""><span><span class="preprocessor">#include <algorithm></span><span>  </span></span></li><li class="alt"><span><span class="preprocessor">#include <vector></span><span>  </span></span></li><li class=""><span><span class="preprocessor">#include <queue></span><span>  </span></span></li><li class="alt"><span><span class="preprocessor">#include <set></span><span>  </span></span></li><li class=""><span><span class="preprocessor">#include <map></span><span>  </span></span></li><li class="alt"><span><span class="preprocessor">#include <string></span><span>  </span></span></li><li class=""><span><span class="preprocessor">#include <math.h></span><span>  </span></span></li><li class="alt"><span><span class="preprocessor">#include <stdlib.h></span><span>  </span></span></li><li class=""><span><span class="keyword">using</span><span> </span><span class="keyword">namespace</span><span> std;  </span></span></li><li class="alt"><span><span class="preprocessor">#define inf 0x3f3f3f3f</span><span>  </span></span></li><li class=""><span><span class="preprocessor">#define mod 5201314</span><span>  </span></span></li><li class="alt"><span>  </span></li><li class=""><span><span class="datatypes">int</span><span> dp[2][505][505];  </span></span></li><li class="alt"><span><span class="datatypes">char</span><span> Map[505][505];  </span></span></li><li class=""><span>  </span></li><li class="alt"><span><span class="keyword">void</span><span> add(</span><span class="datatypes">int</span><span> &x,</span><span class="datatypes">int</span><span> y)  </span></span></li><li class=""><span>{  </span></li><li class="alt"><span>    x+=y;  </span></li><li class=""><span>    <span class="keyword">if</span><span>(x>=mod)x-=mod;  </span></span></li><li class="alt"><span>}  </span></li><li class=""><span>  </span></li><li class="alt"><span><span class="datatypes">int</span><span> main()  </span></span></li><li class=""><span>{  </span></li><li class="alt"><span>    <span class="datatypes">int</span><span> t;  </span></span></li><li class=""><span>    cin>>t;  </span></li><li class="alt"><span>    <span class="keyword">while</span><span>(t--)  </span></span></li><li class=""><span>    {  </span></li><li class="alt"><span>        <span class="datatypes">int</span><span> n;  </span></span></li><li class=""><span>        cin>>n;  </span></li><li class="alt"><span>        <span class="keyword">for</span><span>(</span><span class="datatypes">int</span><span> i=1;i<=n;i++)  </span></span></li><li class=""><span>        {  </span></li><li class="alt"><span>            scanf(<span class="string">"%s"</span><span>,Map[i]+1);  </span></span></li><li class=""><span>        }  </span></li><li class="alt"><span>        <span class="datatypes">int</span><span> p=0;  </span></span></li><li class=""><span>        memset(dp[p],0,<span class="keyword">sizeof</span><span>(dp[p]));  </span></span></li><li class="alt"><span>        dp[p][1][n]=Map[1][1]==Map[n][n];  </span></li><li class=""><span>        <span class="keyword">for</span><span>(</span><span class="datatypes">int</span><span> i=1;i<n;i++)  </span></span></li><li class="alt"><span>        {  </span></li><li class=""><span>            memset(dp[!p],0,<span class="keyword">sizeof</span><span>(dp[!p]));  </span></span></li><li class="alt"><span>            <span class="keyword">for</span><span>(</span><span class="datatypes">int</span><span> x1=1;x1<=i+1;x1++)  </span></span></li><li class=""><span>            {  </span></li><li class="alt"><span>                <span class="keyword">for</span><span>(</span><span class="datatypes">int</span><span> x2=n;x2>=n-i;x2--)  </span></span></li><li class=""><span>                {  </span></li><li class="alt"><span>                    <span class="datatypes">int</span><span> y1=i+2-x1;  </span></span></li><li class=""><span>                    <span class="datatypes">int</span><span> y2=2*n-i-x2;  </span></span></li><li class="alt"><span>                    <span class="keyword">if</span><span>(Map[x1][y1]!=Map[x2][y2])</span><span class="keyword">continue</span><span>;  </span></span></li><li class=""><span>                    add(dp[!p][x1][x2],dp[p][x1][x2]);  </span></li><li class="alt"><span>                    add(dp[!p][x1][x2],dp[p][x1][x2+1]);  </span></li><li class=""><span>                    add(dp[!p][x1][x2],dp[p][x1-1][x2+1]);  </span></li><li class="alt"><span>                    add(dp[!p][x1][x2],dp[p][x1-1][x2]);  </span></li><li class=""><span>                }  </span></li><li class="alt"><span>            }  </span></li><li class=""><span>            p^=1;  </span></li><li class="alt"><span>        }  </span></li><li class=""><span>        <span class="datatypes">int</span><span> ans=0;  </span></span></li><li class="alt"><span>        <span class="keyword">for</span><span>(</span><span class="datatypes">int</span><span> i=1;i<=n;i++)  </span></span></li><li class=""><span>        {  </span></li><li class="alt"><span>            add(ans,dp[p][i][i]);  </span></li><li class=""><span>        }  </span></li><li class="alt"><span>        cout<<ans<<endl;  </span></li><li class=""><span>    }  </span></li><li class="alt"><span>    <span class="keyword">return</span><span> 0;  </span></span></li><li class=""><span>}  </span></li>
                                                  ^
0_0_16230230_9499.cpp:1:163: error: stray '#' in program
 <li class="alt"><span><span class="preprocessor">#include <stdio.h></span><span>  </span></span></li><li class=""><span><span class="preprocessor">#include <string.h></span><span>  </span></span></li><li class="alt"><span><span class="preprocessor">#include <iostream></span><span>  </span></span></li><li class=""><span><span class="preprocessor">#include <algorithm></span><span>  </span></span></li><li class="alt"><span><span class="preprocessor">#include <vector></span><span>  </span></span></li><li class=""><span><span class="preprocessor">#include <queue></span><span>  </span></span></li><li class="alt"><span><span class="preprocessor">#include <set></span><span>  </span></span></li><li class=""><span><span class="preprocessor">#include <map></span><span>  </span></span></li><li class="alt"><span><span class="preprocessor">#include <string></span><span>  </span></span></li><li class=""><span><span class="preprocessor">#include <math.h></span><span>  </span></span></li><li class="alt"><span><span class="preprocessor">#include <stdlib.h></span><span>  </span></span></li><li class=""><span><span class="keyword">using</span><span> </span><span class="keyword">namespace</span><span> std;  </span></span></li><li class="alt"><span><span class="preprocesso


Hangzhou Dianzi University Online Judge 3.0
Copyright © 2005-2024 HDU ACM Team. All Rights Reserved.
Designer & Developer : Wang Rongtao LinLe GaoJie GanLu
Total 0.000000(s) query 1, Server time : 2024-11-23 09:55:10, Gzip enabled