hiho week 30 register

Ended

Participants:387

Verdict:Accepted
Score:100 / 100
Submitted:2015-01-31 13:46:38

Lang:G++

Edit
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
#include<stdio.h>
#include<stack>
using namespace std;
int main()
{
    int i,j,k,n,t;
    int s[100002];
    int ans[100002];
    int num[100002];
    bool bo;
    stack<int>s1,s2;
    scanf("%d",&t);
    while(t--)
    {
        scanf("%d",&n);
        for(i=1;i<=n;i++)
            scanf("%d",&num[i]);
        bo=true;
        s[0]=0;
        s1.push(1);
        s2.push(0);
        if(num[1]>0)
        {
            s1.push(1);
            s2.push(1);
        }
        while(!s1.empty())
        {
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX