/ Vijos /

记录详情

Compile Error

/in/foo.cc:1:7: error: expected nested-name-specifier before 'System'
 using System;
       ^~~~~~
/in/foo.cc:2:7: error: expected nested-name-specifier before 'System'
 using System.Linq;
       ^~~~~~
/in/foo.cc:3:7: error: expected nested-name-specifier before 'static'
 using static System.Console;
       ^~~~~~
/in/foo.cc:5:12: error: expected ':' before 'static'
     public static void Main(string[] args){
            ^~~~~~
/in/foo.cc:5:29: error: 'string' has not been declared
     public static void Main(string[] args){
                             ^~~~~~
/in/foo.cc:5:38: error: expected ',' or '...' before 'args'
     public static void Main(string[] args){
                                      ^~~~
/in/foo.cc:18:12: error: expected ':' before 'static'
     public static int GetMoney(string[] s){
            ^~~~~~
/in/foo.cc:18:32: error: 'string' has not been declared
     public static int GetMoney(string[] s){
                                ^~~~~~
/in/foo.cc:18:41: error: expected ',' or '...' before 's'
     public static int GetMoney(string[] s){
                                         ^
/in/foo.cc:28:12: error: expected ':' before 'static'
     public static void GetMax(int[] array,out int max,out int index){
            ^~~~~~
/in/foo.cc:28:37: error: expected ',' or '...' before 'array'
     public static void GetMax(int[] array,out int max,out int index){
                                     ^~~~~
/in/foo.cc:38:1: error: expected ';' after class definition
 }
 ^
/in/foo.cc: In static member function 'static void Test::Main(int*)':
/in/foo.cc:6:21: error: expected primary-expression before 'int'
         int count = int.Parse(ReadLine()),max = 0,maxIndex = 0;
                     ^~~
/in/foo.cc:7:9: error: 'string' was not declared in this scope
         string[] names = new string[count];
         ^~~~~~
/in/foo.cc:7:16: error: expected primary-expression before ']' token
         string[] names = new string[count];
                ^
/in/foo.cc:8:12: error: expected unqualified-id before '[' token
         int[] moneys = new int[count];
            ^
/in/foo.cc:10:20: error: expected primary-expression before ']' token
             string[] s = ReadLine().Split();
                    ^
/in/foo.cc:11:13: error: 'names' was not declared in this scope
             names[i] = s[0];
             ^~~~~
/in/foo.cc:11:24: error: 's' was not declared in this scope
             names[i] = s[0];
                        ^
/in/foo.cc:12:13: error: 'moneys' was not declared in this scope
             moneys[i] = GetMoney(s);
             ^~~~~~
/in/foo.cc:14:16: error: 'moneys' was not declared in this scope
         GetMax(moneys,out max,out maxIndex);
                ^~~~~~
/in/foo.cc:14:23: error: 'out' was not declared in this scope
         GetMax(moneys,out max,out maxIndex);
                       ^~~
/in/foo.cc:14:35: error: expected ')' before 'maxIndex'
         GetMax(moneys,out max,out maxIndex);
                                   ^~~~~~~~
/in/foo.cc:15:15: error: 'names' was not declared in this scope
         Write(names[maxIndex] + "\n" + max.ToString() + "\n" + moneys.Sum().ToString());
               ^~~~~
/in/foo.cc:15:21: error: 'maxIndex' was not declared in this scope
         Write(names[maxIndex] + "\n" + max.ToString() + "\n" + moneys.Sum().ToString());
                     ^~~~~~~~
/in/foo.cc:15:40: error: 'max' was not declared in this scope
         Write(names[maxIndex] + "\n" + max.ToString() + "\n" + moneys.Sum().ToString());
                                        ^~~
/in/foo.cc:15:87: error: 'Write' was not declared in this scope
         Write(names[maxIndex] + "\n" + max.ToString() + "\n" + moneys.Sum().ToString());
                                                                                       ^
/in/foo.cc: In static member function 'static int Test::GetMoney(int*)':
/in/foo.cc:19:35: error: expected primary-expression before 'int'
         int total = 0,termScore = int.Parse(s[1]),classScore = int.Parse(s[2]),paper = int.Parse(s[5]);
                                   ^~~
/in/foo.cc:20:29: error: 'paper' was not declared in this scope
         if(termScore > 80 & paper >= 1) total += 8000;
                             ^~~~~
/in/foo.cc:21:29: error: 'classScore' was not declared in this scope
         if(termScore > 85 & classScore > 80) total += 4000;
                             ^~~~~~~~~~
/in/foo.cc:23:29: error: 's' was not declared in this scope
         if(termScore > 85 & s[4] == "Y") total += 1000;
                             ^
/in/foo.cc:24:12: error: 'classScore' was not declared in this scope
         if(classScore > 80 & s[3] == "Y") total += 850;
            ^~~~~~~~~~
/in/foo.cc:24:30: error: 's' was not declared in this scope
         if(classScore > 80 & s[3] == "Y") total += 850;
                              ^
/in/foo.cc: In static member function 'static void Test::GetMax(int*)':
/in/foo.cc:29:9: error: 'index' was not declared in this scope
         index = 0;
         ^~~~~
/in/foo.cc:30:9: error: 'max' was not declared in this scope
         max = array[0];
         ^~~
/in/foo.cc:30:15: error: 'array' was not declared in this scope
         max = array[0];
               ^~~~~

信息

递交者
类型
递交
题目
P1001 谁拿了最多奖学金
语言
C++
递交时间
2018-03-06 22:33:30
评测时间
2018-03-06 22:33:30
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes