CodeForces 519B A and B and Compilation Errors (超水题)
这道题是超级水的,在博客上看有的人把这道题写的很麻烦。
用 Python 的话是超级的好写,这里就奉上 C/C++ 的AC。
代码如下:
#include <cstdio>
#include <iostream>
using namespace std;
int main(void)
{
long long int n, num;
while (scanf("%lld", &n) != EOF) {
long long int sum1 = 0, sum2 = 0, sum3 = 0;
for (long long int i = 0; i < n; i++) {
scanf("%lld", &num);
sum1 += num;
}
for (long long int i = 0; i < n-1; i++) {
scanf("%lld", &num);
sum2 += num;
}
for (long long int i = 0; i < n-2; i++) {
scanf("%lld", &num);
sum3 += num;
}
printf("%lld\n", sum1 - sum2);
printf("%lld\n", sum2 - sum3);
}
return 0;
}
CodeForces 519B A and B and Compilation Errors (超水题)的更多相关文章
- 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 megabytes ...
- CodeForces 519B A and B and Compilation Errors【模拟】
题目意思还是蛮简单的,看 输入数据输出数据还是比较明显的 我用排序来写还是可以AC的 //#pragma comment(linker, "/STACK:16777216") // ...
- Codeforces 148D 一袋老鼠 Bag of mice | 概率DP 水题
除非特别忙,我接下来会尽可能翻译我做的每道CF题的题面! Codeforces 148D 一袋老鼠 Bag of mice | 概率DP 水题 题面 胡小兔和司公子都认为对方是垃圾. 为了决出谁才是垃 ...
- Codeforce 519B - 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 Testing Round #8 B. Sheldon and Ice Pieces 水题
题目链接:http://codeforces.com/problemset/problem/328/B 水题~ #include <cstdio> #include <cstdlib ...
- Codeforces Round #290 (Div. 2) A. Fox And Snake 水题
A. Fox And Snake 题目连接: http://codeforces.com/contest/510/problem/A Description Fox Ciel starts to le ...
- Codeforces Round #322 (Div. 2) A. Vasya the Hipster 水题
A. Vasya the Hipster Time Limit: 1 Sec Memory Limit: 256 MB 题目连接 http://codeforces.com/contest/581/p ...
- Codeforces Round #373 (Div. 2) B. Anatoly and Cockroaches 水题
B. Anatoly and Cockroaches 题目连接: http://codeforces.com/contest/719/problem/B Description Anatoly liv ...
- Codeforces Round #368 (Div. 2) A. Brain's Photos 水题
A. Brain's Photos 题目连接: http://www.codeforces.com/contest/707/problem/A Description Small, but very ...
随机推荐
- [BUUCTF]PWN——bjdctf_2020_babyrop
bjdctf_2020_babyrop[64位libc泄露] 题目附件 解题步骤: 例行检查,64位程序,开启了NX保护 试运行一下程序,看看大概的情况,看提示,应该是道泄露libc的题目 64位id ...
- 4、BFS算法套路框架——Go语言版
前情提示:Go语言学习者.本文参考https://labuladong.gitee.io/algo,代码自己参考抒写,若有不妥之处,感谢指正 关于golang算法文章,为了便于下载和整理,都已开源放在 ...
- 小迪安全 Web安全 基础入门 - 第四天 - 30余种加密编码进制&Web&数据库&系统&代码&参数值
一.密码存储加密 1.MD5值是32或16位由数字"0-9"和字母"a-f"所组成的字符串 2.SHA1加密的密文特征与MD5类似,但位数是40位 3.NTLM ...
- zabbix保姆级安装教程
安装步骤 1.进入官网选择下载的版本和服务器类型 官网地址:https://www.zabbix.com/cn/download?zabbix=5.0&os_distribution=cent ...
- Base64编码原来是这么回事儿
鸣谢CSDN文章:https://blog.csdn.net/believesoul/article/details/84100616 一.言简意赅理解Base64编码 就是将以"字节&qu ...
- Uni-app原生插件入门使用教程-[1]从Uni-app插件市场试用插件
[1]从Uniapp插件市场试用插件 当HBuilderX中提供的能力无法满足App功能需求,需要通过使用Andorid/iOS原生开发实现时,可使用App离线SDK开发原生插件来扩展原生能力. 如使 ...
- JAVA获取多个经纬度的中心点
import java.util.LinkedList; public class Test1 { /** * 位置实体类,根据自己的来即可 */ static class Position{ /** ...
- C++实现二叉搜索书(参考算法导论)
1 #include <iostream> 2 using namespace std; 3 4 struct node 5 { 6 // 数据域 7 int data; 8 9 // 左 ...
- 【LeetCode】39. Combination Sum 解题报告(Python & C++)
作者: 负雪明烛 id: fuxuemingzhu 个人博客:http://fuxuemingzhu.cn/ 目录 题目描述 题目大意 解题方法 方法一:递归 方法二:回溯法 日期 题目地址:[htt ...
- 【LeetCode】638. Shopping Offers 解题报告(Python & C++)
作者: 负雪明烛 id: fuxuemingzhu 个人博客: http://fuxuemingzhu.cn/ 目录 题目描述 题目大意 解题方法 DFS 回溯法 日期 题目地址:https://le ...