寻找黑客

博客内容涉及一项关于黑客的编程挑战,包括题目链接、程序代码及运行后的具体结果展示,通过链接可以查看详细信息。
摘要由CSDN通过智能技术生成

题目链接

程序

#include <stdio.h>
#include <stdlib.h>
#include <string.h>

#define MAXREQS 15000
#define SUMLEN 1500

typedef struct Requests
{
    char sender[10]; //sender name, all recivers are the same
    int length;  //the length of each request
}Reqs;
typedef struct Senders
{
    char name[10]; //sender name
    int Newlength;  //the total length of each sender
}Send;

//check if str[] is in the send[], if yes return its procession, if no return -1
int IsRepeat(char str[], Send send[])
{
    int i = 0;
    int index = -1;
    for(i=0; i<MAXREQS; i++)
    {
        if (strcmp(str, send[i].name) == 0)
        {
            index = i;
            break;
        }
    }
    return index;
}

int main(int argc, char *argv[])
{
    FILE *fp
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值