coderforce B .A and B and Compilation Errors

原创 2015年11月20日 22:44:40
题意:第一行给出数字的个数,第二行给出原始数字,第三行给出处理一个数字之后剩下的数字,第四行给出处理两个数字之后剩下的数字,找出这两次分别处理的数字。
#include<stdio.h>
#include<string.h>
#include<algorithm>
using namespace std;
#define LL long long
int main()
{
    int n;
    while(scanf("%d",&n)!=EOF)
    {
        LL sum1=0,sum2=0,sum3=0,x;
        for(int i=0;i<n;i++)
        {
            scanf("%lld",&x);
            sum1+=x;
        }
        for(int i=0;i<n-1;i++)
        {
            scanf("%lld",&x);
            sum2+=x;
        }
        for(int i=0;i<n-2;i++)
        {
            scanf("%lld",&x);
            sum3+=x;
        }
        printf("%lld\n%lld\n",sum1-sum2,sum2-sum3);
    }
    return 0;
}

版权声明:本文为博主原创文章,未经博主允许不得转载。

A and B and Compilation Errors——找出消失的数字

B. A and B and Compilation Errors time limit per test 2 seconds memory limit per test 25...

B - A and B and Compilation Errors

A and B are preparing themselves for programming contests. B loves to debug his code. But before he ...

codeforces——519B—— A and B and Compilation Errors

B. A and B and Compilation Errors time limit per test 2 seconds memory limit per test 256 me...

Codeforces Round #294 (Div. 2) -- B. A and B and Compilation Errors

B. A and B and Compilation Errors time limit per test 2 seconds memory limit per test 25...

Coderforce #332 D. Spongebob and Squares

题意 给你x,然后让你找有多少个n*m的矩形,可以由x个相同的多边形组成 题解: 数学题,这道题实际上是问,f(n,m) = sigma(k=1,k=min(n,m))(n-k+1)...
  • Ezereal
  • Ezereal
  • 2015年11月24日 23:01
  • 233

R--安装reshape 报错:Package which is only available in source form, and may need compilation of C/C++/Fo

对变量进行重命名(比如data.frame的列名称),有如下几种方法。 假设data.frame 的数据mydata如下: 有4列,想把后两列名称修改为weight1,weight2。方法1:调用...

【Codeforces Round 269 (Div 2)B】【简单构造】MUH and Sticks 数值升序输出三种可能编号序

B. MUH and Important Things time limit per test 1 second memory limit per test 256 megab...

【矩阵快速幂 】Codeforces 450B - Jzzhu and Sequences (公式转化)

【题目链接】click here~~ 【题目大意】 Jzzhu has invented a kind of sequences, they meet the following propert...

CF 453B(Little Pony and Harmony Chest-数列最小加减1更改方案,满足任意2数互质-位运算dp+最坏情况分析+记忆化搜索)

B. Little Pony and Harmony Chest time limit per test 4 seconds memory limit per test 256 megabyt...

Codeforces Round #261 (Div. 2)B. Pashmak and Flowers(容易)

Pashmak decided to give Parmida a pair of flowers from the garden. There are n flowers in the gard...
内容举报
返回顶部
收藏助手
不良信息举报
您举报文章:coderforce B .A and B and Compilation Errors
举报原因:
原因补充:

(最多只允许输入30个字)