/ Vijos /

记录详情

Compile Error

/in/foo.c:1:1: error: unknown type name 'using'
 using namespace std;
 ^~~~~
/in/foo.c:1:17: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'std'
 using namespace std;
                 ^~~
/in/foo.c:4:15: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
 unordered_map < int , int > ans;
               ^
/in/foo.c: In function 'solve':
/in/foo.c:8:5: error: 'ans' undeclared (first use in this function)
  if(ans.count(len)) return ans[len];
     ^~~
/in/foo.c:8:5: note: each undeclared identifier is reported only once for each function it appears in
/in/foo.c: At top level:
/in/foo.c:15:1: error: unknown type name 'bool'
 bool check(string s , string &news){
 ^~~~
/in/foo.c:15:12: error: unknown type name 'string'
 bool check(string s , string &news){
            ^~~~~~
/in/foo.c:15:23: error: unknown type name 'string'
 bool check(string s , string &news){
                       ^~~~~~
/in/foo.c:26:9: error: unknown type name 'string'
 int dfs(string s , int k){
         ^~~~~~
/in/foo.c: In function 'main':
/in/foo.c:42:2: warning: implicit declaration of function 'freopen' [-Wimplicit-function-declaration]
  freopen("in","r",stdin);
  ^~~~~~~
/in/foo.c:42:19: error: 'stdin' undeclared (first use in this function)
  freopen("in","r",stdin);
                   ^~~~~
/in/foo.c:46:6: error: 'cin' undeclared (first use in this function)
  for(cin >> T ; T ; --T){
      ^~~
/in/foo.c:47:3: error: unknown type name 'string'
   string s; int k; cin >> s >> k;
   ^~~~~~
/in/foo.c:48:3: error: 'cout' undeclared (first use in this function)
   cout << dfs(s , k) << endl;
   ^~~~
/in/foo.c:48:11: warning: implicit declaration of function 'dfs' [-Wimplicit-function-declaration]
   cout << dfs(s , k) << endl;
           ^~~
/in/foo.c:48:25: error: 'endl' undeclared (first use in this function)
   cout << dfs(s , k) << endl;
                         ^~~~
/in/foo.c: In function 'solve':
/in/foo.c:13:1: warning: control reaches end of non-void function [-Wreturn-type]
 }
 ^

信息

递交者
类型
递交
题目
P2056 连续子序列
语言
C
递交时间
2019-07-06 21:15:13
评测时间
2019-07-06 21:15:13
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes