记录详情

Compile Error

/in/foo.cc:3:1: error: 'uisng' does not name a type; did you mean 'uint'?
 uisng namespace std;
 ^~~~~
 uint
/in/foo.cc: In function 'int main()':
/in/foo.cc:8:2: error: 'cin' was not declared in this scope
  cin>>n>>k;
  ^~~
/in/foo.cc:8:2: note: suggested alternative:
In file included from /in/foo.cc:1:0:
/usr/include/c++/7/iostream:60:18: note:   'std::cin'
   extern istream cin;  /// Linked to standard input
                  ^~~
/in/foo.cc:9:2: error: 'vector' was not declared in this scope
  vector<bool> str(n,true);
  ^~~~~~
/in/foo.cc:9:2: note: suggested alternative:
In file included from /usr/include/c++/7/vector:64:0,
                 from /in/foo.cc:2:
/usr/include/c++/7/bits/stl_vector.h:216:11: note:   'std::vector'
     class vector : protected _Vector_base<_Tp, _Alloc>
           ^~~~~~
/in/foo.cc:9:9: error: expected primary-expression before 'bool'
  vector<bool> str(n,true);
         ^~~~
/in/foo.cc:10:9: error: expected primary-expression before 'int'
  vector<int> arr(k);
         ^~~
/in/foo.cc:14:8: error: 'arr' was not declared in this scope
   cin>>arr[i];
        ^~~
/in/foo.cc:21:16: error: 'arr' was not declared in this scope
    while(temp!=arr[temp%(k-1)])
                ^~~
/in/foo.cc:23:8: error: 'str' was not declared in this scope
     if(str[i%n]==true)
        ^~~
/in/foo.cc:30:4: error: 'str' was not declared in this scope
    str[m]=false;
    ^~~
/in/foo.cc:40:16: error: 'arr' was not declared in this scope
    while(temp!=arr[0])
                ^~~
/in/foo.cc:42:8: error: 'str' was not declared in this scope
     if(str[i%n]==true)
        ^~~
/in/foo.cc:49:4: error: 'str' was not declared in this scope
    str[m]=false;
    ^~~
/in/foo.cc:55:6: error: 'str' was not declared in this scope
   if(str[i]==true)
      ^~~
/in/foo.cc:57:4: error: 'cout' was not declared in this scope
    cout<<i+1<<" ";
    ^~~~
/in/foo.cc:57:4: note: suggested alternative:
In file included from /in/foo.cc:1:0:
/usr/include/c++/7/iostream:61:18: note:   'std::cout'
   extern ostream cout;  /// Linked to standard output
                  ^~~~
/in/foo.cc:11:23: warning: unused variable 'p' [-Wunused-variable]
  int num=n,temp=0,i=0,p=1;
                       ^

信息

递交者
类型
递交
题目
2-2 约瑟夫问题
比赛
南师大2018年蓝桥杯热身赛
语言
C++
递交时间
2018-12-12 15:55:58
评测时间
2018-12-12 15:56:04
评测机
分数
0
总耗时
284ms
峰值内存
31.75 MiB