[Offer收割]编程练习赛12 register

Ended

Participants:1323

Verdict:Accepted
Score:100 / 100
Submitted:2017-04-02 12:33:21

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<string.h>
#include<math.h>
#include<queue>
#include<vector>
#include<map>
using namespace std;
map<int,int>f;
int main()
{
    int n;
    scanf("%d",&n);
    int wid=0;
    int flag=0;
    for(int i=1;i<=n;i++)
    {
        int k;
        scanf("%d",&k);
        if(k>=2)flag=1; 
        int sum=0;
        for(int j=1;j<=k;j++)
        {
            int x;
            scanf("%d",&x);
            sum+=x;
            f[sum]++;
        }
        wid=sum;
    }
    int maxn=1000000;
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX