Task: | sume |
Sender: | Kuha |
Submission time: | 2016-08-02 15:13:45 +0300 |
Language: | C++ |
Status: | READY |
Result: | 100 |
group | verdict | score |
---|---|---|
#1 | ACCEPTED | 100 |
test | verdict | time | |
---|---|---|---|
#1 | ACCEPTED | 0.06 s | details |
#2 | ACCEPTED | 0.06 s | details |
#3 | ACCEPTED | 0.06 s | details |
#4 | ACCEPTED | 0.06 s | details |
#5 | ACCEPTED | 0.06 s | details |
#6 | ACCEPTED | 0.05 s | details |
#7 | ACCEPTED | 0.06 s | details |
Code
#include <bits/stdc++.h> #define ll long long #define INF 999999999 #define LINF 999999999999999999LL #define N (1<<17) #define M 1000000007 using namespace std; int main () { int n; cin>>n; if (n == 2) cout<<"1 1"<<endl; else { int v[n]; for(int i = 0; i < n; i++) cin>>v[i]; int f; cin>>f>>f>>f; int a = (v[1] - (f - v[2])) / 2; int b = v[1] - a; cout<<a<<" "<<b<<" "; for (int i = 2; i < n; i++) cout<<v[i] - a<<" "; cout<<endl; } }
Test details
Test 1
Verdict: ACCEPTED
input |
---|
2
0 2 2 0 |
correct output |
---|
1 1 |
user output |
---|
1 1 |
Test 2
Verdict: ACCEPTED
input |
---|
4
0 3 6 7 3 0 5 6 6 5 0 9 7 6 9 0 |
correct output |
---|
2 1 4 5 |
user output |
---|
2 1 4 5 |
Test 3
Verdict: ACCEPTED
input |
---|
3
0 90003 90003 90003 0 6 90003 6 0 |
correct output |
---|
90000 3 3 |
user output |
---|
90000 3 3 |
Test 4
Verdict: ACCEPTED
input |
---|
8
0 30038 62527 40609 36422 6774... |
correct output |
---|
17977 12061 44550 22632 18445 ... |
user output |
---|
17977 12061 44550 22632 18445 ... |
Test 5
Verdict: ACCEPTED
input |
---|
30
0 54221 21576 54530 22345 5482... |
correct output |
---|
16412 37809 5164 38118 5933 38... |
user output |
---|
16412 37809 5164 38118 5933 38... |
Test 6
Verdict: ACCEPTED
input |
---|
1000
0 35894 61997 41654 61652 2980... |
correct output |
---|
17429 18465 44568 24225 44223 ... |
user output |
---|
17429 18465 44568 24225 44223 ... |
Test 7
Verdict: ACCEPTED
input |
---|
1000
0 70871 52683 64032 77345 5665... |
correct output |
---|
44202 26669 8481 19830 33143 1... |
user output |
---|
44202 26669 8481 19830 33143 1... |