记录详情

Compile Error

foo.cc:4:23: error: expected initializer before 'icin'
 int a[101];int main() icin >> n;
                       ^~~~
foo.cc:5:1: error: expected unqualified-id before 'for'
 for (int i = 0; i <n; i++)cin >> a[i];int sum = 0;
 ^~~
foo.cc:5:17: error: 'i' does not name a type
 for (int i = 0; i <n; i++)cin >> a[i];int sum = 0;
                 ^
foo.cc:5:23: error: 'i' does not name a type
 for (int i = 0; i <n; i++)cin >> a[i];int sum = 0;
                       ^
foo.cc:7:1: error: expected unqualified-id before 'for'
 for (int i = 0; i <n; i++) {sum += a[i];
 ^~~
foo.cc:7:17: error: 'i' does not name a type
 for (int i = 0; i <n; i++) {sum += a[i];
                 ^
foo.cc:7:23: error: 'i' does not name a type
 for (int i = 0; i <n; i++) {sum += a[i];
                       ^
foo.cc:10:1: error: expected unqualified-id before 'for'
 for (int i = 0; i<n; i++) a[i] -= ave;for (int i = 0; i <n - 1; i++) i
 ^~~
foo.cc:10:17: error: 'i' does not name a type
 for (int i = 0; i<n; i++) a[i] -= ave;for (int i = 0; i <n - 1; i++) i
                 ^
foo.cc:10:22: error: 'i' does not name a type
 for (int i = 0; i<n; i++) a[i] -= ave;for (int i = 0; i <n - 1; i++) i
                      ^
foo.cc:10:39: error: expected unqualified-id before 'for'
 for (int i = 0; i<n; i++) a[i] -= ave;for (int i = 0; i <n - 1; i++) i
                                       ^~~
foo.cc:10:55: error: 'i' does not name a type
 for (int i = 0; i<n; i++) a[i] -= ave;for (int i = 0; i <n - 1; i++) i
                                                       ^
foo.cc:10:65: error: 'i' does not name a type
 for (int i = 0; i<n; i++) a[i] -= ave;for (int i = 0; i <n - 1; i++) i
                                                                 ^
foo.cc:13:1: error: 'ans' does not name a type
 ans++;
 ^~~
foo.cc:14:1: error: expected declaration before '}' token
 }
 ^
正在同步测试数据,请稍后

信息

递交者
类型
递交
题目
P1127 均分纸牌
语言
C++
递交时间
2021-01-30 15:32:23
评测时间
2021-01-30 15:32:23
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes