제출 #711100

#제출 시각아이디문제언어결과실행 시간메모리
711100Tyx2019Rainy Markets (CCO22_day1problem2)C++17
컴파일 에러
0 ms0 KiB
#include <bits/stdc++.h> using namespace std; #define int long long main(){ int N; cin >> N; int B[N],U[N-1],P[N-1]; for(int i=0;i<N;i++) cin >> B[i]; for(int i=0;i<N-1;i++) cin >> P[i]; int L[N-1], R[N-1]; int prevr=0; for(int i=0;i<N-1;i++){ L[i]=B[i]-prevr; R[i]=P[i]-L[i]; if(R[i]>B[i+1]){ cout << "NO"; return 0; } prevr=R[i]; } cout << "YES\n0\n"; for(int i=0;i<N-1;i++){ if(L[i]>223159716&&>223159716) abort(); cout << L[i] << " 0 " << R[i] << "\n"; } }

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

Main.cpp:4:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
    4 | main(){
      | ^~~~
Main.cpp: In function 'int main()':
Main.cpp:23:34: error: expected primary-expression before '>' token
   23 |               if(L[i]>223159716&&>223159716) abort();
      |                                  ^
Main.cpp:7:14: warning: unused variable 'U' [-Wunused-variable]
    7 |     int B[N],U[N-1],P[N-1];
      |              ^