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 ...
随机推荐
- CF761A Dasha and Stairs 题解
Content 给定两个数 \(n,m\),试问是否有区间里面有 \(n\) 个奇数和 \(m\) 个偶数. 数据范围:\(0\leqslant n,m\leqslant 100\). Solutio ...
- CF208A Dubstep 题解
Content 有一个字符串被变换了.其中在这个字符串的前面加了 \(\geqslant 0\) 个 WUB,每个单词(由空格间隔)之间加了 \(\geqslant 1\) 个 WUB,在这个字符串的 ...
- java 8 启动脚本优化
1 #!/bin/bash 2 3 JAVA_HOME=/usr/java/default 4 5 #java虚拟机启动参数 6 JAVA_OPTS="-server -Xms1366m - ...
- wget 用法http://www.cnblogs.com/cy-8593/p/9523035.html
http://www.cnblogs.com/cy-8593/p/9523035.html
- javascript中的12种循环遍历方法
1.for (自定义条件) 循环 let arr = [1,2,3]; for(let i =0;i<arr.length;i++){ console.log(i,arr[i]) } 2.for ...
- JavaScript 判断变量是否为空---三元运算,元组获取值-重组.map()。
var from_days = getQueryString('from_days'); undefined {'from_days': (from_days) ? from_days : null} ...
- 钉钉提供的内网穿透之HTTP穿透
此方法无需自行提供服务器和域名 官方地址:https://developers.dingtalk.com/document/resourcedownload/http-intranet-penetra ...
- 总结Vue第三天:模块化和webpack模块化打包:
总结Vue第三天:模块化和webpack模块化打包: 一.❀ 模块化 [导入import-----导出export] 1.为什么需要模块化? JavaScript 发展初期,代码简单地堆积在一起,只要 ...
- 【LeetCode】1462. 课程安排 IV Course Schedule IV (Python)
作者: 负雪明烛 id: fuxuemingzhu 个人博客:http://fuxuemingzhu.cn/ 目录 题目描述 题目大意 解题方法 DFS 日期 题目地址:https://leetcod ...
- 【LeetCode】234. Palindrome Linked List 解题报告(Python)
作者: 负雪明烛 id: fuxuemingzhu 个人博客: http://fuxuemingzhu.cn/ 目录 题目描述 题目大意 解题方法 日期 题目地址:https://leetcode.c ...