/ Vijos /

记录详情

Compile Error

foo.cc:3:17: error: 'sta' is not a namespace-name
    3 | using namespace sta;
      |                 ^~~
foo.cc: In function 'int Switch(int, int)':
foo.cc:18:1: warning: no return statement in function returning non-void [-Wreturn-type]
   18 | }
      | ^
foo.cc: In function 'int spy()':
foo.cc:43:21: error: 'i' was not declared in this scope
   43 |                 for(i=0;i<5;i++)
      |                     ^
foo.cc:45:25: warning: this 'if' clause does not guard... [-Wmisleading-indentation]
   45 |                         if(arr[4][i]=='0')
      |                         ^~
foo.cc:47:33: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'if'
   47 |                                 break;
      |                                 ^~~~~
foo.cc:49:29: error: 'min' was not declared in this scope; did you mean 'std::min'?
   49 |                 if(flag)ans=min(ans,sum);
      |                             ^~~
      |                             std::min
In file included from /nix/store/l4dvshb0bw0ipyx17f6rknzk83mdx81y-gcc-11.3.0/include/c++/11.3.0/bits/char_traits.h:39,
                 from /nix/store/l4dvshb0bw0ipyx17f6rknzk83mdx81y-gcc-11.3.0/include/c++/11.3.0/ios:40,
                 from /nix/store/l4dvshb0bw0ipyx17f6rknzk83mdx81y-gcc-11.3.0/include/c++/11.3.0/ostream:38,
                 from iostream:39:
/nix/store/l4dvshb0bw0ipyx17f6rknzk83mdx81y-gcc-11.3.0/include/c++/11.3.0/bits/stl_algobase.h:278:5: note: 'std::min' declared here
  278 |     min(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
foo.cc: In function 'int main()':
foo.cc:58:9: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
   58 |         cin>>R;
      |         ^~~
      |         std::cin
iostream:60:18: note: 'std::cin' declared here
foo.cc:61:17: warning: this 'for' clause does not guard... [-Wmisleading-indentation]
   61 |                 for(int i=0;i<5;i++)
      |                 ^~~
foo.cc:63:25: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'for'
   63 |                         cout<<spy()<<endl;
      |                         ^~~~
foo.cc:63:25: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   63 |                         cout<<spy()<<endl;
      |                         ^~~~
      |                         std::cout
iostream:61:18: note: 'std::cout' declared here
foo.cc:63:38: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   63 |                         cout<<spy()<<endl;
      |                                      ^~~~
      |                                      std::endl
In file included from iostream:39:
/nix/store/l4dvshb0bw0ipyx17f6rknzk83mdx81y-gcc-11.3.0/include/c++/11.3.0/ostream:684:5: note: 'std::endl' declared here
  684 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
[Hydro](https://hydro.ac)提供评测服务

信息

递交者
类型
递交
题目
P1197 费解的开关
语言
C++
递交时间
2022-10-02 17:01:04
评测时间
2022-10-02 17:01:04
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes