hihoCoder Challenge 14 register

Ended

Participants:709

Verdict:Accepted
Submitted:2015-08-30 19:34:47

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<iostream>
#include<cstdio>
#include<cstring>
#include<algorithm>
using namespace std;
const int maxn = 110;
struct node
{
    char a[5],b[5];
    int c;
}tt[maxn];
int main()
{
    int n;
    scanf("%d",&n);
        for(int i=0;i<n;i++)
        {
            scanf("%s%s%d",tt[i].a,tt[i].b,&tt[i].c);
        }
        int ans= 0;
        for(double num = -1010;num<=1010;num+=0.5)
        {
            int cnt = 0;
            for(int i=0;i<n;i++)
            {
                int len = strlen(tt[i].b);
                if(len == 1)
                {
                    if(tt[i].b[0]=='<'&&num<tt[i].c)
                        cnt++;
                    if(tt[i].b[0]=='>'&&num>tt[i].c)
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX