/ Vijos /

记录详情

Compile Error

/in/foo.cc: In function 'int main()':
/in/foo.cc:13:13: error: array must be initialized with a brace-enclosed initializer
  int t[105]=0;
             ^
/in/foo.cc:18:21: warning: format '%s' expects argument of type 'char*', but argument 2 has type 'int' [-Wformat=]
   scanf("%s",name[i]);
                     ^
/in/foo.cc:20:28: warning: format '%s' expects argument of type 'char*', but argument 2 has type 'int' [-Wformat=]
   scanf("%s%s",master,where)
                            ^
/in/foo.cc:20:28: warning: format '%s' expects argument of type 'char*', but argument 3 has type 'int' [-Wformat=]
/in/foo.cc:21:3: error: expected ';' before 'cin'
   cin>>passage;
   ^~~
/in/foo.cc:24:20: error: incompatible types in assignment of 'int*' to 'int [105]'
   if(grade>90) t=t+good;
                    ^~~~
/in/foo.cc:25:29: error: lvalue required as left operand of assignment
   if(classgrade>=80&&master="Y") t[i]=t[i]+classmoney;
                             ^~~
/in/foo.cc:29:24: error: 'a' was not declared in this scope
      if(t[i]>=max) max=a[i];
                        ^
/in/foo.cc:37:17: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
      if(t[i]=max) break;
                 ^
/in/foo.cc:12:39: warning: unused variable 'west' [-Wunused-variable]
  int yuanshi=8000,five=4000,good=2000,west=1000,classmoney=850;
                                       ^~~~

信息

递交者
类型
自测
题目
P1001 谁拿了最多奖学金
语言
C++
递交时间
2017-07-14 09:27:32
评测时间
2017-07-14 09:27:32
评测机
分数
0
总耗时
306ms
峰值内存
36.238 MiB