제출 #1333838

#제출 시각아이디문제언어결과실행 시간메모리
1333838YSH2020Wind Turbines (EGOI25_windturbines)C++20
컴파일 에러
0 ms0 KiB
#include <bits/stdc++.h>
using namespace std;

#define int long long

signed main() {
  int n,m; cin >> n >> m;
  int q; cin >> q;
  int x[n-1]; for (int i = 0; i < n-1; i++) {
    int a,b,c; cin >> a >> b >> c;
    x[i]=c;
  }
  int pref[n]; pref[0]=0;
  for (int i = 1; i < n; i++) pref[i]=pref[i-1]+x[i-1];
  while (q--) {
    int s,e; cin >> s >> e;
    cout << pref[n-1]-(pref[e-1]-pref[s]) << newl;
  }
}

컴파일 시 표준 에러 (stderr) 메시지

Main.cpp: In function 'int main()':
Main.cpp:17:46: error: 'newl' was not declared in this scope
   17 |     cout << pref[n-1]-(pref[e-1]-pref[s]) << newl;
      |                                              ^~~~