hihoCoder Challenge 14 register

Ended

Participants:709

Verdict:Accepted
Submitted:2015-08-30 19:20:20

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<cstdio>
#include<cstring>
#include<cstdlib>
#include<cmath>
#include<iostream>
#include<algorithm>
using namespace std;
int cnt[2050];
int main()
{
    int n;
    scanf("%d",&n);
    memset(cnt,0,sizeof(cnt));
    for(int i=1;i<=n;i++)
    {
        char s[5],b[5];
        int c;
        scanf("%s%s%d",s,b,&c);
        c*=2;
        int ll=strlen(b);
        if(ll==1)
        {
            if(b[0]=='<')
            {
                for(int i=0;i<c+1;i++)
                    cnt[i]++;
            }
            else if(b[0]=='=')
            {
                cnt[c+1]++;
            }
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX