// The term 'bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb' is not recognized as the name of
// a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was
// included, verify that the path is correct and try again.
// The term 'bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb' is not recognized as the name of
// a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was
// included, verify that the path is correct and try again.// The term 'bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb' is not recognized as the name of
// a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was
// included, verify that the path is correct and try again.// The term 'bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb' is not recognized as the name of
// a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was
// included, verify that the path is correct and try again.// The term 'bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb' is not recognized as the name of
// a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was
// included, verify that the path is correct and try again.// The term 'bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb' is not recognized as the name of
// a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was
// included, verify that the path is correct and try again.// The term 'bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb' is not recognized as the name of
// a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was
// included, verify that the path is correct and try again.// The term 'bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb' is not recognized as the name of
// a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was
// included, verify that the path is correct and try again.// The term 'bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb' is not recognized as the name of
// a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was
// included, verify that the path is correct and try again.// The term 'bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb' is not recognized as the name of
// a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was
// included, verify that the path is correct and try again.// The term 'bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb' is not recognized as the name of
// a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was
// included, verify that the path is correct and try again.// The term 'bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb' is not recognized as the name of
// a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was
// included, verify that the path is correct and try again.// The term 'bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb' is not recognized as the name of
// a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was
// included, verify that the path is correct and try again.// The term 'bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb' is not recognized as the name of
// a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was
// included, verify that the path is correct and try again.// The term 'bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb' is not recognized as the name of
// a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was
// included, verify that the path is correct and try again.// The term 'bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb' is not recognized as the name of
// a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was
// included, verify that the path is correct and try again.// The term 'bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb' is not recognized as the name of
// a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was
// included, verify that the path is correct and try again.// The term 'bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb' is not recognized as the name of
// a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was
// included, verify that the path is correct and try again.// The term 'bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb' is not recognized as the name of
// a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was
// included, verify that the path is correct and try again.// The term 'bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb' is not recognized as the name of
// a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was
// included, verify that the path is correct and try again.// The term 'bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb' is not recognized as the name of
// a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was
// included, verify that the path is correct and try again.// The term 'bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb' is not recognized as the name of
// a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was
// included, verify that the path is correct and try again.// The term 'bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb' is not recognized as the name of
// a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was
// included, verify that the path is correct and try again.// The term 'bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb' is not recognized as the name of
// a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was
// included, verify that the path is correct and try again.// The term 'bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb' is not recognized as the name of
// a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was
// included, verify that the path is correct and try again.// The term 'bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb' is not recognized as the name of
// a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was
// included, verify that the path is correct and try again.// The term 'bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb' is not recognized as the name of
// a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was
// included, verify that the path is correct and try again.// The term 'bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb' is not recognized as the name of
// a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was
// included, verify that the path is correct and try again.// The term 'bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb' is not recognized as the name of
// a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was
// included, verify that the path is correct and try again.// The term 'bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb' is not recognized as the name of
// a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was
// included, verify that the path is correct and try again.// The term 'bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb' is not recognized as the name of
// a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was
// included, verify that the path is correct and try again.// The term 'bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb' is not recognized as the name of
// a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was
// included, verify that the path is correct and try again.// The term 'bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb' is not recognized as the name of
// a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was
// included, verify that the path is correct and try again.// The term 'bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb' is not recognized as the name of
// a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was
// included, verify that the path is correct and try again.// The term 'bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb' is not recognized as the name of
// a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was
// included, verify that the path is correct and try again.// The term 'bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb' is not recognized as the name of
// a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was
// included, verify that the path is correct and try again.// The term 'bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb' is not recognized as the name of
// a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was
// included, verify that the path is correct and try again.// The term 'bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb' is not recognized as the name of
// a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was
// included, verify that the path is correct and try again.// The term 'bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb' is not recognized as the name of
// a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was
// included, verify that the path is correct and try again.// The term 'bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb' is not recognized as the name of
// a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was
// included, verify that the path is correct and try again.// The term 'bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb' is not recognized as the name of
// a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was
// included, verify that the path is correct and try again.// The term 'bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb' is not recognized as the name of
// a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was
// included, verify that the path is correct and try again.// The term 'bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb' is not recognized as the name of
// a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was
// included, verify that the path is correct and try again.// The term 'bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb' is not recognized as the name of
// a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was
// included, verify that the path is correct and try again.// The term 'bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb' is not recognized as the name of
// a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was
// included, verify that the path is correct and try again.// The term 'bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb' is not recognized as the name of
// a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was
// included, verify that the path is correct and try again.// The term 'bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb' is not recognized as the name of
// a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was
// included, verify that the path is correct and try again.// The term 'bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb' is not recognized as the name of
// a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was
// included, verify that the path is correct and try again.// The term 'bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb' is not recognized as the name of
// a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was
// included, verify that the path is correct and try again.// The term 'bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb' is not recognized as the name of
// a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was
// included, verify that the path is correct and try again.// The term 'bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb' is not recognized as the name of
// a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was
// included, verify that the path is correct and try again.// The term 'bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb' is not recognized as the name of
// a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was
// included, verify that the path is correct and try again.// The term 'bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb' is not recognized as the name of
// a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was
// included, verify that the path is correct and try again.// The term 'bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb' is not recognized as the name of
// a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was
// included, verify that the path is correct and try again.// The term 'bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb' is not recognized as the name of
// a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was
// included, verify that the path is correct and try again.// The term 'bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb' is not recognized as the name of
// a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was
// included, verify that the path is correct and try again.// The term 'bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb' is not recognized as the name of
// a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was
// included, verify that the path is correct and try again.// The term 'bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb' is not recognized as the name of
// a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was
// included, verify that the path is correct and try again.// The term 'bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb' is not recognized as the name of
// a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was
// included, verify that the path is correct and try again.// The term 'bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb' is not recognized as the name of
// a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was
// included, verify that the path is correct and try again.// The term 'bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb' is not recognized as the name of
// a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was
// included, verify that the path is correct and try again.// The term 'bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb' is not recognized as the name of
// a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was
// included, verify that the path is correct and try again.// The term 'bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb' is not recognized as the name of
// a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was
// included, verify that the path is correct and try again.// The term 'bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb' is not recognized as the name of
// a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was
// included, verify that the path is correct and try again.// The term 'bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb' is not recognized as the name of
// a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was
// included, verify that the path is correct and try again.// The term 'bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb' is not recognized as the name of
// a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was
// included, verify that the path is correct and try again.// The term 'bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb' is not recognized as the name of
// a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was
// included, verify that the path is correct and try again.// The term 'bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb' is not recognized as the name of
// a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was
// included, verify that the path is correct and try again.// The term 'bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb' is not recognized as the name of
// a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was
// included, verify that the path is correct and try again.// The term 'bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb' is not recognized as the name of
// a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was
// included, verify that the path is correct and try again.// The term 'bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb' is not recognized as the name of
// a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was
// included, verify that the path is correct and try again.// The term 'bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb' is not recognized as the name of
// a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was
// included, verify that the path is correct and try again.
#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;
}
if(L[i]>223159716||R[i]>223159716) abort();
prevr=R[i];
}
cout << "YES\n0\n";
for(int i=0;i<N-1;i++){
cout << L[i] << " 0 " << R[i] << "\n";
}
}
Compilation message
Main.cpp:150:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
150 | main(){
| ^~~~
Main.cpp: In function 'int main()':
Main.cpp:153:14: warning: unused variable 'U' [-Wunused-variable]
153 | int B[N],U[N-1],P[N-1];
| ^
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
0 ms |
212 KB |
Output is correct |
2 |
Runtime error |
1 ms |
340 KB |
Execution killed with signal 6 |
3 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
0 ms |
212 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
0 ms |
212 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
0 ms |
212 KB |
Output is correct |
2 |
Runtime error |
1 ms |
340 KB |
Execution killed with signal 6 |
3 |
Halted |
0 ms |
0 KB |
- |