/ Vijos /

记录详情

Accepted

/in/foo.cc: In function 'std::__cxx11::string gethash(int)':
/in/foo.cc:40:16: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
  for (int i=0;i<go[k1].size();i++)
               ~^~~~~~~~~~~~~~
/in/foo.cc:44:16: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
  for (int i=1;i<=A.size();i++)
               ~^~~~~~~~~~
/in/foo.cc:45:8: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
   if (i==A.size()||A[i]!=A[i-1]){
       ~^~~~~~~~~~
/in/foo.cc:52:16: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
  for (int i=0;i<A.size();i++) ans+=A[i];
               ~^~~~~~~~~
/in/foo.cc: In function 'int getw(std::__cxx11::string)':
/in/foo.cc:57:16: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
  for (int i=0;i<K.length();i++) ans=ans*2+K[i]-'0';
               ~^~~~~~~~~~~
/in/foo.cc: In function 'std::__cxx11::string getsub(int, int, int)':
/in/foo.cc:62:16: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
  for (int i=0;i<go[k1].size();i++){
               ~^~~~~~~~~~~~~~
/in/foo.cc:64:17: warning: suggest parentheses around '-' inside '<<' [-Wparentheses]
   if ((key&(1<<j-1))&&j!=k2) A.push_back(getsub(j,k1,key));
                ~^~
/in/foo.cc:68:16: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
  for (int i=0;i<A.size();i++) ans+=A[i];
               ~^~~~~~~~~
/in/foo.cc: In function 'void dfs1(int, int)':
/in/foo.cc:74:16: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
  for (int i=0;i<go[k1].size();i++){
               ~^~~~~~~~~~~~~~
/in/foo.cc: In function 'void dfs2(int, int, int)':
/in/foo.cc:83:16: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
  for (int i=0;i<go[k1].size();i++){
               ~^~~~~~~~~~~~~~
/in/foo.cc: In function 'void getans(int)':
/in/foo.cc:95:2: warning: this 'for' clause does not guard... [-Wmisleading-indentation]
  for (int i=1;i<=n;i++) go[i].clear(); len=0,now=1; se=1;
  ^~~
/in/foo.cc:95:40: note: ...this statement, but the latter is misleadingly indented as if it is guarded by the 'for'
  for (int i=1;i<=n;i++) go[i].clear(); len=0,now=1; se=1;
                                        ^~~
/in/foo.cc:99:2: warning: this 'if' clause does not guard... [-Wmisleading-indentation]
  if (M[key]) return; num++; M[key]=num; 
  ^~
/in/foo.cc:99:22: note: ...this statement, but the latter is misleadingly indented as if it is guarded by the 'if'
  if (M[key]) return; num++; M[key]=num; 
                      ^~~
/in/foo.cc:102:16: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
  for (int i=0;i<sub.size();i++) 
               ~^~~~~~~~~~~
/in/foo.cc:107:17: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
   for (int j=0;j<go[i].size();j++){
                ~^~~~~~~~~~~~~
/in/foo.cc:111:17: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
   for (int j=0;j<go[i].size();j++)
                ~^~~~~~~~~~~~~
/in/foo.cc:129:18: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
    for (int j=0;j<B[i].size();j++)
                 ~^~~~~~~~~~~~
/in/foo.cc:157:37: warning: suggest parentheses around '-' inside '<<' [-Wparentheses]
   for (int j=1;j<=n;j++) if (i&(1<<j-1)) root=j;
                                    ~^~
/in/foo.cc: In function 'int getans(const std::vector<int>&, const std::vector<int>&, int)':
/in/foo.cc:190:2: warning: this 'for' clause does not guard... [-Wmisleading-indentation]
  for (int i=0;i<(1<<m);i++) dp[i]=0; dp[0]=1;
  ^~~
/in/foo.cc:190:38: note: ...this statement, but the latter is misleadingly indented as if it is guarded by the 'for'
  for (int i=0;i<(1<<m);i++) dp[i]=0; dp[0]=1;
                                      ^~
/in/foo.cc:191:16: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
  for (int i=0;i<A.size();i++)
               ~^~~~~~~~~
/in/foo.cc: In function 'int findfather(int)':
/in/foo.cc:212:2: warning: this 'if' clause does not guard... [-Wmisleading-indentation]
  if (father[k1]==k1) return k1; return father[k1]=findfather(father[k1]);
  ^~
/in/foo.cc:212:33: note: ...this statement, but the latter is misleadingly indented as if it is guarded by the 'if'
  if (father[k1]==k1) return k1; return father[k1]=findfather(father[k1]);
                                 ^~~~~~
/in/foo.cc: In function 'int main()':
/in/foo.cc:218:2: warning: this 'for' clause does not guard... [-Wmisleading-indentation]
  for (int i=1;i<=n;i++) father[i]=i; int rem=n;
  ^~~
/in/foo.cc:218:38: note: ...this statement, but the latter is misleadingly indented as if it is guarded by the 'for'
  for (int i=1;i<=n;i++) father[i]=i; int rem=n;
                                      ^~~
# 状态 耗时 内存占用
#1 Accepted 105ms 47.25 MiB
#2 Accepted 110ms 47.32 MiB
#3 Accepted 104ms 47.625 MiB
#4 Accepted 113ms 49.336 MiB
#5 Accepted 100ms 47.0 MiB
#6 Accepted 104ms 49.75 MiB
#7 Accepted 121ms 49.375 MiB
#8 Accepted 193ms 49.875 MiB
#9 Accepted 490ms 98.5 MiB
#10 Accepted 548ms 101.602 MiB

信息

递交者
类型
递交
题目
P2041 线图
语言
C++
递交时间
2018-03-23 01:51:01
评测时间
2018-03-23 01:51:01
评测机
分数
100
总耗时
1991ms
峰值内存
101.602 MiB