-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathA - Equator
61 lines (53 loc) · 926 Bytes
/
A - Equator
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
60
#include <bits/stdc++.h>
#define ll long long
#define pb push_back
#define ld long double
#define sz size()
#define lala for(ll i=0;i<n;i++)
#define pll pair<ll,ll>
#define ed "\n"
#define ct cout
#define m_p make_pair
#define vi vector<ll>
#define vc vector<char>
#define ff first
#define ss second
using namespace std;
void bahut_tezz()
{
std::ios_base::sync_with_stdio(0);
cin.tie(0);
cout.tie(0);
}
void jai_bajrangbali()
{
ll k,n,m,x,y,cnt=0,res=0,mx=1;
ll sum=0;
bool ash=false;
string s;
cin>>n;
ll a[n];
lala
{
cin>>a[i];
sum=sum+a[i];
}
for(ll i=0;i<n;i++)
{
cnt=cnt+a[i];
if(cnt>=(sum+1)/2)
{
ct<<i+1<<ed;
return ;
}
}
}
int main()
{
bahut_tezz();
long long t;
//cin>>t;
t=1;
while(t--)jai_bajrangbali();
return 0;
}