标签:can div clu += namespace main using style ber
#include<bits/stdc++.h> using namespace std; #define ll long long const int maxn=1e6+5; long long n,s1=0,s2=0,a1=0,a2=0,c; int main() { scanf("%lld",&n); for(int i=1;i<=n;i++) { int x; scanf("%d",&x); if(x>0) { a1++; } else { c=a2; a2=a1; a1=c; a2++; } s1+=a1; s2+=a2; } printf("%lld %lld",s2,s1); }
标签:can div clu += namespace main using style ber
原文地址:https://www.cnblogs.com/Shallow-dream/p/11644818.html