| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 79691 | 朱子相 | 校门外的树 | C++ | Compile Error | 0 MS | 0 KB | 353 | 2024-07-09 14:29:59 |
#include<iostream> using namespace std; int main() { int l, m,head,wei; cin >> l >> m; int a[l + 1] = {0}; for (int i = 1; i <= m; i++) { cin >> head >> wei; } for (int j = head; j <= wei; j++) { a[j]++; } } int count = 0; for (int i = 0; i <= 1; i++) { if (a[i] == 0) { count++; } } cout << count;
Main.cc:15:1: error: expected unqualified-id before 'for'
for (int i = 0; i <= 1; i++) {
^
Main.cc:15:17: error: 'i' does not name a type
for (int i = 0; i <= 1; i++) {
^
Main.cc:15:25: error: 'i' does not name a type
for (int i = 0; i <= 1; i++) {
^
Main.cc:21:1: error: 'cout' does not name a type
cout << count;
^