/ Vijos /

记录详情

Compile Error

foo.cpp:9:9: error: expected unqualified-id before '__int128'
 typedef __int128 LL;
         ^
foo.cpp:13:1: error: 'LL' does not name a type
 LL gcd(LL a,LL b);
 ^
foo.cpp:18:2: error: 'LL' does not name a type
  LL a,b;
  ^
foo.cpp:20:18: error: expected ')' before '_a'
  inline Digit(LL _a=0,LL _b=0)
                  ^
foo.cpp:33:27: error: 'LL' has not been declared
  inline Digit operator * (LL x)
                           ^
foo.cpp: In function 'Digit operator+(Digit, Digit)':
foo.cpp:27:3: error: 'LL' was not declared in this scope
   LL ax=a.a,ay=a.b,bx=b.a,by=b.b;
   ^
foo.cpp:27:6: error: expected ';' before 'ax'
   LL ax=a.a,ay=a.b,bx=b.a,by=b.b;
      ^
foo.cpp:28:6: error: expected ';' before 'up'
   LL up=ax*by+ay*bx; LL dw=ay*by;
      ^
foo.cpp:28:25: error: expected ';' before 'dw'
   LL up=ax*by+ay*bx; LL dw=ay*by;
                         ^
foo.cpp:29:6: error: expected ';' before 'g'
   LL g=gcd(up,dw); up/=g,dw/=g;
      ^
foo.cpp:29:20: error: 'up' was not declared in this scope
   LL g=gcd(up,dw); up/=g,dw/=g;
                    ^
foo.cpp:29:24: error: 'g' was not declared in this scope
   LL g=gcd(up,dw); up/=g,dw/=g;
                        ^
foo.cpp:29:26: error: 'dw' was not declared in this scope
   LL g=gcd(up,dw); up/=g,dw/=g;
                          ^
foo.cpp: In member function 'Digit Digit::operator*(int)':
foo.cpp:35:3: error: 'a' was not declared in this scope
   a*=x;
   ^
foo.cpp:36:3: error: 'LL' was not declared in this scope
   LL g=gcd(a,b); a/=g,b/=g;
   ^
foo.cpp:36:6: error: expected ';' before 'g'
   LL g=gcd(a,b); a/=g,b/=g;
      ^
foo.cpp:36:21: error: 'g' was not declared in this scope
   LL g=gcd(a,b); a/=g,b/=g;
                     ^
foo.cpp:36:23: error: 'b' was not declared in this scope
   LL g=gcd(a,b); a/=g,b/=g;
                       ^
foo.cpp: At global scope:
foo.cpp:45:1: error: 'LL' does not name a type
 LL gcd(LL a,LL b)
 ^
foo.cpp: In function 'void Print(Digit)':
foo.cpp:53:12: error: 'struct Digit' has no member named 'a'
  int t=res.a/res.b;
            ^
foo.cpp:53:18: error: 'struct Digit' has no member named 'b'
  int t=res.a/res.b;
                  ^
foo.cpp:54:12: error: 'struct Digit' has no member named 'a'
  int a=res.a-res.b*t;
            ^
foo.cpp:54:18: error: 'struct Digit' has no member named 'b'
  int a=res.a-res.b*t;
                  ^
foo.cpp:55:12: error: 'struct Digit' has no member named 'b'
  int b=res.b;
            ^
foo.cpp: In function 'int main()':
foo.cpp:91:31: error: no matching function for call to 'Digit::Digit(int, int)'
  scanf("%d",&n); res=Digit(0,1);
                               ^
foo.cpp:91:31: note: candidates are:
foo.cpp:16:8: note: constexpr Digit::Digit()
 struct Digit
        ^
foo.cpp:16:8: note:   candidate expects 0 arguments, 2 provided
foo.cpp:16:8: note: constexpr Digit::Digit(const Digit&)
foo.cpp:16:8: note:   candidate expects 1 argument, 2 provided
foo.cpp:16:8: note: constexpr Digit::Digit(Digit&&)
foo.cpp:16:8: note:   candidate expects 1 argument, 2 provided
foo.cpp:93:20: error: no matching function for call to 'Digit::Digit(int, int&)'
   res=res+Digit(1,i);
                    ^
foo.cpp:93:20: note: candidates are:
foo.cpp:16:8: note: constexpr Digit::Digit()
 struct Digit
        ^
foo.cpp:16:8: note:   candidate expects 0 arguments, 2 provided
foo.cpp:16:8: note: constexpr Digit::Digit(const Digit&)
foo.cpp:16:8: note:   candidate expects 1 argument, 2 provided
foo.cpp:16:8: note: constexpr Digit::Digit(Digit&&)
foo.cpp:16:8: note:   candidate expects 1 argument, 2 provided

信息

递交者
类型
递交
题目
P1266 搜集环盖
语言
C++
递交时间
2016-11-14 15:18:15
评测时间
2016-11-14 15:18:15
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes