ACM: uva 10763 -&…
来源:互联网 发布:ios 网络请求第三方 编辑:程序博客网 时间:2024/05/16 05:54
Foreign Exchange
Your non-profit organization(iCORE
The program your organization runs works as follows: Allcandidates are asked for their original location and the locationthey would like to go to. The program works out only if everystudent has a suitable exchange partner. In other words, if astudent wants to go from A to B, there must be another student whowants to go from B to A. This was an easy task when there were onlyabout 50 candidates, however now there are upto
Input
The input file contains multiple cases. Each test case willconsist of a linecontaining
Output
For each test case,print
题意: 有n个人想当交换生, 有信息自己location和想去的location, 判断是否可以满足全部人得需求.
解题思路:
代码:
#include <cstdio>
#include <iostream>
#include <cstring>
#include <algorithm>
using namespace std;
#define MAX 500005
struct node
{
}a[MAX], b[MAX];
int n;
int main()
{
//
}
- ACM: uva 10763 -&…
- ACM: uva 11210 &n…
- ACM: uva 11389 -&…
- ACM: uva 1325 -&n…
- ACM: uva 10827 -&…
- ACM: uva 1432 -&n…
- ACM: uva 1362 -&n…
- ACM: uva 11361 -&…
- ACM: uva 1069 -&n…
- ACM: uva 11426 -&…
- ACM: 极其简单题 uva&nb…
- ACM: uva 10253 - Series-Parallel…
- ACM: LA 3266 -&nb…
- ACM: poj 2786 -&n…
- ACM: poj 3972 -&n…
- ACM: uva 1335 - Beijing Guards
- ACM: uva 10391 - Compound Words
- ACM: uva 10534 - Wavio Sequence
- [蓝桥杯]常用算法-递归法
- ACM: uva 10125 - Sumsets
- Java发展历史
- boost的shared_ptr循环引用(1)
- Iwfu-贝塞尔曲线
- ACM: uva 10763 -&…
- ACM: uva 10391 - Compound Words
- ACM: uva 1451 - Average
- ACM: uva 1432 -&n…
- ACM: poj 2786 -&n…
- jquery 1.6 后 checkbox 使用attr("checked"),undefined.
- ACM: poj 3972 -&n…
- ACM: uva 1468 - Restaurant
- ACM: uva 11584 -