-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest.cpp
More file actions
59 lines (49 loc) · 1.25 KB
/
test.cpp
File metadata and controls
59 lines (49 loc) · 1.25 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
// #include<bits/stdc++.h>
// using namespace std;
// struct Node{
// int data;
// struct Node *Left;
// struct Node *Right;
// }*root=NULL;
// typedef struct Node node;
// node *createNode(int data) {
// node *temp=(node *)malloc(sizeof(node));
// temp->data = data;
// temp->Left = temp->Right = NULL;
// return temp;
// }
// void printTree(node *root) {
// if (root == NULL) {
// return;
// }
// printTree(root->Left);
// printf("%d ", root->data);
// printTree(root->Right);
// }
// int main() {
// root=createNode(1);
// root->Left=createNode(2);
// root->Right=createNode(3);
// root->Left->Left=createNode(4);
// root->Left->Right=createNode(5);
// root->Right->Left=createNode(6);
// root->Right->Right=createNode(7);
// printf("Binary Tree (In-order Traversal): \n");
// printTree(root);
// return 0;
// }
#include<bits/stdc++.h>
using namespace std;
int main() {
int n;
cin>>n;
vector<long long> v1(n,0),v2(n,0);
for(int i=0;i<n;i++)cin>>v1[i];
for(int i=1;i<n;i++)cin>>v2[i];
long long sum=0;
for(int i=0;i<n;i++)sum+=v1[i];
if(sum<0)cout<<"-\n";
else if(sum>0)cout<<"+\n";
else cout<<"0\n";
return 0;
}