-
-
Save Anower77/8cdde35b706f17c28f7361889d25abf5 to your computer and use it in GitHub Desktop.
Goals of Victory
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include<bits/stdc++.h> | |
using namespace std; | |
int main() { | |
int t;cin>>t; | |
while (t--) | |
{ | |
int n,sum=0;cin>>n; | |
vector<int>v(n-1); | |
for(int i=0;i<n-1;i++) | |
{ | |
cin>>v[i]; | |
sum+=v[i]; | |
} | |
sum = -sum; | |
cout<<sum<<endl; | |
} | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment